diff --git a/assets/ccip-f0ac5289.js b/assets/ccip-685adec5.js similarity index 97% rename from assets/ccip-f0ac5289.js rename to assets/ccip-685adec5.js index af72eee0..9fb76409 100644 --- a/assets/ccip-f0ac5289.js +++ b/assets/ccip-685adec5.js @@ -1 +1 @@ -import{an as f,ao as w,ap as y,aq as p,ar as h,as as g,at as k,au as O,av as L,aw as m,ax as E}from"./index-aa62d2a2.js";class x extends f{constructor({callbackSelector:e,cause:t,data:n,extraData:c,sender:d,urls:a}){var i;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(i=t.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const C="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function P(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!$(c,a))throw new R({sender:a,to:c});const l=await v({data:u,sender:a,urls:i}),{data:b}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return b}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function v({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const C="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function P(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!$(c,a))throw new R({sender:a,to:c});const l=await v({data:u,sender:a,urls:i}),{data:b}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return b}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function v({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;di&&(Ft.has(i)?Ft.get(i):Pt(i)===Object.prototype||Pt(i)===Array.prototype),ce=i=>ue(i)&&i[se]||null,Nt=(i,c=!0)=>{Ft.set(i,c)},At=i=>typeof i=="object"&&i!==null,J=new WeakMap,pt=new WeakSet,ae=(i=Object.is,c=(y,I)=>new Proxy(y,I),l=y=>At(y)&&!pt.has(y)&&(Array.isArray(y)||!(Symbol.iterator in y))&&!(y instanceof WeakMap)&&!(y instanceof WeakSet)&&!(y instanceof Error)&&!(y instanceof Number)&&!(y instanceof Date)&&!(y instanceof String)&&!(y instanceof RegExp)&&!(y instanceof ArrayBuffer),h=y=>{switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:throw y}},p=new WeakMap,d=(y,I,B=h)=>{const L=p.get(y);if((L==null?void 0:L[0])===I)return L[1];const U=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y));return Nt(U,!0),p.set(y,[I,U]),Reflect.ownKeys(y).forEach(P=>{if(Object.getOwnPropertyDescriptor(U,P))return;const T=Reflect.get(y,P),G={value:T,enumerable:!0,configurable:!0};if(pt.has(T))Nt(T,!1);else if(T instanceof Promise)delete G.value,G.get=()=>B(T);else if(J.has(T)){const[O,ct]=J.get(T);G.value=d(O,ct(),B)}Object.defineProperty(U,P,G)}),U},f=new WeakMap,s=[1,1],E=y=>{if(!At(y))throw new Error("object required");const I=f.get(y);if(I)return I;let B=s[0];const L=new Set,U=(x,m=++s[0])=>{B!==m&&(B=m,L.forEach(w=>w(x,m)))};let P=s[1];const T=(x=++s[1])=>(P!==x&&!L.size&&(P=x,O.forEach(([m])=>{const w=m[1](x);w>B&&(B=w)})),B),G=x=>(m,w)=>{const D=[...m];D[1]=[x,...D[1]],U(D,w)},O=new Map,ct=(x,m)=>{if(L.size){const w=m[3](G(x));O.set(x,[m,w])}else O.set(x,[m])},at=x=>{var m;const w=O.get(x);w&&(O.delete(x),(m=w[1])==null||m.call(w))},gt=x=>(L.add(x),L.size===1&&O.forEach(([w,D],H)=>{const Y=w[3](G(H));O.set(H,[w,Y])}),()=>{L.delete(x),L.size===0&&O.forEach(([w,D],H)=>{D&&(D(),O.set(H,[w]))})}),k=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y)),Q=c(k,{deleteProperty(x,m){const w=Reflect.get(x,m);at(m);const D=Reflect.deleteProperty(x,m);return D&&U(["delete",[m],w]),D},set(x,m,w,D){const H=Reflect.has(x,m),Y=Reflect.get(x,m,D);if(H&&(i(Y,w)||f.has(w)&&i(Y,f.get(w))))return!0;at(m),At(w)&&(w=ce(w)||w);let Z=w;if(w instanceof Promise)w.then($=>{w.status="fulfilled",w.value=$,U(["resolve",[m],$])}).catch($=>{w.status="rejected",w.reason=$,U(["reject",[m],$])});else{!J.has(w)&&l(w)&&(Z=E(w));const $=!pt.has(Z)&&J.get(Z);$&&ct(m,$)}return Reflect.set(x,m,Z,D),U(["set",[m],w,Y]),!0}});f.set(y,Q);const Et=[k,T,d,gt];return J.set(Q,Et),Reflect.ownKeys(y).forEach(x=>{const m=Object.getOwnPropertyDescriptor(y,x);"value"in m&&(Q[x]=y[x],delete m.value,delete m.writable),Object.defineProperty(k,x,m)}),Q})=>[E,J,pt,i,c,l,h,p,d,f,s],[le]=ae();function X(i={}){return le(i)}function rt(i,c,l){const h=J.get(i);let p;const d=[],f=h[3];let s=!1;const y=f(I=>{if(d.push(I),l){c(d.splice(0));return}p||(p=Promise.resolve().then(()=>{p=void 0,s&&c(d.splice(0))}))});return s=!0,()=>{s=!1,y()}}function fe(i,c){const l=J.get(i),[h,p,d]=l;return d(h,p(),c)}var zt={},wt={};wt.byteLength=de;wt.toByteArray=we;wt.fromByteArray=Ee;var z=[],N=[],he=typeof Uint8Array<"u"?Uint8Array:Array,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ot=0,pe=Ut.length;ot0)throw new Error("Invalid string. Length must be a multiple of 4");var l=i.indexOf("=");l===-1&&(l=c);var h=l===c?0:4-l%4;return[l,h]}function de(i){var c=Gt(i),l=c[0],h=c[1];return(l+h)*3/4-h}function ye(i,c,l){return(c+l)*3/4-l}function we(i){var c,l=Gt(i),h=l[0],p=l[1],d=new he(ye(i,h,p)),f=0,s=p>0?h-4:h,E;for(E=0;E>16&255,d[f++]=c>>8&255,d[f++]=c&255;return p===2&&(c=N[i.charCodeAt(E)]<<2|N[i.charCodeAt(E+1)]>>4,d[f++]=c&255),p===1&&(c=N[i.charCodeAt(E)]<<10|N[i.charCodeAt(E+1)]<<4|N[i.charCodeAt(E+2)]>>2,d[f++]=c>>8&255,d[f++]=c&255),d}function ge(i){return z[i>>18&63]+z[i>>12&63]+z[i>>6&63]+z[i&63]}function me(i,c,l){for(var h,p=[],d=c;ds?s:f+d));return h===1?(c=i[l-1],p.push(z[c>>2]+z[c<<4&63]+"==")):h===2&&(c=(i[l-2]<<8)+i[l-1],p.push(z[c>>10]+z[c>>4&63]+z[c<<2&63]+"=")),p.join("")}var Lt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Lt.read=function(i,c,l,h,p){var d,f,s=p*8-h-1,E=(1<>1,I=-7,B=l?p-1:0,L=l?-1:1,U=i[c+B];for(B+=L,d=U&(1<<-I)-1,U>>=-I,I+=s;I>0;d=d*256+i[c+B],B+=L,I-=8);for(f=d&(1<<-I)-1,d>>=-I,I+=h;I>0;f=f*256+i[c+B],B+=L,I-=8);if(d===0)d=1-y;else{if(d===E)return f?NaN:(U?-1:1)*(1/0);f=f+Math.pow(2,h),d=d-y}return(U?-1:1)*f*Math.pow(2,d-h)};Lt.write=function(i,c,l,h,p,d){var f,s,E,y=d*8-p-1,I=(1<>1,L=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=h?0:d-1,P=h?1:-1,T=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(s=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-f))<1&&(f--,E*=2),f+B>=1?c+=L/E:c+=L*Math.pow(2,1-B),c*E>=2&&(f++,E/=2),f+B>=I?(s=0,f=I):f+B>=1?(s=(c*E-1)*Math.pow(2,p),f=f+B):(s=c*Math.pow(2,B-1)*Math.pow(2,p),f=0));p>=8;i[l+U]=s&255,U+=P,s/=256,p-=8);for(f=f<0;i[l+U]=f&255,U+=P,f/=256,y-=8);i[l+U-P]|=T*128};/*! +import{am as oe}from"./index-d18dd62c.js";const se=Symbol(),Pt=Object.getPrototypeOf,Ft=new WeakMap,ue=i=>i&&(Ft.has(i)?Ft.get(i):Pt(i)===Object.prototype||Pt(i)===Array.prototype),ce=i=>ue(i)&&i[se]||null,Nt=(i,c=!0)=>{Ft.set(i,c)},At=i=>typeof i=="object"&&i!==null,J=new WeakMap,pt=new WeakSet,ae=(i=Object.is,c=(y,I)=>new Proxy(y,I),l=y=>At(y)&&!pt.has(y)&&(Array.isArray(y)||!(Symbol.iterator in y))&&!(y instanceof WeakMap)&&!(y instanceof WeakSet)&&!(y instanceof Error)&&!(y instanceof Number)&&!(y instanceof Date)&&!(y instanceof String)&&!(y instanceof RegExp)&&!(y instanceof ArrayBuffer),h=y=>{switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:throw y}},p=new WeakMap,d=(y,I,B=h)=>{const L=p.get(y);if((L==null?void 0:L[0])===I)return L[1];const U=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y));return Nt(U,!0),p.set(y,[I,U]),Reflect.ownKeys(y).forEach(P=>{if(Object.getOwnPropertyDescriptor(U,P))return;const T=Reflect.get(y,P),G={value:T,enumerable:!0,configurable:!0};if(pt.has(T))Nt(T,!1);else if(T instanceof Promise)delete G.value,G.get=()=>B(T);else if(J.has(T)){const[O,ct]=J.get(T);G.value=d(O,ct(),B)}Object.defineProperty(U,P,G)}),U},f=new WeakMap,s=[1,1],E=y=>{if(!At(y))throw new Error("object required");const I=f.get(y);if(I)return I;let B=s[0];const L=new Set,U=(x,m=++s[0])=>{B!==m&&(B=m,L.forEach(w=>w(x,m)))};let P=s[1];const T=(x=++s[1])=>(P!==x&&!L.size&&(P=x,O.forEach(([m])=>{const w=m[1](x);w>B&&(B=w)})),B),G=x=>(m,w)=>{const D=[...m];D[1]=[x,...D[1]],U(D,w)},O=new Map,ct=(x,m)=>{if(L.size){const w=m[3](G(x));O.set(x,[m,w])}else O.set(x,[m])},at=x=>{var m;const w=O.get(x);w&&(O.delete(x),(m=w[1])==null||m.call(w))},gt=x=>(L.add(x),L.size===1&&O.forEach(([w,D],H)=>{const Y=w[3](G(H));O.set(H,[w,Y])}),()=>{L.delete(x),L.size===0&&O.forEach(([w,D],H)=>{D&&(D(),O.set(H,[w]))})}),k=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y)),Q=c(k,{deleteProperty(x,m){const w=Reflect.get(x,m);at(m);const D=Reflect.deleteProperty(x,m);return D&&U(["delete",[m],w]),D},set(x,m,w,D){const H=Reflect.has(x,m),Y=Reflect.get(x,m,D);if(H&&(i(Y,w)||f.has(w)&&i(Y,f.get(w))))return!0;at(m),At(w)&&(w=ce(w)||w);let Z=w;if(w instanceof Promise)w.then($=>{w.status="fulfilled",w.value=$,U(["resolve",[m],$])}).catch($=>{w.status="rejected",w.reason=$,U(["reject",[m],$])});else{!J.has(w)&&l(w)&&(Z=E(w));const $=!pt.has(Z)&&J.get(Z);$&&ct(m,$)}return Reflect.set(x,m,Z,D),U(["set",[m],w,Y]),!0}});f.set(y,Q);const Et=[k,T,d,gt];return J.set(Q,Et),Reflect.ownKeys(y).forEach(x=>{const m=Object.getOwnPropertyDescriptor(y,x);"value"in m&&(Q[x]=y[x],delete m.value,delete m.writable),Object.defineProperty(k,x,m)}),Q})=>[E,J,pt,i,c,l,h,p,d,f,s],[le]=ae();function X(i={}){return le(i)}function rt(i,c,l){const h=J.get(i);let p;const d=[],f=h[3];let s=!1;const y=f(I=>{if(d.push(I),l){c(d.splice(0));return}p||(p=Promise.resolve().then(()=>{p=void 0,s&&c(d.splice(0))}))});return s=!0,()=>{s=!1,y()}}function fe(i,c){const l=J.get(i),[h,p,d]=l;return d(h,p(),c)}var zt={},wt={};wt.byteLength=de;wt.toByteArray=we;wt.fromByteArray=Ee;var z=[],N=[],he=typeof Uint8Array<"u"?Uint8Array:Array,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ot=0,pe=Ut.length;ot0)throw new Error("Invalid string. Length must be a multiple of 4");var l=i.indexOf("=");l===-1&&(l=c);var h=l===c?0:4-l%4;return[l,h]}function de(i){var c=Gt(i),l=c[0],h=c[1];return(l+h)*3/4-h}function ye(i,c,l){return(c+l)*3/4-l}function we(i){var c,l=Gt(i),h=l[0],p=l[1],d=new he(ye(i,h,p)),f=0,s=p>0?h-4:h,E;for(E=0;E>16&255,d[f++]=c>>8&255,d[f++]=c&255;return p===2&&(c=N[i.charCodeAt(E)]<<2|N[i.charCodeAt(E+1)]>>4,d[f++]=c&255),p===1&&(c=N[i.charCodeAt(E)]<<10|N[i.charCodeAt(E+1)]<<4|N[i.charCodeAt(E+2)]>>2,d[f++]=c>>8&255,d[f++]=c&255),d}function ge(i){return z[i>>18&63]+z[i>>12&63]+z[i>>6&63]+z[i&63]}function me(i,c,l){for(var h,p=[],d=c;ds?s:f+d));return h===1?(c=i[l-1],p.push(z[c>>2]+z[c<<4&63]+"==")):h===2&&(c=(i[l-2]<<8)+i[l-1],p.push(z[c>>10]+z[c>>4&63]+z[c<<2&63]+"=")),p.join("")}var Lt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Lt.read=function(i,c,l,h,p){var d,f,s=p*8-h-1,E=(1<>1,I=-7,B=l?p-1:0,L=l?-1:1,U=i[c+B];for(B+=L,d=U&(1<<-I)-1,U>>=-I,I+=s;I>0;d=d*256+i[c+B],B+=L,I-=8);for(f=d&(1<<-I)-1,d>>=-I,I+=h;I>0;f=f*256+i[c+B],B+=L,I-=8);if(d===0)d=1-y;else{if(d===E)return f?NaN:(U?-1:1)*(1/0);f=f+Math.pow(2,h),d=d-y}return(U?-1:1)*f*Math.pow(2,d-h)};Lt.write=function(i,c,l,h,p,d){var f,s,E,y=d*8-p-1,I=(1<>1,L=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=h?0:d-1,P=h?1:-1,T=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(s=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-f))<1&&(f--,E*=2),f+B>=1?c+=L/E:c+=L*Math.pow(2,1-B),c*E>=2&&(f++,E/=2),f+B>=I?(s=0,f=I):f+B>=1?(s=(c*E-1)*Math.pow(2,p),f=f+B):(s=c*Math.pow(2,B-1)*Math.pow(2,p),f=0));p>=8;i[l+U]=s&255,U+=P,s/=256,p-=8);for(f=f<0;i[l+U]=f&255,U+=P,f/=256,y-=8);i[l+U-P]|=T*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(i){const c=wt,l=Lt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=s,i.SlowBuffer=ct,i.INSPECT_MAX_BYTES=50;const p=2147483647;i.kMaxLength=p,s.TYPED_ARRAY_SUPPORT=d(),!s.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 d(){try{const r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function f(r){if(r>p)throw new RangeError('The value "'+r+'" is invalid for option "size"');const t=new Uint8Array(r);return Object.setPrototypeOf(t,s.prototype),t}function s(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(r)}return E(r,t,e)}s.poolSize=8192;function E(r,t,e){if(typeof r=="string")return L(r,t);if(ArrayBuffer.isView(r))return P(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(v(r,ArrayBuffer)||r&&v(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v(r,SharedArrayBuffer)||r&&v(r.buffer,SharedArrayBuffer)))return T(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return s.from(n,t,e);const o=G(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,t,e){return E(r,t,e)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function y(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function I(r,t,e){return y(r),r<=0?f(r):t!==void 0?typeof e=="string"?f(r).fill(t,e):f(r).fill(t):f(r)}s.alloc=function(r,t,e){return I(r,t,e)};function B(r){return y(r),f(r<0?0:O(r)|0)}s.allocUnsafe=function(r){return B(r)},s.allocUnsafeSlow=function(r){return B(r)};function L(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const e=at(r,t)|0;let n=f(e);const o=n.write(r,t);return o!==e&&(n=n.slice(0,o)),n}function U(r){const t=r.length<0?0:O(r.length)|0,e=f(t);for(let n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return r|0}function ct(r){return+r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==s.prototype},s.compare=function(t,e){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),v(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,o=e.length;for(let u=0,a=Math.min(n,o);uo.length?(s.isBuffer(a)||(a=s.from(a)),a.copy(o,u)):Uint8Array.prototype.set.call(o,a,u);else if(s.isBuffer(a))a.copy(o,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=a.length}return o};function at(r,t){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||v(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return It(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Wt(r).length;default:if(o)return n?-1:It(r).length;t=(""+t).toLowerCase(),o=!0}}s.byteLength=at;function gt(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Jt(this,t,e);case"utf8":case"utf-8":return Y(this,t,e);case"ascii":return Yt(this,t,e);case"latin1":case"binary":return qt(this,t,e);case"base64":return H(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}s.prototype._isBuffer=!0;function k(r,t,e){const n=r[t];r[t]=r[e],r[e]=n}s.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},h&&(s.prototype[h]=s.prototype.inspect),s.prototype.compare=function(t,e,n,o,u){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),u===void 0&&(u=this.length),e<0||n>t.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&e>=n)return 0;if(o>=u)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,u>>>=0,this===t)return 0;let a=u-o,g=n-e;const F=Math.min(a,g),b=this.slice(o,u),C=t.slice(e,n);for(let A=0;A2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,Bt(e)&&(e=o?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(o)return-1;e=r.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),s.isBuffer(t))return t.length===0?-1:Q(r,t,e,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Q(r,[t],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Q(r,t,e,n,o){let u=1,a=r.length,g=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;u=2,a/=2,g/=2,e/=2}function F(C,A){return u===1?C[A]:C.readUInt16BE(A*u)}let b;if(o){let C=-1;for(b=e;ba&&(e=a-g),b=e;b>=0;b--){let C=!0;for(let A=0;Ao&&(n=o)):n=o;const u=t.length;n>u/2&&(n=u/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-e;if((n===void 0||n>u)&&(n=u),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let a=!1;for(;;)switch(o){case"hex":return Et(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(r,t,e){return t===0&&e===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(t,e))}function Y(r,t,e){e=Math.min(r.length,e);const n=[];let o=t;for(;o239?4:u>223?3:u>191?2:1;if(o+g<=e){let F,b,C,A;switch(g){case 1:u<128&&(a=u);break;case 2:F=r[o+1],(F&192)===128&&(A=(u&31)<<6|F&63,A>127&&(a=A));break;case 3:F=r[o+1],b=r[o+2],(F&192)===128&&(b&192)===128&&(A=(u&15)<<12|(F&63)<<6|b&63,A>2047&&(A<55296||A>57343)&&(a=A));break;case 4:F=r[o+1],b=r[o+2],C=r[o+3],(F&192)===128&&(b&192)===128&&(C&192)===128&&(A=(u&15)<<18|(F&63)<<12|(b&63)<<6|C&63,A>65535&&A<1114112&&(a=A))}}a===null?(a=65533,g=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=g}return $(n)}const Z=4096;function $(r){const t=r.length;if(t<=Z)return String.fromCharCode.apply(String,r);let e="",n=0;for(;nn)&&(e=n);let o="";for(let u=t;un&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),ee)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t+--e],u=1;for(;e>0&&(u*=256);)o+=this[t+--e]*u;return o},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(o)+(BigInt(u)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(o)<>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a=u&&(o-=Math.pow(2,8*e)),o},s.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=e,u=1,a=this[t+--o];for(;o>0&&(u*=256);)a+=this[t+--o]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(o)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<>>0,e||R(t,4,this.length),l.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),l.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!1,52,8)};function W(r,t,e,n,o,u){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||tr.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=1,a=0;for(this[e]=t&255;++a>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=n-1,a=1;for(this[e+u]=t&255;--u>=0&&(a*=256);)this[e+u]=t/a&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,255,0),this[e]=t&255,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Rt(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,e}function St(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e+7]=u,u=u>>8,r[e+6]=u,u=u>>8,r[e+5]=u,u=u>>8,r[e+4]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=a,a=a>>8,r[e+2]=a,a=a>>8,r[e+1]=a,a=a>>8,r[e]=a,e+8}s.prototype.writeBigUInt64LE=q(function(t,e=0){return Rt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=q(function(t,e=0){return St(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=0,a=1,g=0;for(this[e]=t&255;++u>0)-g&255;return e+n},s.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=n-1,a=1,g=0;for(this[e+u]=t&255;--u>=0&&(a*=256);)t<0&&g===0&&this[e+u+1]!==0&&(g=1),this[e+u]=(t/a>>0)-g&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},s.prototype.writeBigInt64LE=q(function(t,e=0){return Rt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=q(function(t,e=0){return St(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Mt(r,t,e,n,o,u){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Tt(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,4),l.write(r,t,e,n,23,4),e+4}s.prototype.writeFloatLE=function(t,e,n){return Tt(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return Tt(this,t,e,!1,n)};function Ot(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,8),l.write(r,t,e,n,52,8),e+8}s.prototype.writeDoubleLE=function(t,e,n){return Ot(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return Ot(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,o){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let u;if(typeof t=="number")for(u=e;u2**32?o=Dt(String(e)):typeof e=="bigint"&&(o=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(o=Dt(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Dt(r){let t="",e=r.length;const n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Qt(r,t,e){it(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&<(t,r.length-(e+1))}function _t(r,t,e,n,o,u){if(r>e||r3?t===0||t===BigInt(0)?g=`>= 0${a} and < 2${a} ** ${(u+1)*8}${a}`:g=`>= -(2${a} ** ${(u+1)*8-1}${a}) and < 2 ** ${(u+1)*8-1}${a}`:g=`>= ${t}${a} and <= ${e}${a}`,new nt.ERR_OUT_OF_RANGE("value",g,r)}Qt(n,o,u)}function it(r,t){if(typeof r!="number")throw new nt.ERR_INVALID_ARG_TYPE(t,"number",r)}function lt(r,t,e){throw Math.floor(r)!==r?(it(r,e),new nt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}const Zt=/[^+/0-9A-Za-z-_]/g;function te(r){if(r=r.split("=")[0],r=r.trim().replace(Zt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function It(r,t){t=t||1/0;let e;const n=r.length;let o=null;const u=[];for(let a=0;a55295&&e<57344){if(!o){if(e>56319){(t-=3)>-1&&u.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&u.push(239,191,189);continue}o=e;continue}if(e<56320){(t-=3)>-1&&u.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(t-=3)>-1&&u.push(239,191,189);if(o=null,e<128){if((t-=1)<0)break;u.push(e)}else if(e<2048){if((t-=2)<0)break;u.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;u.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;u.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return u}function ee(r){const t=[];for(let e=0;e>8,o=e%256,u.push(o),u.push(n);return u}function Wt(r){return c.toByteArray(te(r))}function ht(r,t,e,n){let o;for(o=0;o=t.length||o>=r.length);++o)t[o+e]=r[o];return o}function v(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function Bt(r){return r!==r}const ne=function(){const r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){const n=e*16;for(let o=0;o<16;++o)t[n+o]=r[e]+r[o]}return t}();function q(r){return typeof BigInt>"u"?ie:r}function ie(){throw new Error("BigInt not supported")}})(zt);const S=X({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Ht={state:S,subscribe(i){return rt(S,()=>i(S))},push(i,c){i!==S.view&&(S.view=i,c&&(S.data=c),S.history.push(i))},reset(i){S.view=i,S.history=[i]},replace(i){S.history.length>1&&(S.history[S.history.length-1]=i,S.view=i)},goBack(){if(S.history.length>1){S.history.pop();const[i]=S.history.slice(-1);S.view=i}},setData(i){S.data=i}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const i=navigator.userAgent.toLowerCase();return _.isMobile()&&(i.includes("iphone")||i.includes("ipad"))},isHttpUrl(i){return i.startsWith("http://")||i.startsWith("https://")},isArray(i){return Array.isArray(i)&&i.length>0},formatNativeUrl(i,c,l){if(_.isHttpUrl(i))return this.formatUniversalUrl(i,c,l);let h=i;h.includes("://")||(h=i.replaceAll("/","").replaceAll(":",""),h=`${h}://`),h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},formatUniversalUrl(i,c,l){if(!_.isHttpUrl(i))return this.formatNativeUrl(i,c,l);let h=i;h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},async wait(i){return new Promise(c=>{setTimeout(c,i)})},openHref(i,c){window.open(i,c,"noreferrer noopener")},setWalletConnectDeepLink(i,c){try{localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:i,name:c}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(i){try{const[c]=i.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:c,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.5.9")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var i;const c=(i=Ht.state.data)==null?void 0:i.Wallet;if(!c)throw new Error('Missing "Wallet" view data');return c}},xe=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),M=X({enabled:xe,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:M,subscribe(i){return rt(M.events,()=>i(fe(M.events[M.events.length-1])))},initialize(){M.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(M.userSessionId=crypto.randomUUID())},setConnectedWalletId(i){M.connectedWalletId=i},click(i){if(M.enabled){const c={type:"CLICK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},track(i){if(M.enabled){const c={type:"TRACK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},view(i){if(M.enabled){const c={type:"VIEW",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}}},V=X({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),j={state:V,subscribe(i){return rt(V,()=>i(V))},setChains(i){V.chains=i},setWalletConnectUri(i){V.walletConnectUri=i},setIsCustomDesktop(i){V.isCustomDesktop=i},setIsCustomMobile(i){V.isCustomMobile=i},setIsDataLoaded(i){V.isDataLoaded=i},setIsUiLoaded(i){V.isUiLoaded=i},setIsAuth(i){V.isAuth=i}},dt=X({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),ut={state:dt,subscribe(i){return rt(dt,()=>i(dt))},setConfig(i){var c,l;Ie.initialize(),j.setChains(i.chains),j.setIsAuth(Boolean(i.enableAuthMode)),j.setIsCustomMobile(Boolean((c=i.mobileWallets)==null?void 0:c.length)),j.setIsCustomDesktop(Boolean((l=i.desktopWallets)==null?void 0:l.length)),_.setModalVersionInStorage(),Object.assign(dt,i)}},Ct="https://explorer-api.walletconnect.com";async function yt(i,c){const l=new URL(i,Ct);return l.searchParams.append("projectId",ut.state.projectId),Object.entries(c).forEach(([h,p])=>{p&&l.searchParams.append(h,String(p))}),(await fetch(l)).json()}const tt={async getDesktopListings(i){return yt("/w3m/v1/getDesktopListings",i)},async getMobileListings(i){return yt("/w3m/v1/getMobileListings",i)},async getInjectedListings(i){return yt("/w3m/v1/getInjectedListings",i)},async getAllListings(i){return yt("/w3m/v1/getAllListings",i)},getWalletImageUrl(i){return`${Ct}/w3m/v1/getWalletImage/${i}?projectId=${ut.state.projectId}`},getAssetImageUrl(i){return`${Ct}/w3m/v1/getAssetImage/${i}?projectId=${ut.state.projectId}`}};var Be=Object.defineProperty,kt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,jt=(i,c,l)=>c in i?Be(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,be=(i,c)=>{for(var l in c||(c={}))Ae.call(c,l)&&jt(i,l,c[l]);if(kt)for(var l of kt(c))Ue.call(c,l)&&jt(i,l,c[l]);return i};const $t=_.isMobile(),K=X({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),De={state:K,async getRecomendedWallets(){const{explorerRecommendedWalletIds:i,explorerExcludedWalletIds:c}=ut.state;if(i==="NONE"||c==="ALL"&&!i)return K.recomendedWallets;if(_.isArray(i)){const l={recommendedIds:i.join(",")},{listings:h}=await tt.getAllListings(l),p=Object.values(h);p.sort((d,f)=>{const s=i.indexOf(d.id),E=i.indexOf(f.id);return s-E}),K.recomendedWallets=p}else{const{chains:l,isAuth:h}=j.state,p=l==null?void 0:l.join(","),d=_.isArray(c),f={page:1,sdks:h?"auth_v1":void 0,entries:_.RECOMMENDED_WALLET_AMOUNT,chains:p,version:2,excludedIds:d?c.join(","):void 0},{listings:s}=$t?await tt.getMobileListings(f):await tt.getDesktopListings(f);K.recomendedWallets=Object.values(s)}return K.recomendedWallets},async getWallets(i){const c=be({},i),{explorerRecommendedWalletIds:l,explorerExcludedWalletIds:h}=ut.state,{recomendedWallets:p}=K;if(h==="ALL")return K.wallets;p.length?c.excludedIds=p.map(B=>B.id).join(","):_.isArray(l)&&(c.excludedIds=l.join(",")),_.isArray(h)&&(c.excludedIds=[c.excludedIds,h].filter(Boolean).join(",")),j.state.isAuth&&(c.sdks="auth_v1");const{page:d,search:f}=i,{listings:s,total:E}=$t?await tt.getMobileListings(c):await tt.getDesktopListings(c),y=Object.values(s),I=f?"search":"wallets";return K[I]={listings:[...K[I].listings,...y],total:E,page:d??1},{listings:y,total:E}},getWalletImageUrl(i){return tt.getWalletImageUrl(i)},getAssetImageUrl(i){return tt.getAssetImageUrl(i)},resetSearch(){K.search={listings:[],total:0,page:1}}},st=X({open:!1}),bt={state:st,subscribe(i){return rt(st,()=>i(st))},async open(i){return new Promise(c=>{const{isUiLoaded:l,isDataLoaded:h}=j.state;if(j.setWalletConnectUri(i==null?void 0:i.uri),j.setChains(i==null?void 0:i.chains),Ht.reset("ConnectWallet"),l&&h)st.open=!0,c();else{const p=setInterval(()=>{const d=j.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(p),st.open=!0,c())},200)}})},close(){st.open=!1}};var Fe=Object.defineProperty,vt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Vt=(i,c,l)=>c in i?Fe(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,Re=(i,c)=>{for(var l in c||(c={}))Ce.call(c,l)&&Vt(i,l,c[l]);if(vt)for(var l of vt(c))Le.call(c,l)&&Vt(i,l,c[l]);return i};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const ft=X({themeMode:Se()?"dark":"light"}),Kt={state:ft,subscribe(i){return rt(ft,()=>i(ft))},setThemeConfig(i){const{themeMode:c,themeVariables:l}=i;c&&(ft.themeMode=c),l&&(ft.themeVariables=Re({},l))}},et=X({open:!1,message:"",variant:"success"}),_e={state:et,subscribe(i){return rt(et,()=>i(et))},openToast(i,c){et.open=!0,et.message=i,et.variant=c},closeToast(){et.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=zt.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Me{constructor(c){this.openModal=bt.open,this.closeModal=bt.close,this.subscribeModal=bt.subscribe,this.setTheme=Kt.setThemeConfig,Kt.setThemeConfig(c),ut.setConfig(c),this.initUi()}async initUi(){if(typeof window<"u"){await oe(()=>import("./index-7f02df05.js"),["./index-7f02df05.js","./index-aa62d2a2.js","./index-fddf5a6e.css"],import.meta.url);const c=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",c),j.setIsUiLoaded(!0)}}}const We=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Me},Symbol.toStringTag,{value:"Module"}));export{Ie as $,ut as C,De as G,Ht as N,bt as Q,Kt as X,_e as Y,We as a,j as c,_ as i}; + */(function(i){const c=wt,l=Lt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=s,i.SlowBuffer=ct,i.INSPECT_MAX_BYTES=50;const p=2147483647;i.kMaxLength=p,s.TYPED_ARRAY_SUPPORT=d(),!s.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 d(){try{const r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function f(r){if(r>p)throw new RangeError('The value "'+r+'" is invalid for option "size"');const t=new Uint8Array(r);return Object.setPrototypeOf(t,s.prototype),t}function s(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(r)}return E(r,t,e)}s.poolSize=8192;function E(r,t,e){if(typeof r=="string")return L(r,t);if(ArrayBuffer.isView(r))return P(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(v(r,ArrayBuffer)||r&&v(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v(r,SharedArrayBuffer)||r&&v(r.buffer,SharedArrayBuffer)))return T(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return s.from(n,t,e);const o=G(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,t,e){return E(r,t,e)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function y(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function I(r,t,e){return y(r),r<=0?f(r):t!==void 0?typeof e=="string"?f(r).fill(t,e):f(r).fill(t):f(r)}s.alloc=function(r,t,e){return I(r,t,e)};function B(r){return y(r),f(r<0?0:O(r)|0)}s.allocUnsafe=function(r){return B(r)},s.allocUnsafeSlow=function(r){return B(r)};function L(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const e=at(r,t)|0;let n=f(e);const o=n.write(r,t);return o!==e&&(n=n.slice(0,o)),n}function U(r){const t=r.length<0?0:O(r.length)|0,e=f(t);for(let n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return r|0}function ct(r){return+r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==s.prototype},s.compare=function(t,e){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),v(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,o=e.length;for(let u=0,a=Math.min(n,o);uo.length?(s.isBuffer(a)||(a=s.from(a)),a.copy(o,u)):Uint8Array.prototype.set.call(o,a,u);else if(s.isBuffer(a))a.copy(o,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=a.length}return o};function at(r,t){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||v(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return It(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Wt(r).length;default:if(o)return n?-1:It(r).length;t=(""+t).toLowerCase(),o=!0}}s.byteLength=at;function gt(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Jt(this,t,e);case"utf8":case"utf-8":return Y(this,t,e);case"ascii":return Yt(this,t,e);case"latin1":case"binary":return qt(this,t,e);case"base64":return H(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}s.prototype._isBuffer=!0;function k(r,t,e){const n=r[t];r[t]=r[e],r[e]=n}s.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},h&&(s.prototype[h]=s.prototype.inspect),s.prototype.compare=function(t,e,n,o,u){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),u===void 0&&(u=this.length),e<0||n>t.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&e>=n)return 0;if(o>=u)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,u>>>=0,this===t)return 0;let a=u-o,g=n-e;const F=Math.min(a,g),b=this.slice(o,u),C=t.slice(e,n);for(let A=0;A2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,Bt(e)&&(e=o?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(o)return-1;e=r.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),s.isBuffer(t))return t.length===0?-1:Q(r,t,e,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Q(r,[t],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Q(r,t,e,n,o){let u=1,a=r.length,g=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;u=2,a/=2,g/=2,e/=2}function F(C,A){return u===1?C[A]:C.readUInt16BE(A*u)}let b;if(o){let C=-1;for(b=e;ba&&(e=a-g),b=e;b>=0;b--){let C=!0;for(let A=0;Ao&&(n=o)):n=o;const u=t.length;n>u/2&&(n=u/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-e;if((n===void 0||n>u)&&(n=u),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let a=!1;for(;;)switch(o){case"hex":return Et(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(r,t,e){return t===0&&e===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(t,e))}function Y(r,t,e){e=Math.min(r.length,e);const n=[];let o=t;for(;o239?4:u>223?3:u>191?2:1;if(o+g<=e){let F,b,C,A;switch(g){case 1:u<128&&(a=u);break;case 2:F=r[o+1],(F&192)===128&&(A=(u&31)<<6|F&63,A>127&&(a=A));break;case 3:F=r[o+1],b=r[o+2],(F&192)===128&&(b&192)===128&&(A=(u&15)<<12|(F&63)<<6|b&63,A>2047&&(A<55296||A>57343)&&(a=A));break;case 4:F=r[o+1],b=r[o+2],C=r[o+3],(F&192)===128&&(b&192)===128&&(C&192)===128&&(A=(u&15)<<18|(F&63)<<12|(b&63)<<6|C&63,A>65535&&A<1114112&&(a=A))}}a===null?(a=65533,g=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=g}return $(n)}const Z=4096;function $(r){const t=r.length;if(t<=Z)return String.fromCharCode.apply(String,r);let e="",n=0;for(;nn)&&(e=n);let o="";for(let u=t;un&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),ee)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t+--e],u=1;for(;e>0&&(u*=256);)o+=this[t+--e]*u;return o},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(o)+(BigInt(u)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(o)<>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a=u&&(o-=Math.pow(2,8*e)),o},s.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=e,u=1,a=this[t+--o];for(;o>0&&(u*=256);)a+=this[t+--o]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(o)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<>>0,e||R(t,4,this.length),l.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),l.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!1,52,8)};function W(r,t,e,n,o,u){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||tr.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=1,a=0;for(this[e]=t&255;++a>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=n-1,a=1;for(this[e+u]=t&255;--u>=0&&(a*=256);)this[e+u]=t/a&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,255,0),this[e]=t&255,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Rt(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,e}function St(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e+7]=u,u=u>>8,r[e+6]=u,u=u>>8,r[e+5]=u,u=u>>8,r[e+4]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=a,a=a>>8,r[e+2]=a,a=a>>8,r[e+1]=a,a=a>>8,r[e]=a,e+8}s.prototype.writeBigUInt64LE=q(function(t,e=0){return Rt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=q(function(t,e=0){return St(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=0,a=1,g=0;for(this[e]=t&255;++u>0)-g&255;return e+n},s.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=n-1,a=1,g=0;for(this[e+u]=t&255;--u>=0&&(a*=256);)t<0&&g===0&&this[e+u+1]!==0&&(g=1),this[e+u]=(t/a>>0)-g&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},s.prototype.writeBigInt64LE=q(function(t,e=0){return Rt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=q(function(t,e=0){return St(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Mt(r,t,e,n,o,u){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Tt(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,4),l.write(r,t,e,n,23,4),e+4}s.prototype.writeFloatLE=function(t,e,n){return Tt(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return Tt(this,t,e,!1,n)};function Ot(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,8),l.write(r,t,e,n,52,8),e+8}s.prototype.writeDoubleLE=function(t,e,n){return Ot(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return Ot(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,o){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let u;if(typeof t=="number")for(u=e;u2**32?o=Dt(String(e)):typeof e=="bigint"&&(o=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(o=Dt(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Dt(r){let t="",e=r.length;const n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Qt(r,t,e){it(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&<(t,r.length-(e+1))}function _t(r,t,e,n,o,u){if(r>e||r3?t===0||t===BigInt(0)?g=`>= 0${a} and < 2${a} ** ${(u+1)*8}${a}`:g=`>= -(2${a} ** ${(u+1)*8-1}${a}) and < 2 ** ${(u+1)*8-1}${a}`:g=`>= ${t}${a} and <= ${e}${a}`,new nt.ERR_OUT_OF_RANGE("value",g,r)}Qt(n,o,u)}function it(r,t){if(typeof r!="number")throw new nt.ERR_INVALID_ARG_TYPE(t,"number",r)}function lt(r,t,e){throw Math.floor(r)!==r?(it(r,e),new nt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}const Zt=/[^+/0-9A-Za-z-_]/g;function te(r){if(r=r.split("=")[0],r=r.trim().replace(Zt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function It(r,t){t=t||1/0;let e;const n=r.length;let o=null;const u=[];for(let a=0;a55295&&e<57344){if(!o){if(e>56319){(t-=3)>-1&&u.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&u.push(239,191,189);continue}o=e;continue}if(e<56320){(t-=3)>-1&&u.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(t-=3)>-1&&u.push(239,191,189);if(o=null,e<128){if((t-=1)<0)break;u.push(e)}else if(e<2048){if((t-=2)<0)break;u.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;u.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;u.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return u}function ee(r){const t=[];for(let e=0;e>8,o=e%256,u.push(o),u.push(n);return u}function Wt(r){return c.toByteArray(te(r))}function ht(r,t,e,n){let o;for(o=0;o=t.length||o>=r.length);++o)t[o+e]=r[o];return o}function v(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function Bt(r){return r!==r}const ne=function(){const r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){const n=e*16;for(let o=0;o<16;++o)t[n+o]=r[e]+r[o]}return t}();function q(r){return typeof BigInt>"u"?ie:r}function ie(){throw new Error("BigInt not supported")}})(zt);const S=X({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Ht={state:S,subscribe(i){return rt(S,()=>i(S))},push(i,c){i!==S.view&&(S.view=i,c&&(S.data=c),S.history.push(i))},reset(i){S.view=i,S.history=[i]},replace(i){S.history.length>1&&(S.history[S.history.length-1]=i,S.view=i)},goBack(){if(S.history.length>1){S.history.pop();const[i]=S.history.slice(-1);S.view=i}},setData(i){S.data=i}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const i=navigator.userAgent.toLowerCase();return _.isMobile()&&(i.includes("iphone")||i.includes("ipad"))},isHttpUrl(i){return i.startsWith("http://")||i.startsWith("https://")},isArray(i){return Array.isArray(i)&&i.length>0},formatNativeUrl(i,c,l){if(_.isHttpUrl(i))return this.formatUniversalUrl(i,c,l);let h=i;h.includes("://")||(h=i.replaceAll("/","").replaceAll(":",""),h=`${h}://`),h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},formatUniversalUrl(i,c,l){if(!_.isHttpUrl(i))return this.formatNativeUrl(i,c,l);let h=i;h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},async wait(i){return new Promise(c=>{setTimeout(c,i)})},openHref(i,c){window.open(i,c,"noreferrer noopener")},setWalletConnectDeepLink(i,c){try{localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:i,name:c}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(i){try{const[c]=i.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:c,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.5.9")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var i;const c=(i=Ht.state.data)==null?void 0:i.Wallet;if(!c)throw new Error('Missing "Wallet" view data');return c}},xe=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),M=X({enabled:xe,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:M,subscribe(i){return rt(M.events,()=>i(fe(M.events[M.events.length-1])))},initialize(){M.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(M.userSessionId=crypto.randomUUID())},setConnectedWalletId(i){M.connectedWalletId=i},click(i){if(M.enabled){const c={type:"CLICK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},track(i){if(M.enabled){const c={type:"TRACK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},view(i){if(M.enabled){const c={type:"VIEW",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}}},V=X({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),j={state:V,subscribe(i){return rt(V,()=>i(V))},setChains(i){V.chains=i},setWalletConnectUri(i){V.walletConnectUri=i},setIsCustomDesktop(i){V.isCustomDesktop=i},setIsCustomMobile(i){V.isCustomMobile=i},setIsDataLoaded(i){V.isDataLoaded=i},setIsUiLoaded(i){V.isUiLoaded=i},setIsAuth(i){V.isAuth=i}},dt=X({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),ut={state:dt,subscribe(i){return rt(dt,()=>i(dt))},setConfig(i){var c,l;Ie.initialize(),j.setChains(i.chains),j.setIsAuth(Boolean(i.enableAuthMode)),j.setIsCustomMobile(Boolean((c=i.mobileWallets)==null?void 0:c.length)),j.setIsCustomDesktop(Boolean((l=i.desktopWallets)==null?void 0:l.length)),_.setModalVersionInStorage(),Object.assign(dt,i)}},Ct="https://explorer-api.walletconnect.com";async function yt(i,c){const l=new URL(i,Ct);return l.searchParams.append("projectId",ut.state.projectId),Object.entries(c).forEach(([h,p])=>{p&&l.searchParams.append(h,String(p))}),(await fetch(l)).json()}const tt={async getDesktopListings(i){return yt("/w3m/v1/getDesktopListings",i)},async getMobileListings(i){return yt("/w3m/v1/getMobileListings",i)},async getInjectedListings(i){return yt("/w3m/v1/getInjectedListings",i)},async getAllListings(i){return yt("/w3m/v1/getAllListings",i)},getWalletImageUrl(i){return`${Ct}/w3m/v1/getWalletImage/${i}?projectId=${ut.state.projectId}`},getAssetImageUrl(i){return`${Ct}/w3m/v1/getAssetImage/${i}?projectId=${ut.state.projectId}`}};var Be=Object.defineProperty,kt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,jt=(i,c,l)=>c in i?Be(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,be=(i,c)=>{for(var l in c||(c={}))Ae.call(c,l)&&jt(i,l,c[l]);if(kt)for(var l of kt(c))Ue.call(c,l)&&jt(i,l,c[l]);return i};const $t=_.isMobile(),K=X({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),De={state:K,async getRecomendedWallets(){const{explorerRecommendedWalletIds:i,explorerExcludedWalletIds:c}=ut.state;if(i==="NONE"||c==="ALL"&&!i)return K.recomendedWallets;if(_.isArray(i)){const l={recommendedIds:i.join(",")},{listings:h}=await tt.getAllListings(l),p=Object.values(h);p.sort((d,f)=>{const s=i.indexOf(d.id),E=i.indexOf(f.id);return s-E}),K.recomendedWallets=p}else{const{chains:l,isAuth:h}=j.state,p=l==null?void 0:l.join(","),d=_.isArray(c),f={page:1,sdks:h?"auth_v1":void 0,entries:_.RECOMMENDED_WALLET_AMOUNT,chains:p,version:2,excludedIds:d?c.join(","):void 0},{listings:s}=$t?await tt.getMobileListings(f):await tt.getDesktopListings(f);K.recomendedWallets=Object.values(s)}return K.recomendedWallets},async getWallets(i){const c=be({},i),{explorerRecommendedWalletIds:l,explorerExcludedWalletIds:h}=ut.state,{recomendedWallets:p}=K;if(h==="ALL")return K.wallets;p.length?c.excludedIds=p.map(B=>B.id).join(","):_.isArray(l)&&(c.excludedIds=l.join(",")),_.isArray(h)&&(c.excludedIds=[c.excludedIds,h].filter(Boolean).join(",")),j.state.isAuth&&(c.sdks="auth_v1");const{page:d,search:f}=i,{listings:s,total:E}=$t?await tt.getMobileListings(c):await tt.getDesktopListings(c),y=Object.values(s),I=f?"search":"wallets";return K[I]={listings:[...K[I].listings,...y],total:E,page:d??1},{listings:y,total:E}},getWalletImageUrl(i){return tt.getWalletImageUrl(i)},getAssetImageUrl(i){return tt.getAssetImageUrl(i)},resetSearch(){K.search={listings:[],total:0,page:1}}},st=X({open:!1}),bt={state:st,subscribe(i){return rt(st,()=>i(st))},async open(i){return new Promise(c=>{const{isUiLoaded:l,isDataLoaded:h}=j.state;if(j.setWalletConnectUri(i==null?void 0:i.uri),j.setChains(i==null?void 0:i.chains),Ht.reset("ConnectWallet"),l&&h)st.open=!0,c();else{const p=setInterval(()=>{const d=j.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(p),st.open=!0,c())},200)}})},close(){st.open=!1}};var Fe=Object.defineProperty,vt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Vt=(i,c,l)=>c in i?Fe(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,Re=(i,c)=>{for(var l in c||(c={}))Ce.call(c,l)&&Vt(i,l,c[l]);if(vt)for(var l of vt(c))Le.call(c,l)&&Vt(i,l,c[l]);return i};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const ft=X({themeMode:Se()?"dark":"light"}),Kt={state:ft,subscribe(i){return rt(ft,()=>i(ft))},setThemeConfig(i){const{themeMode:c,themeVariables:l}=i;c&&(ft.themeMode=c),l&&(ft.themeVariables=Re({},l))}},et=X({open:!1,message:"",variant:"success"}),_e={state:et,subscribe(i){return rt(et,()=>i(et))},openToast(i,c){et.open=!0,et.message=i,et.variant=c},closeToast(){et.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=zt.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Me{constructor(c){this.openModal=bt.open,this.closeModal=bt.close,this.subscribeModal=bt.subscribe,this.setTheme=Kt.setThemeConfig,Kt.setThemeConfig(c),ut.setConfig(c),this.initUi()}async initUi(){if(typeof window<"u"){await oe(()=>import("./index-6a03f4bb.js"),["./index-6a03f4bb.js","./index-d18dd62c.js","./index-fddf5a6e.css"],import.meta.url);const c=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",c),j.setIsUiLoaded(!0)}}}const We=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Me},Symbol.toStringTag,{value:"Module"}));export{Ie as $,ut as C,De as G,Ht as N,bt as Q,Kt as X,_e as Y,We as a,j as c,_ as i}; diff --git a/assets/index-7f02df05.js b/assets/index-6a03f4bb.js similarity index 99% rename from assets/index-7f02df05.js rename to assets/index-6a03f4bb.js index d96d3a7e..80e33c67 100644 --- a/assets/index-7f02df05.js +++ b/assets/index-6a03f4bb.js @@ -1,4 +1,4 @@ -import{X as _t,Q as ce,N,G as U,i as E,Y as ot,$ as Do,c as q,C as gt}from"./index-123c87d4.js";import"./index-aa62d2a2.js";function Uo(e,t){e.indexOf(t)===-1&&e.push(t)}const no=(e,t,r)=>Math.min(Math.max(r,e),t),H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),jo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Wo(e,t){return Et(e)?e[jo(0,e.length,t)]:e}const io=(e,t,r)=>-r*e+r*t+e,so=()=>{},it=e=>e,wr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function ao(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=wr(0,t,n);e.push(io(r,1,o))}}function Ho(e){const t=[0];return ao(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&ao(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&Boolean(e.createAnimation),Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},co=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zo=1e-7,Vo=12;function Ko(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=co(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Zo&&++aKo(i,0,1,e,r);return i=>i===0||i===1?i:co(o(i),t,n)}const qo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return no(0,1,o/e)},_r={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Yo=/\((.*?)\)/;function Or(e){if(Ot(e))return e;if(lo(e))return Ht(...e);if(_r[e])return _r[e];if(e.startsWith("steps")){const t=Yo.exec(e);if(t){const r=t[1].split(",");return qo(parseFloat(r[0]),r[1].trim())}}return it}class ho{constructor(t,r=[0,1],{easing:n,duration:o=H.duration,delay:i=H.delay,endDelay:s=H.endDelay,repeat:a=H.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((b,h)=>{this.resolve=b,this.reject=h}),n=n||H.easing,sr(n)){const b=n.createAnimation(r);n=b.easing,r=b.keyframes||r,o=b.duration||o}this.repeat=a,this.easing=Et(n)?it:Or(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(Or):it);this.tick=b=>{var h;i=i;let u=0;this.pauseTime!==void 0?u=this.pauseTime:u=(b-this.startTime)*this.rate,this.t=u,u/=1e3,u=Math.max(u-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(u=this.totalDuration);const p=u/this.duration;let g=Math.floor(p),$=p%1;!$&&p>=1&&($=1),$===1&&g--;const f=g%2;(c==="reverse"||c==="alternate"&&f||c==="alternate-reverse"&&!f)&&($=1-$);const y=u>=this.totalDuration?1:Math.min($,1),v=d(this.easing(y));t(v),this.pauseTime===void 0&&(this.playState==="finished"||u>=this.totalDuration+s)?(this.playState="finished",(h=this.resolve)===null||h===void 0||h.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function uo(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Jo=["","X","Y","Z"],Xo=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},kr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:kr,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:kr},Zt=new Map,vr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(vr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),mo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=uo(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${vr(t)}))`,ar=e=>e.startsWith("--"),Ir=new Set;function an(e){if(!Ir.has(e)){Ir.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Tr={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Ee({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Tr)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Tr[e]()),Ae[e]);const ln=.015,cn=(e,t)=>{let r="";const n=Math.round(t/ln);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${cn(e,t)})`:H.easing:lo(e)?dn(e):e,dn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function hn(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),mo(e)?vr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function go(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function mn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Fo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function gn(){return window.__MOTION_DEV_TOOLS_RECORD}function fn(e,t,r,n={},o){const i=gn(),s=n.record!==!1&&i;let a,{duration:l=H.duration,delay:c=H.delay,endDelay:d=H.endDelay,repeat:b=H.repeat,easing:h=H.easing,persist:u=!1,direction:p,offset:g,allowWebkitAcceleration:$=!1}=n;const f=uo(e),y=mo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return go(k.animation,!(sr(h)&&k.generator)&&n.record!==!1),()=>{const R=()=>{var P,F;return(F=(P=Xt.get(e,w))!==null&&P!==void 0?P:I==null?void 0:I.initialValue)!==null&&F!==void 0?F:0};let T=hn(un(r),R);const z=mn(T,I);if(sr(h)){const P=h.createAnimation(T,t!=="opacity",R,w,k);h=P.easing,T=P.keyframes||T,l=P.duration||l}if(ar(w)&&(Ct.cssRegisterProperty()?an(w):v=!1),y&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){I&&(T=T.map(Z=>he(Z)?I.toDefaultUnit(Z):Z)),T.length===1&&(!Ct.partialKeyframes()||s)&&T.unshift(R());const P={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Pr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Pr(Z,l)):void 0},P),a.finished||(a.finished=new Promise((Z,V)=>{a.onfinish=Z,a.oncancel=V}));const F=T[T.length-1];a.finished.then(()=>{u||(Xt.set(e,w,F),a.cancel())}).catch(so),$||(a.playbackRate=1.000001)}else if(o&&y)T=T.map(P=>typeof P=="string"?parseFloat(P):P),T.length===1&&T.unshift(parseFloat(R())),a=new o(P=>{Xt.set(e,w,z?z(P):P)},T,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const P=T[T.length-1];Xt.set(e,w,I&&he(P)?I.toDefaultUnit(P):P)}return s&&i(e,t,T,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),k.setAnimation(a),a}}const pn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function wn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const vn=e=>e(),fo=(e,t,r=H.duration)=>new Proxy({animations:e.map(vn).filter(Boolean),duration:r,options:t},yn),bn=e=>e.animations[0],yn={get:(e,t)=>{const r=bn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(xn)).catch(so)),e.finished;case"stop":return()=>{e.animations.forEach(n=>go(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"currentTime":case"playbackRate":for(let n=0;ne.finished;function $n(e,t,r){return Ot(e)?e(t,r):e}function Cn(e){return function(r,n,o={}){r=wn(r);const i=r.length,s=[];for(let a=0;aMath.min(Math.max(r,e),t),H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),jo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Wo(e,t){return Et(e)?e[jo(0,e.length,t)]:e}const io=(e,t,r)=>-r*e+r*t+e,so=()=>{},it=e=>e,wr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function ao(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=wr(0,t,n);e.push(io(r,1,o))}}function Ho(e){const t=[0];return ao(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&ao(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&Boolean(e.createAnimation),Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},co=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zo=1e-7,Vo=12;function Ko(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=co(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Zo&&++aKo(i,0,1,e,r);return i=>i===0||i===1?i:co(o(i),t,n)}const qo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return no(0,1,o/e)},_r={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Yo=/\((.*?)\)/;function Or(e){if(Ot(e))return e;if(lo(e))return Ht(...e);if(_r[e])return _r[e];if(e.startsWith("steps")){const t=Yo.exec(e);if(t){const r=t[1].split(",");return qo(parseFloat(r[0]),r[1].trim())}}return it}class ho{constructor(t,r=[0,1],{easing:n,duration:o=H.duration,delay:i=H.delay,endDelay:s=H.endDelay,repeat:a=H.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((b,h)=>{this.resolve=b,this.reject=h}),n=n||H.easing,sr(n)){const b=n.createAnimation(r);n=b.easing,r=b.keyframes||r,o=b.duration||o}this.repeat=a,this.easing=Et(n)?it:Or(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(Or):it);this.tick=b=>{var h;i=i;let u=0;this.pauseTime!==void 0?u=this.pauseTime:u=(b-this.startTime)*this.rate,this.t=u,u/=1e3,u=Math.max(u-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(u=this.totalDuration);const p=u/this.duration;let g=Math.floor(p),$=p%1;!$&&p>=1&&($=1),$===1&&g--;const f=g%2;(c==="reverse"||c==="alternate"&&f||c==="alternate-reverse"&&!f)&&($=1-$);const y=u>=this.totalDuration?1:Math.min($,1),v=d(this.easing(y));t(v),this.pauseTime===void 0&&(this.playState==="finished"||u>=this.totalDuration+s)?(this.playState="finished",(h=this.resolve)===null||h===void 0||h.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function uo(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Jo=["","X","Y","Z"],Xo=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},kr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:kr,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:kr},Zt=new Map,vr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(vr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),mo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=uo(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${vr(t)}))`,ar=e=>e.startsWith("--"),Ir=new Set;function an(e){if(!Ir.has(e)){Ir.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Tr={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Ee({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Tr)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Tr[e]()),Ae[e]);const ln=.015,cn=(e,t)=>{let r="";const n=Math.round(t/ln);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${cn(e,t)})`:H.easing:lo(e)?dn(e):e,dn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function hn(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),mo(e)?vr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function go(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function mn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Fo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function gn(){return window.__MOTION_DEV_TOOLS_RECORD}function fn(e,t,r,n={},o){const i=gn(),s=n.record!==!1&&i;let a,{duration:l=H.duration,delay:c=H.delay,endDelay:d=H.endDelay,repeat:b=H.repeat,easing:h=H.easing,persist:u=!1,direction:p,offset:g,allowWebkitAcceleration:$=!1}=n;const f=uo(e),y=mo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return go(k.animation,!(sr(h)&&k.generator)&&n.record!==!1),()=>{const R=()=>{var P,F;return(F=(P=Xt.get(e,w))!==null&&P!==void 0?P:I==null?void 0:I.initialValue)!==null&&F!==void 0?F:0};let T=hn(un(r),R);const z=mn(T,I);if(sr(h)){const P=h.createAnimation(T,t!=="opacity",R,w,k);h=P.easing,T=P.keyframes||T,l=P.duration||l}if(ar(w)&&(Ct.cssRegisterProperty()?an(w):v=!1),y&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){I&&(T=T.map(Z=>he(Z)?I.toDefaultUnit(Z):Z)),T.length===1&&(!Ct.partialKeyframes()||s)&&T.unshift(R());const P={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Pr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Pr(Z,l)):void 0},P),a.finished||(a.finished=new Promise((Z,V)=>{a.onfinish=Z,a.oncancel=V}));const F=T[T.length-1];a.finished.then(()=>{u||(Xt.set(e,w,F),a.cancel())}).catch(so),$||(a.playbackRate=1.000001)}else if(o&&y)T=T.map(P=>typeof P=="string"?parseFloat(P):P),T.length===1&&T.unshift(parseFloat(R())),a=new o(P=>{Xt.set(e,w,z?z(P):P)},T,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const P=T[T.length-1];Xt.set(e,w,I&&he(P)?I.toDefaultUnit(P):P)}return s&&i(e,t,T,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),k.setAnimation(a),a}}const pn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function wn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const vn=e=>e(),fo=(e,t,r=H.duration)=>new Proxy({animations:e.map(vn).filter(Boolean),duration:r,options:t},yn),bn=e=>e.animations[0],yn={get:(e,t)=>{const r=bn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(xn)).catch(so)),e.finished;case"stop":return()=>{e.animations.forEach(n=>go(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"currentTime":case"playbackRate":for(let n=0;ne.finished;function $n(e,t,r){return Ot(e)?e(t,r):e}function Cn(e){return function(r,n,o={}){r=wn(r);const i=r.length,s=[];for(let a=0;a>>1,A=_[D];if(0>>1;Ds(O,F))qs(z,O)?(_[D]=z,_[q]=F,D=q):(_[D]=O,_[G]=F,D=G);else if(qs(z,F))_[D]=z,_[q]=F,D=q;else break e}}return I}function s(_,I){var F=_.sortIndex-I.sortIndex;return F!==0?F:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,v=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=_)n(c),I.sortIndex=I.expirationTime,e(l,I);else break;I=r(c)}}function E(_){if(y=!1,w(_),!v)if(r(l)!==null)v=!0,R(k);else{var I=r(c);I!==null&&M(E,I.startTime-_)}}function k(_,I){v=!1,y&&(y=!1,b(T),T=-1),h=!0;var F=d;try{for(w(I),u=r(l);u!==null&&(!(u.expirationTime>I)||_&&!U());){var D=u.callback;if(typeof D=="function"){u.callback=null,d=u.priorityLevel;var A=D(u.expirationTime<=I);I=t.unstable_now(),typeof A=="function"?u.callback=A:u===r(l)&&n(l),w(I)}else n(l);u=r(l)}if(u!==null)var j=!0;else{var G=r(c);G!==null&&M(E,G.startTime-I),j=!1}return j}finally{u=null,d=F,h=!1}}var $=!1,x=null,T=-1,B=5,L=-1;function U(){return!(t.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(_){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var F=d;d=I;try{return _()}finally{d=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=d;d=_;try{return I()}finally{d=F}},t.unstable_scheduleCallback=function(_,I,F){var D=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0D?(_.sortIndex=F,e(c,_),r(l)===null&&_===r(c)&&(y?(b(T),T=-1):y=!0,M(E,F-D))):(_.sortIndex=A,e(l,_),v||h||(v=!0,R(k))),_},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(_){var I=d;return function(){var F=d;d=I;try{return _.apply(this,arguments)}finally{d=F}}}})(DN);(function(t){t.exports=DN})(AZ);/** + */(function(t){function e(_,I){var F=_.length;_.push(I);e:for(;0>>1,$=_[D];if(0>>1;Ds(O,F))q<$&&0>s(z,O)?(_[D]=z,_[q]=F,D=q):(_[D]=O,_[G]=F,D=G);else if(q<$&&0>s(z,F))_[D]=z,_[q]=F,D=q;else break e}}return I}function s(_,I){var F=_.sortIndex-I.sortIndex;return F!==0?F:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,v=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=_)n(c),I.sortIndex=I.expirationTime,e(l,I);else break;I=r(c)}}function E(_){if(y=!1,w(_),!v)if(r(l)!==null)v=!0,R(k);else{var I=r(c);I!==null&&M(E,I.startTime-_)}}function k(_,I){v=!1,y&&(y=!1,b(T),T=-1),h=!0;var F=d;try{for(w(I),u=r(l);u!==null&&(!(u.expirationTime>I)||_&&!U());){var D=u.callback;if(typeof D=="function"){u.callback=null,d=u.priorityLevel;var $=D(u.expirationTime<=I);I=t.unstable_now(),typeof $=="function"?u.callback=$:u===r(l)&&n(l),w(I)}else n(l);u=r(l)}if(u!==null)var j=!0;else{var G=r(c);G!==null&&M(E,G.startTime-I),j=!1}return j}finally{u=null,d=F,h=!1}}var A=!1,x=null,T=-1,B=5,L=-1;function U(){return!(t.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(_){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var F=d;d=I;try{return _()}finally{d=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=d;d=_;try{return I()}finally{d=F}},t.unstable_scheduleCallback=function(_,I,F){var D=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0D?(_.sortIndex=F,e(c,_),r(l)===null&&_===r(c)&&(y?(b(T),T=-1):y=!0,M(E,F-D))):(_.sortIndex=$,e(l,_),v||h||(v=!0,R(k))),_},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(_){var I=d;return function(){var F=d;d=I;try{return _.apply(this,arguments)}finally{d=F}}}})(DN);(function(t){t.exports=DN})(AZ);/** * @license React * react-dom.production.min.js * @@ -34,10 +34,10 @@ function eZ(t,e){for(var r=0;ra||s[o]!==i[a]){var l=` -`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{dC=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?T1(t):""}function IZ(t){switch(t.tag){case 5:return T1(t.type);case 16:return T1("Lazy");case 13:return T1("Suspense");case 19:return T1("SuspenseList");case 0:case 2:case 15:return t=hC(t.type,!1),t;case 11:return t=hC(t.type.render,!1),t;case 1:return t=hC(t.type,!0),t;default:return""}}function q5(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Tu:return"Fragment";case Pu:return"Portal";case U5:return"Profiler";case i8:return"StrictMode";case z5:return"Suspense";case V5:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case FN:return(t.displayName||"Context")+".Consumer";case jN:return(t._context.displayName||"Context")+".Provider";case o8:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case a8:return e=t.displayName||null,e!==null?e:q5(t.type)||"Memo";case el:e=t._payload,t=t._init;try{return q5(t(e))}catch{}}return null}function OZ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q5(e);case 8:return e===i8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Dl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function UN(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function MZ(t){var e=UN(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Y0(t){t._valueTracker||(t._valueTracker=MZ(t))}function zN(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=UN(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function og(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function W5(t,e){var r=e.checked;return dr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function bP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Dl(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function VN(t,e){e=e.checked,e!=null&&s8(t,"checked",e,!1)}function H5(t,e){VN(t,e);var r=Dl(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?G5(t,e.type,r):e.hasOwnProperty("defaultValue")&&G5(t,e.type,Dl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function G5(t,e,r){(e!=="number"||og(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var R1=Array.isArray;function td(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=J0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ov(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var B1={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},DZ=["Webkit","ms","Moz","O"];Object.keys(B1).forEach(function(t){DZ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),B1[e]=B1[t]})});function GN(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||B1.hasOwnProperty(t)&&B1[t]?(""+e).trim():e+"px"}function KN(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=GN(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var NZ=dr({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 Y5(t,e){if(e){if(NZ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(le(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(le(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(le(61))}if(e.style!=null&&typeof e.style!="object")throw Error(le(62))}}function J5(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var X5=null;function l8(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z5=null,rd=null,nd=null;function EP(t){if(t=i0(t)){if(typeof Z5!="function")throw Error(le(280));var e=t.stateNode;e&&(e=$2(e),Z5(t.stateNode,t.type,e))}}function QN(t){rd?nd?nd.push(t):nd=[t]:rd=t}function YN(){if(rd){var t=rd,e=nd;if(nd=rd=null,EP(t),e)for(t=0;t>>=0,t===0?32:31-(GZ(t)/KZ|0)|0}var X0=64,Z0=4194304;function I1(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fg(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=I1(a):(i&=o,i!==0&&(n=I1(i)))}else o=r&~s,o!==0?n=I1(o):i!==0&&(n=I1(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function n0(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Oi(e),t[e]=r}function XZ(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=z1),IP=String.fromCharCode(32),OP=!1;function mL(t,e){switch(t){case"keyup":return $ee.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ru=!1;function _ee(t,e){switch(t){case"compositionend":return pL(e);case"keypress":return e.which!==32?null:(OP=!0,IP);case"textInput":return t=e.data,t===IP&&OP?null:t;default:return null}}function Pee(t,e){if(Ru)return t==="compositionend"||!m8&&mL(t,e)?(t=vL(),dp=h8=fl=null,Ru=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=LP(r)}}function xL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?xL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function CL(){for(var t=window,e=og();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=og(t.document)}return e}function p8(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function jee(t){var e=CL(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&xL(r.ownerDocument.documentElement,r)){if(n!==null&&p8(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=jP(r,i);var o=jP(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Iu=null,i6=null,q1=null,o6=!1;function FP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;o6||Iu==null||Iu!==og(n)||(n=Iu,"selectionStart"in n&&p8(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),q1&&Fv(q1,n)||(q1=n,n=hg(i6,"onSelect"),0Du||(t.current=d6[Du],d6[Du]=null,Du--)}function bt(t,e){Du++,d6[Du]=t.current,t.current=e}var Nl={},_n=nc(Nl),is=nc(!1),hf=Nl;function $d(t,e){var r=t.type.contextTypes;if(!r)return Nl;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function os(t){return t=t.childContextTypes,t!=null}function yg(){Wt(is),Wt(_n)}function HP(t,e,r){if(_n.current!==Nl)throw Error(le(168));bt(_n,e),bt(is,r)}function RL(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(le(108,OZ(t)||"Unknown",s));return dr({},r,n)}function mg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Nl,hf=_n.current,bt(_n,t),bt(is,is.current),!0}function GP(t,e,r){var n=t.stateNode;if(!n)throw Error(le(169));r?(t=RL(t,e,hf),n.__reactInternalMemoizedMergedChildContext=t,Wt(is),Wt(_n),bt(_n,t)):Wt(is),bt(is,r)}var Qo=null,A2=!1,AC=!1;function IL(t){Qo===null?Qo=[t]:Qo.push(t)}function Yee(t){A2=!0,IL(t)}function sc(){if(!AC&&Qo!==null){AC=!0;var t=0,e=ft;try{var r=Qo;for(ft=1;t>=o,s-=o,ea=1<<32-Oi(e)+s|r<T?(B=x,x=null):B=x.sibling;var L=d(b,x,w[T],E);if(L===null){x===null&&(x=B);break}t&&x&&L.alternate===null&&e(b,x),p=i(L,p,T),$===null?k=L:$.sibling=L,$=L,x=B}if(T===w.length)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;TT?(B=x,x=null):B=x.sibling;var U=d(b,x,L.value,E);if(U===null){x===null&&(x=B);break}t&&x&&U.alternate===null&&e(b,x),p=i(U,p,T),$===null?k=U:$.sibling=U,$=U,x=B}if(L.done)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;!L.done;T++,L=w.next())L=u(b,L.value,E),L!==null&&(p=i(L,p,T),$===null?k=L:$.sibling=L,$=L);return tr&&Rc(b,T),k}for(x=n(b,x);!L.done;T++,L=w.next())L=h(x,b,T,L.value,E),L!==null&&(t&&L.alternate!==null&&x.delete(L.key===null?T:L.key),p=i(L,p,T),$===null?k=L:$.sibling=L,$=L);return t&&x.forEach(function(V){return e(b,V)}),tr&&Rc(b,T),k}function g(b,p,w,E){if(typeof w=="object"&&w!==null&&w.type===Tu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Q0:e:{for(var k=w.key,$=p;$!==null;){if($.key===k){if(k=w.type,k===Tu){if($.tag===7){r(b,$.sibling),p=s($,w.props.children),p.return=b,b=p;break e}}else if($.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===el&&eT(k)===$.type){r(b,$.sibling),p=s($,w.props),p.ref=i1(b,$,w),p.return=b,b=p;break e}r(b,$);break}else e(b,$);$=$.sibling}w.type===Tu?(p=rf(w.props.children,b.mode,E,w.key),p.return=b,b=p):(E=wp(w.type,w.key,w.props,null,b.mode,E),E.ref=i1(b,p,w),E.return=b,b=E)}return o(b);case Pu:e:{for($=w.key;p!==null;){if(p.key===$)if(p.tag===4&&p.stateNode.containerInfo===w.containerInfo&&p.stateNode.implementation===w.implementation){r(b,p.sibling),p=s(p,w.children||[]),p.return=b,b=p;break e}else{r(b,p);break}else e(b,p);p=p.sibling}p=DC(w,b.mode,E),p.return=b,b=p}return o(b);case el:return $=w._init,g(b,p,$(w._payload),E)}if(R1(w))return v(b,p,w,E);if(e1(w))return y(b,p,w,E);om(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,p!==null&&p.tag===6?(r(b,p.sibling),p=s(p,w),p.return=b,b=p):(r(b,p),p=MC(w,b.mode,E),p.return=b,b=p),o(b)):r(b,p)}return g}var _d=BL(!0),UL=BL(!1),o0={},xo=nc(o0),Vv=nc(o0),qv=nc(o0);function Kc(t){if(t===o0)throw Error(le(174));return t}function $8(t,e){switch(bt(qv,e),bt(Vv,t),bt(xo,o0),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Q5(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Q5(e,t)}Wt(xo),bt(xo,e)}function Pd(){Wt(xo),Wt(Vv),Wt(qv)}function zL(t){Kc(qv.current);var e=Kc(xo.current),r=Q5(e,t.type);e!==r&&(bt(Vv,t),bt(xo,r))}function A8(t){Vv.current===t&&(Wt(xo),Wt(Vv))}var or=nc(0);function Cg(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _C=[];function _8(){for(var t=0;t<_C.length;t++)_C[t]._workInProgressVersionPrimary=null;_C.length=0}var yp=_a.ReactCurrentDispatcher,PC=_a.ReactCurrentBatchConfig,yf=0,ur=null,Vr=null,Jr=null,Eg=!1,W1=!1,Wv=0,Xee=0;function yn(){throw Error(le(321))}function P8(t,e){if(e===null)return!1;for(var r=0;rr?r:4,t(!0);var n=PC.transition;PC.transition={};try{t(!1),e()}finally{ft=r,PC.transition=n}}function sj(){return ti().memoizedState}function ete(t,e,r){var n=kl(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ij(t))oj(e,r);else if(r=NL(t,e,r,n),r!==null){var s=Un();Mi(r,t,n,s),aj(r,e,n)}}function tte(t,e,r){var n=kl(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ij(t))oj(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Bi(a,o)){var l=e.interleaved;l===null?(s.next=s,S8(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=NL(t,e,s,n),r!==null&&(s=Un(),Mi(r,t,n,s),aj(r,e,n))}}function ij(t){var e=t.alternate;return t===ur||e!==null&&e===ur}function oj(t,e){W1=Eg=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function aj(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,f8(t,r)}}var Sg={readContext:ei,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},rte={readContext:ei,useCallback:function(t,e){return ro().memoizedState=[t,e===void 0?null:e],t},useContext:ei,useEffect:rT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,mp(4194308,4,ZL.bind(null,e,t),r)},useLayoutEffect:function(t,e){return mp(4194308,4,t,e)},useInsertionEffect:function(t,e){return mp(4,2,t,e)},useMemo:function(t,e){var r=ro();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ro();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=ete.bind(null,ur,t),[n.memoizedState,t]},useRef:function(t){var e=ro();return t={current:t},e.memoizedState=t},useState:tT,useDebugValue:O8,useDeferredValue:function(t){return ro().memoizedState=t},useTransition:function(){var t=tT(!1),e=t[0];return t=Zee.bind(null,t[1]),ro().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ur,s=ro();if(tr){if(r===void 0)throw Error(le(407));r=r()}else{if(r=e(),Zr===null)throw Error(le(349));yf&30||WL(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,rT(GL.bind(null,n,i,t),[t]),n.flags|=2048,Gv(9,HL.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=ro(),e=Zr.identifierPrefix;if(tr){var r=ta,n=ea;r=(n&~(1<<32-Oi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Wv++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{dC=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?T1(t):""}function IZ(t){switch(t.tag){case 5:return T1(t.type);case 16:return T1("Lazy");case 13:return T1("Suspense");case 19:return T1("SuspenseList");case 0:case 2:case 15:return t=hC(t.type,!1),t;case 11:return t=hC(t.type.render,!1),t;case 1:return t=hC(t.type,!0),t;default:return""}}function q5(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Tu:return"Fragment";case Pu:return"Portal";case U5:return"Profiler";case i8:return"StrictMode";case z5:return"Suspense";case V5:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case FN:return(t.displayName||"Context")+".Consumer";case jN:return(t._context.displayName||"Context")+".Provider";case o8:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case a8:return e=t.displayName||null,e!==null?e:q5(t.type)||"Memo";case el:e=t._payload,t=t._init;try{return q5(t(e))}catch{}}return null}function OZ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q5(e);case 8:return e===i8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Dl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function UN(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function MZ(t){var e=UN(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Y0(t){t._valueTracker||(t._valueTracker=MZ(t))}function zN(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=UN(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function og(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function W5(t,e){var r=e.checked;return dr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function bP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Dl(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function VN(t,e){e=e.checked,e!=null&&s8(t,"checked",e,!1)}function H5(t,e){VN(t,e);var r=Dl(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?G5(t,e.type,r):e.hasOwnProperty("defaultValue")&&G5(t,e.type,Dl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function G5(t,e,r){(e!=="number"||og(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var R1=Array.isArray;function td(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=J0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ov(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var B1={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},DZ=["Webkit","ms","Moz","O"];Object.keys(B1).forEach(function(t){DZ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),B1[e]=B1[t]})});function GN(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||B1.hasOwnProperty(t)&&B1[t]?(""+e).trim():e+"px"}function KN(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=GN(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var NZ=dr({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 Y5(t,e){if(e){if(NZ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(le(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(le(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(le(61))}if(e.style!=null&&typeof e.style!="object")throw Error(le(62))}}function J5(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var X5=null;function l8(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z5=null,rd=null,nd=null;function EP(t){if(t=i0(t)){if(typeof Z5!="function")throw Error(le(280));var e=t.stateNode;e&&(e=$2(e),Z5(t.stateNode,t.type,e))}}function QN(t){rd?nd?nd.push(t):nd=[t]:rd=t}function YN(){if(rd){var t=rd,e=nd;if(nd=rd=null,EP(t),e)for(t=0;t>>=0,t===0?32:31-(GZ(t)/KZ|0)|0}var X0=64,Z0=4194304;function I1(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fg(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=I1(a):(i&=o,i!==0&&(n=I1(i)))}else o=r&~s,o!==0?n=I1(o):i!==0&&(n=I1(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function n0(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Oi(e),t[e]=r}function XZ(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=z1),IP=String.fromCharCode(32),OP=!1;function mL(t,e){switch(t){case"keyup":return $ee.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ru=!1;function _ee(t,e){switch(t){case"compositionend":return pL(e);case"keypress":return e.which!==32?null:(OP=!0,IP);case"textInput":return t=e.data,t===IP&&OP?null:t;default:return null}}function Pee(t,e){if(Ru)return t==="compositionend"||!m8&&mL(t,e)?(t=vL(),dp=h8=fl=null,Ru=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=LP(r)}}function xL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?xL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function CL(){for(var t=window,e=og();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=og(t.document)}return e}function p8(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function jee(t){var e=CL(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&xL(r.ownerDocument.documentElement,r)){if(n!==null&&p8(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=jP(r,i);var o=jP(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Iu=null,i6=null,q1=null,o6=!1;function FP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;o6||Iu==null||Iu!==og(n)||(n=Iu,"selectionStart"in n&&p8(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),q1&&Fv(q1,n)||(q1=n,n=hg(i6,"onSelect"),0Du||(t.current=d6[Du],d6[Du]=null,Du--)}function bt(t,e){Du++,d6[Du]=t.current,t.current=e}var Nl={},_n=nc(Nl),is=nc(!1),hf=Nl;function $d(t,e){var r=t.type.contextTypes;if(!r)return Nl;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function os(t){return t=t.childContextTypes,t!=null}function yg(){Wt(is),Wt(_n)}function HP(t,e,r){if(_n.current!==Nl)throw Error(le(168));bt(_n,e),bt(is,r)}function RL(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(le(108,OZ(t)||"Unknown",s));return dr({},r,n)}function mg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Nl,hf=_n.current,bt(_n,t),bt(is,is.current),!0}function GP(t,e,r){var n=t.stateNode;if(!n)throw Error(le(169));r?(t=RL(t,e,hf),n.__reactInternalMemoizedMergedChildContext=t,Wt(is),Wt(_n),bt(_n,t)):Wt(is),bt(is,r)}var Qo=null,A2=!1,AC=!1;function IL(t){Qo===null?Qo=[t]:Qo.push(t)}function Yee(t){A2=!0,IL(t)}function sc(){if(!AC&&Qo!==null){AC=!0;var t=0,e=ft;try{var r=Qo;for(ft=1;t>=o,s-=o,ea=1<<32-Oi(e)+s|r<T?(B=x,x=null):B=x.sibling;var L=d(b,x,w[T],E);if(L===null){x===null&&(x=B);break}t&&x&&L.alternate===null&&e(b,x),p=i(L,p,T),A===null?k=L:A.sibling=L,A=L,x=B}if(T===w.length)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;TT?(B=x,x=null):B=x.sibling;var U=d(b,x,L.value,E);if(U===null){x===null&&(x=B);break}t&&x&&U.alternate===null&&e(b,x),p=i(U,p,T),A===null?k=U:A.sibling=U,A=U,x=B}if(L.done)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;!L.done;T++,L=w.next())L=u(b,L.value,E),L!==null&&(p=i(L,p,T),A===null?k=L:A.sibling=L,A=L);return tr&&Rc(b,T),k}for(x=n(b,x);!L.done;T++,L=w.next())L=h(x,b,T,L.value,E),L!==null&&(t&&L.alternate!==null&&x.delete(L.key===null?T:L.key),p=i(L,p,T),A===null?k=L:A.sibling=L,A=L);return t&&x.forEach(function(V){return e(b,V)}),tr&&Rc(b,T),k}function g(b,p,w,E){if(typeof w=="object"&&w!==null&&w.type===Tu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Q0:e:{for(var k=w.key,A=p;A!==null;){if(A.key===k){if(k=w.type,k===Tu){if(A.tag===7){r(b,A.sibling),p=s(A,w.props.children),p.return=b,b=p;break e}}else if(A.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===el&&eT(k)===A.type){r(b,A.sibling),p=s(A,w.props),p.ref=i1(b,A,w),p.return=b,b=p;break e}r(b,A);break}else e(b,A);A=A.sibling}w.type===Tu?(p=rf(w.props.children,b.mode,E,w.key),p.return=b,b=p):(E=wp(w.type,w.key,w.props,null,b.mode,E),E.ref=i1(b,p,w),E.return=b,b=E)}return o(b);case Pu:e:{for(A=w.key;p!==null;){if(p.key===A)if(p.tag===4&&p.stateNode.containerInfo===w.containerInfo&&p.stateNode.implementation===w.implementation){r(b,p.sibling),p=s(p,w.children||[]),p.return=b,b=p;break e}else{r(b,p);break}else e(b,p);p=p.sibling}p=DC(w,b.mode,E),p.return=b,b=p}return o(b);case el:return A=w._init,g(b,p,A(w._payload),E)}if(R1(w))return v(b,p,w,E);if(e1(w))return y(b,p,w,E);om(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,p!==null&&p.tag===6?(r(b,p.sibling),p=s(p,w),p.return=b,b=p):(r(b,p),p=MC(w,b.mode,E),p.return=b,b=p),o(b)):r(b,p)}return g}var _d=BL(!0),UL=BL(!1),o0={},wo=nc(o0),Vv=nc(o0),qv=nc(o0);function Kc(t){if(t===o0)throw Error(le(174));return t}function $8(t,e){switch(bt(qv,e),bt(Vv,t),bt(wo,o0),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Q5(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Q5(e,t)}Wt(wo),bt(wo,e)}function Pd(){Wt(wo),Wt(Vv),Wt(qv)}function zL(t){Kc(qv.current);var e=Kc(wo.current),r=Q5(e,t.type);e!==r&&(bt(Vv,t),bt(wo,r))}function A8(t){Vv.current===t&&(Wt(wo),Wt(Vv))}var or=nc(0);function Cg(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _C=[];function _8(){for(var t=0;t<_C.length;t++)_C[t]._workInProgressVersionPrimary=null;_C.length=0}var yp=_a.ReactCurrentDispatcher,PC=_a.ReactCurrentBatchConfig,yf=0,ur=null,Vr=null,Jr=null,Eg=!1,W1=!1,Wv=0,Xee=0;function yn(){throw Error(le(321))}function P8(t,e){if(e===null)return!1;for(var r=0;rr?r:4,t(!0);var n=PC.transition;PC.transition={};try{t(!1),e()}finally{ft=r,PC.transition=n}}function sj(){return ti().memoizedState}function ete(t,e,r){var n=kl(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ij(t))oj(e,r);else if(r=NL(t,e,r,n),r!==null){var s=Un();Mi(r,t,n,s),aj(r,e,n)}}function tte(t,e,r){var n=kl(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ij(t))oj(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Fi(a,o)){var l=e.interleaved;l===null?(s.next=s,S8(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=NL(t,e,s,n),r!==null&&(s=Un(),Mi(r,t,n,s),aj(r,e,n))}}function ij(t){var e=t.alternate;return t===ur||e!==null&&e===ur}function oj(t,e){W1=Eg=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function aj(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,f8(t,r)}}var Sg={readContext:ei,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},rte={readContext:ei,useCallback:function(t,e){return to().memoizedState=[t,e===void 0?null:e],t},useContext:ei,useEffect:rT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,mp(4194308,4,ZL.bind(null,e,t),r)},useLayoutEffect:function(t,e){return mp(4194308,4,t,e)},useInsertionEffect:function(t,e){return mp(4,2,t,e)},useMemo:function(t,e){var r=to();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=to();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=ete.bind(null,ur,t),[n.memoizedState,t]},useRef:function(t){var e=to();return t={current:t},e.memoizedState=t},useState:tT,useDebugValue:O8,useDeferredValue:function(t){return to().memoizedState=t},useTransition:function(){var t=tT(!1),e=t[0];return t=Zee.bind(null,t[1]),to().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ur,s=to();if(tr){if(r===void 0)throw Error(le(407));r=r()}else{if(r=e(),Zr===null)throw Error(le(349));yf&30||WL(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,rT(GL.bind(null,n,i,t),[t]),n.flags|=2048,Gv(9,HL.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=to(),e=Zr.identifierPrefix;if(tr){var r=ta,n=ea;r=(n&~(1<<32-Oi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Wv++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[uo]=e,t[zv]=n,mj(t,e,!1,!1),e.stateNode=t;e:{switch(o=J5(r,n),r){case"dialog":Ut("cancel",t),Ut("close",t),s=n;break;case"iframe":case"object":case"embed":Ut("load",t),s=n;break;case"video":case"audio":for(s=0;sRd&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304)}else{if(!n)if(t=Cg(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),o1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!tr)return mn(e),null}else 2*kr()-i.renderingStartTime>Rd&&r!==1073741824&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=kr(),e.sibling=null,r=or.current,bt(or,n?r&1|2:r&1),e):(mn(e),null);case 22:case 23:return F8(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?gs&1073741824&&(mn(e),e.subtreeFlags&6&&(e.flags|=8192)):mn(e),null;case 24:return null;case 25:return null}throw Error(le(156,e.tag))}function fte(t,e){switch(b8(e),e.tag){case 1:return os(e.type)&&yg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Pd(),Wt(is),Wt(_n),_8(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return A8(e),null;case 13:if(Wt(or),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(le(340));Ad()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(or),null;case 4:return Pd(),null;case 10:return E8(e.type._context),null;case 22:case 23:return F8(),null;case 24:return null;default:return null}}var lm=!1,wn=!1,ute=typeof WeakSet=="function"?WeakSet:Set,de=null;function Fu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pr(t,e,n)}else r.current=null}function S6(t,e,r){try{r()}catch(n){pr(t,e,n)}}var uT=!1;function dte(t,e){if(a6=ug,t=CL(),p8(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===s&&(a=o),d===i&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(l6={focusedElem:t,selectionRange:r},ug=!1,de=e;de!==null;)if(e=de,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,de=t;else for(;de!==null;){e=de;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,g=v.memoizedState,b=e.stateNode,p=b.getSnapshotBeforeUpdate(e.elementType===e.type?y:Si(e.type,y),g);b.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(E){pr(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,de=t;break}de=e.return}return v=uT,uT=!1,v}function H1(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&S6(e,r,i)}s=s.next}while(s!==n)}}function T2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function k6(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function bj(t){var e=t.alternate;e!==null&&(t.alternate=null,bj(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[uo],delete e[zv],delete e[u6],delete e[Kee],delete e[Qee])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function wj(t){return t.tag===5||t.tag===3||t.tag===4}function dT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wj(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=vg));else if(n!==4&&(t=t.child,t!==null))for($6(t,e,r),t=t.sibling;t!==null;)$6(t,e,r),t=t.sibling}function A6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(A6(t,e,r),t=t.sibling;t!==null;)A6(t,e,r),t=t.sibling}var an=null,$i=!1;function qa(t,e,r){for(r=r.child;r!==null;)xj(t,e,r),r=r.sibling}function xj(t,e,r){if(wo&&typeof wo.onCommitFiberUnmount=="function")try{wo.onCommitFiberUnmount(C2,r)}catch{}switch(r.tag){case 5:wn||Fu(r,e);case 6:var n=an,s=$i;an=null,qa(t,e,r),an=n,$i=s,an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):an.removeChild(r.stateNode));break;case 18:an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?$C(t.parentNode,r):t.nodeType===1&&$C(t,r),Lv(t)):$C(an,r.stateNode));break;case 4:n=an,s=$i,an=r.stateNode.containerInfo,$i=!0,qa(t,e,r),an=n,$i=s;break;case 0:case 11:case 14:case 15:if(!wn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&S6(r,e,o),s=s.next}while(s!==n)}qa(t,e,r);break;case 1:if(!wn&&(Fu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){pr(r,e,a)}qa(t,e,r);break;case 21:qa(t,e,r);break;case 22:r.mode&1?(wn=(n=wn)||r.memoizedState!==null,qa(t,e,r),wn=n):qa(t,e,r);break;default:qa(t,e,r)}}function hT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new ute),e.forEach(function(n){var s=xte.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function vi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=kr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vte(n/1960))-n,10t?16:t,ul===null)var n=!1;else{if(t=ul,ul=null,Ag=0,ot&6)throw Error(le(331));var s=ot;for(ot|=4,de=t.current;de!==null;){var i=de,o=i.child;if(de.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lkr()-L8?tf(t,0):N8|=r),as(t,e)}function Pj(t,e){e===0&&(t.mode&1?(e=Z0,Z0<<=1,!(Z0&130023424)&&(Z0=4194304)):e=1);var r=Un();t=da(t,e),t!==null&&(n0(t,e,r),as(t,r))}function wte(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Pj(t,r)}function xte(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(le(314))}n!==null&&n.delete(e),Pj(t,r)}var Tj;Tj=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||is.current)rs=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return rs=!1,lte(t,e,r);rs=!!(t.flags&131072)}else rs=!1,tr&&e.flags&1048576&&OL(e,gg,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;pp(t,e),t=e.pendingProps;var s=$d(e,_n.current);id(e,r),s=T8(null,e,n,t,s,r);var i=R8();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,os(n)?(i=!0,mg(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,k8(e),s.updater=_2,e.stateNode=s,s._reactInternals=e,p6(e,n,t,r),e=w6(null,e,n,!0,i,r)):(e.tag=0,tr&&i&&g8(e),Nn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(pp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=Ete(n),t=Si(n,t),s){case 0:e=b6(null,e,n,t,r);break e;case 1:e=lT(null,e,n,t,r);break e;case 11:e=oT(null,e,n,t,r);break e;case 14:e=aT(null,e,n,Si(n.type,t),r);break e}throw Error(le(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),b6(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),lT(t,e,n,s,r);case 3:e:{if(hj(e),t===null)throw Error(le(387));n=e.pendingProps,i=e.memoizedState,s=i.element,LL(t,e),xg(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Td(Error(le(423)),e),e=cT(t,e,n,r,s);break e}else if(n!==s){s=Td(Error(le(424)),e),e=cT(t,e,n,r,s);break e}else for(Ss=Cl(e.stateNode.containerInfo.firstChild),As=e,tr=!0,Ai=null,r=UL(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ad(),n===s){e=ha(t,e,r);break e}Nn(t,e,n,r)}e=e.child}return e;case 5:return zL(e),t===null&&v6(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,c6(n,s)?o=null:i!==null&&c6(n,i)&&(e.flags|=32),dj(t,e),Nn(t,e,o,r),e.child;case 6:return t===null&&v6(e),null;case 13:return vj(t,e,r);case 4:return $8(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_d(e,null,n,r):Nn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),oT(t,e,n,s,r);case 7:return Nn(t,e,e.pendingProps,r),e.child;case 8:return Nn(t,e,e.pendingProps.children,r),e.child;case 12:return Nn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,bt(bg,n._currentValue),n._currentValue=o,i!==null)if(Bi(i.value,o)){if(i.children===s.children&&!is.current){e=ha(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=na(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),y6(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(le(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),y6(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Nn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,id(e,r),s=ei(s),n=n(s),e.flags|=1,Nn(t,e,n,r),e.child;case 14:return n=e.type,s=Si(n,e.pendingProps),s=Si(n.type,s),aT(t,e,n,s,r);case 15:return fj(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),pp(t,e),e.tag=1,os(n)?(t=!0,mg(e)):t=!1,id(e,r),FL(e,n,s),p6(e,n,s,r),w6(null,e,n,!0,t,r);case 19:return yj(t,e,r);case 22:return uj(t,e,r)}throw Error(le(156,e.tag))};function Rj(t,e){return nL(t,e)}function Cte(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qs(t,e,r,n){return new Cte(t,e,r,n)}function U8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ete(t){if(typeof t=="function")return U8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===o8)return 11;if(t===a8)return 14}return 2}function $l(t,e){var r=t.alternate;return r===null?(r=Qs(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function wp(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")U8(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Tu:return rf(r.children,s,i,e);case i8:o=8,s|=8;break;case U5:return t=Qs(12,r,e,s|2),t.elementType=U5,t.lanes=i,t;case z5:return t=Qs(13,r,e,s),t.elementType=z5,t.lanes=i,t;case V5:return t=Qs(19,r,e,s),t.elementType=V5,t.lanes=i,t;case BN:return I2(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jN:o=10;break e;case FN:o=9;break e;case o8:o=11;break e;case a8:o=14;break e;case el:o=16,n=null;break e}throw Error(le(130,t==null?t:typeof t,""))}return e=Qs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function rf(t,e,r,n){return t=Qs(7,t,n,e),t.lanes=r,t}function I2(t,e,r,n){return t=Qs(22,t,n,e),t.elementType=BN,t.lanes=r,t.stateNode={isHidden:!1},t}function MC(t,e,r){return t=Qs(6,t,null,e),t.lanes=r,t}function DC(t,e,r){return e=Qs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ste(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yC(0),this.expirationTimes=yC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yC(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function z8(t,e,r,n,s,i,o,a,l){return t=new Ste(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Qs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},k8(i),t}function kte(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=Ms})($Z);const H8=$N(Kr);var xT=Kr;j5.createRoot=xT.createRoot,j5.hydrateRoot=xT.hydrateRoot;const G8=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),L2=m.createContext({});function Tte(){return m.useContext(L2).visualElement}const a0=m.createContext(null),j2=typeof document<"u",Tg=j2?m.useLayoutEffect:m.useEffect,Dj=m.createContext({strict:!1});function Rte(t,e,r,n){const s=Tte(),i=m.useContext(Dj),o=m.useContext(a0),a=m.useContext(G8).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return Tg(()=>{c&&c.render()}),(window.HandoffAppearAnimations?Tg:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Uu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ite(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Uu(r)&&(r.current=n))},[e])}function Qv(t){return typeof t=="string"||Array.isArray(t)}function F2(t){return typeof t=="object"&&typeof t.start=="function"}const Ote=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function B2(t){return F2(t.animate)||Ote.some(e=>Qv(t[e]))}function Nj(t){return Boolean(B2(t)||t.variants)}function Mte(t,e){if(B2(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Qv(r)?r:void 0,animate:Qv(n)?n:void 0}}return t.inherit!==!1?e:{}}function Dte(t){const{initial:e,animate:r}=Mte(t,m.useContext(L2));return m.useMemo(()=>({initial:e,animate:r}),[CT(e),CT(r)])}function CT(t){return Array.isArray(t)?t.join(" "):t}const Uo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Yv={measureLayout:Uo(["layout","layoutId","drag"]),animation:Uo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Uo(["exit"]),drag:Uo(["drag","dragControls"]),focus:Uo(["whileFocus"]),hover:Uo(["whileHover","onHoverStart","onHoverEnd"]),tap:Uo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Uo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Uo(["whileInView","onViewportEnter","onViewportLeave"])};function Nte(t){for(const e in t)e==="projectionNodeConstructor"?Yv.projectionNodeConstructor=t[e]:Yv[e].Component=t[e]}function U2(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Lte=1;function jte(){return U2(()=>{if(Q1.hasEverUpdated)return Lte++})}const K8=m.createContext({});let Fte=class extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}};const Lj=m.createContext({}),Bte=Symbol.for("motionComponentSymbol");function Ute({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&Nte(t);function o(l,c){const f={...m.useContext(G8),...l,layoutId:zte(l)},{isStatic:u}=f;let d=null;const h=Dte(l),v=u?void 0:jte(),y=s(l,u);if(!u&&j2){h.visualElement=Rte(i,y,f,e);const g=m.useContext(Dj).strict,b=m.useContext(Lj);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Yv.projectionNodeConstructor,b))}return m.createElement(Fte,{visualElement:h.visualElement,props:f},d,m.createElement(L2.Provider,{value:h},n(i,l,v,Ite(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Bte]=i,a}function zte({layoutId:t}){const e=m.useContext(K8).id;return e&&t!==void 0?e+"-"+t:t}function Vte(t){function e(n,s={}){return Ute(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const qte=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Q8(t){return typeof t!="string"||t.includes("-")?!1:!!(qte.indexOf(t)>-1||/[A-Z]/.test(t))}const Rg={};function Wte(t){Object.assign(Rg,t)}const Ig=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yh=new Set(Ig);function jj(t,{layout:e,layoutId:r}){return yh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Rg[t]||t==="opacity")}const fs=t=>!!(t!=null&&t.getVelocity),Hte={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gte=(t,e)=>Ig.indexOf(t)-Ig.indexOf(e);function Kte({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Gte);for(const a of e)o+=`${Hte[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function Fj(t){return t.startsWith("--")}const Qte=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Id=(t,e,r)=>Math.min(Math.max(r,t),e),jf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Y1={...jf,transform:t=>Id(0,1,t)},um={...jf,default:1},J1=t=>Math.round(t*1e5)/1e5,Jv=/(-)?([\d]*\.?[\d])+/g,I6=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Yte=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function l0(t){return typeof t=="string"}const c0=t=>({test:e=>l0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ga=c0("deg"),Co=c0("%"),Ce=c0("px"),Jte=c0("vh"),Xte=c0("vw"),ET={...Co,parse:t=>Co.parse(t)/100,transform:t=>Co.transform(t*100)},ST={...jf,transform:Math.round},Bj={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,size:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,rotate:Ga,rotateX:Ga,rotateY:Ga,rotateZ:Ga,scale:um,scaleX:um,scaleY:um,scaleZ:um,skew:Ga,skewX:Ga,skewY:Ga,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:Y1,originX:ET,originY:ET,originZ:Ce,zIndex:ST,fillOpacity:Y1,strokeOpacity:Y1,numOctaves:ST};function Y8(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(Fj(d)){i[d]=h;continue}const v=Bj[d],y=Qte(h,v);if(yh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Kte(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const J8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Uj(t,e,r){for(const n in e)!fs(e[n])&&!jj(n,r)&&(t[n]=e[n])}function Zte({transformTemplate:t},e,r){return m.useMemo(()=>{const n=J8();return Y8(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function ere(t,e,r){const n=t.style||{},s={};return Uj(s,n,t),Object.assign(s,Zte(t,e,r)),t.transformValues?t.transformValues(s):s}function tre(t,e,r){const n={},s=ere(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const rre=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],nre=["whileTap","onTap","onTapStart","onTapCancel"],sre=["onPan","onPanStart","onPanSessionStart","onPanEnd"],ire=["whileInView","onViewportEnter","onViewportLeave","viewport"],ore=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","layoutScroll","layoutRoot","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd",...ire,...nre,...rre,...sre]);function Og(t){return ore.has(t)}let zj=t=>!Og(t);function are(t){t&&(zj=e=>e.startsWith("on")?!Og(e):t(e))}try{are(require("@emotion/is-prop-valid").default)}catch{}function lre(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(zj(s)||r===!0&&Og(s)||!e&&!Og(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function kT(t,e,r){return typeof t=="string"?t:Ce.transform(e+r*t)}function cre(t,e,r){const n=kT(e,t.x,t.width),s=kT(r,t.y,t.height);return`${n} ${s}`}const fre={offset:"stroke-dashoffset",array:"stroke-dasharray"},ure={offset:"strokeDashoffset",array:"strokeDasharray"};function dre(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?fre:ure;t[i.offset]=Ce.transform(-n);const o=Ce.transform(e),a=Ce.transform(r);t[i.array]=`${o} ${a}`}function X8(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(Y8(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=cre(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&dre(d,i,o,a,!1)}const Vj=()=>({...J8(),attrs:{}}),Z8=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hre(t,e,r,n){const s=m.useMemo(()=>{const i=Vj();return X8(i,e,{enableHardwareAcceleration:!1},Z8(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Uj(i,t.style,t),s.style={...i,...s.style}}return s}function vre(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(Q8(r)?hre:tre)(n,o,a,r),u={...lre(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>fs(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const e$=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function qj(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const Wj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hj(t,e,r,n){qj(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(Wj.has(s)?s:e$(s),e.attrs[s])}function t$(t,e){const{style:r}=t,n={};for(const s in r)(fs(r[s])||e.style&&fs(e.style[s])||jj(s,t))&&(n[s]=r[s]);return n}function Gj(t,e){const r=t$(t,e);for(const n in t)if(fs(t[n])||fs(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function r$(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Mg=t=>Array.isArray(t),yre=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),mre=t=>Mg(t)?t[t.length-1]||0:t;function xp(t){const e=fs(t)?t.get():t;return yre(e)?e.toValue():e}function pre({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:gre(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Kj=t=>(e,r)=>{const n=m.useContext(L2),s=m.useContext(a0),i=()=>pre(t,e,n,s);return r?i():U2(i)};function gre(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=xp(i[d]);let{initial:o,animate:a}=t;const l=B2(t),c=Nj(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!F2(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=r$(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const bre={useVisualState:Kj({scrapeMotionValuesFromProps:Gj,createRenderState:Vj,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}X8(r,n,{enableHardwareAcceleration:!1},Z8(e.tagName),t.transformTemplate),Hj(e,r)}})},wre={useVisualState:Kj({scrapeMotionValuesFromProps:t$,createRenderState:J8})};function xre(t,{forwardMotionProps:e=!1},r,n,s){return{...Q8(t)?bre:wre,preloadedFeatures:r,useRender:vre(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var pt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(pt||(pt={}));function z2(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function O6(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return z2(s,e,r,n)},[t,e,r,n])}function Cre({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(pt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(pt.Focus,!1)},[r]);O6(e,"focus",t?n:void 0),O6(e,"blur",t?s:void 0)}const Qj=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function n$(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Yj=t=>e=>Qj(e)&&t(e,n$(e));function ad(t,e,r,n){return z2(t,e,Yj(r),n)}function Dg(t,e,r,n){return O6(t,e,r&&Yj(r),n)}function Jj(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const $T=Jj("dragHorizontal"),AT=Jj("dragVertical");function Xj(t){let e=!1;if(t==="y")e=AT();else if(t==="x")e=$T();else{const r=$T(),n=AT();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function Zj(){const t=Xj(!0);return t?(t(),!1):!0}function _T(t,e,r,n){return(s,i)=>{s.type==="touch"||Zj()||(r&&t.animationState&&t.animationState.setActive(pt.Hover,e),n&&n(s,i))}}function Ere({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Dg(n,"pointerenter",m.useMemo(()=>t||r?_T(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Dg(n,"pointerleave",m.useMemo(()=>e||r?_T(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const eF=(t,e)=>e?t===e?!0:eF(t,e.parentElement):!1;function s$(t){return m.useEffect(()=>()=>t(),[])}const Sre=(t,e)=>r=>e(t(r)),V2=(...t)=>t.reduce(Sre);function kre({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!1),!Zj()}function d(y,g){var b,p,w,E;u()&&(eF(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=V2(ad(window,"pointerup",d,c),ad(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Dg(s,"pointerdown",o?v:void 0,c),s$(f)}const M6=new WeakMap,NC=new WeakMap,$re=t=>{const e=M6.get(t.target);e&&e(t)},Are=t=>{t.forEach($re)};function _re({root:t,...e}){const r=t||document;NC.has(r)||NC.set(r,{});const n=NC.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Are,{root:t,...e})),n[s]}function Pre(t,e,r){const n=_re(e);return M6.set(t,r),n.observe(t),()=>{M6.delete(t),n.unobserve(t)}}function Tre({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?Ore:Ire)(o,i.current,t,s)}const Rre={some:0,all:1};function Ire(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:Rre[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(pt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return Pre(r.current,a,l)},[t,n,s,i])}function Ore(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(pt.InView,!0)})},[t])}const dl=t=>e=>(t(e),null),Mre={inView:dl(Tre),tap:dl(kre),focus:dl(Cre),hover:dl(Ere)};function tF(){const t=m.useContext(a0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function rF(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),Nre=t=>/^0[^.\s]+$/.test(t),sa={delta:0,timestamp:0},nF=1/60*1e3,Lre=typeof performance<"u"?()=>performance.now():()=>Date.now(),sF=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lre()),nF);function jre(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=jre(()=>Xv=!0),t),{}),zn=f0.reduce((t,e)=>{const r=q2[e];return t[e]=(n,s=!1,i=!1)=>(Xv||Ure(),r.schedule(n,s,i)),t},{}),Ll=f0.reduce((t,e)=>(t[e]=q2[e].cancel,t),{}),LC=f0.reduce((t,e)=>(t[e]=()=>q2[e].process(sa),t),{}),Bre=t=>q2[t].process(sa),iF=t=>{Xv=!1,sa.delta=D6?nF:Math.max(Math.min(t-sa.timestamp,Fre),1),sa.timestamp=t,N6=!0,f0.forEach(Bre),N6=!1,Xv&&(D6=!1,sF(iF))},Ure=()=>{Xv=!0,D6=!0,N6||sF(iF)};function i$(t,e){t.indexOf(e)===-1&&t.push(e)}function o$(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}let a$=class{constructor(){this.subscriptions=[]}add(e){return i$(this.subscriptions,e),()=>o$(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));let Vre=class{constructor(e,r={}){this.version="8.5.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sa;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,zn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>zn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=zre(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new a$);const n=this.events[e].add(r);return e==="change"?()=>{n(),zn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?l$(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Od(t,e){return new Vre(t,e)}const c$=(t,e)=>r=>Boolean(l0(r)&&Yte.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),oF=(t,e,r)=>n=>{if(!l0(n))return n;const[s,i,o,a]=n.match(Jv);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},qre=t=>Id(0,255,t),jC={...jf,transform:t=>Math.round(qre(t))},Qc={test:c$("rgb","red"),parse:oF("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+jC.transform(t)+", "+jC.transform(e)+", "+jC.transform(r)+", "+J1(Y1.transform(n))+")"};function Wre(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const L6={test:c$("#"),parse:Wre,transform:Qc.transform},zu={test:c$("hsl","hue"),parse:oF("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Co.transform(J1(e))+", "+Co.transform(J1(r))+", "+J1(Y1.transform(n))+")"},Mn={test:t=>Qc.test(t)||L6.test(t)||zu.test(t),parse:t=>Qc.test(t)?Qc.parse(t):zu.test(t)?zu.parse(t):L6.parse(t),transform:t=>l0(t)?t:t.hasOwnProperty("red")?Qc.transform(t):zu.transform(t)},aF="${c}",lF="${n}";function Hre(t){var e,r;return isNaN(t)&&l0(t)&&(((e=t.match(Jv))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(I6))===null||r===void 0?void 0:r.length)||0)>0}function Ng(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(I6);s&&(r=s.length,t=t.replace(I6,aF),e.push(...s.map(Mn.parse)));const i=t.match(Jv);return i&&(n=i.length,t=t.replace(Jv,lF),e.push(...i.map(jf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function cF(t){return Ng(t).values}function fF(t){const{values:e,numColors:r,tokenised:n}=Ng(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Kre(t){const e=cF(t);return fF(t)(e.map(Gre))}const jl={test:Hre,parse:cF,createTransformer:fF,getAnimatableNone:Kre},Qre=new Set(["brightness","contrast","saturate","opacity"]);function Yre(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Jv)||[];if(!n)return t;const s=r.replace(n,"");let i=Qre.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const Jre=/([a-z-]*)\(.*?\)/g,j6={...jl,getAnimatableNone:t=>{const e=t.match(Jre);return e?e.map(Yre).join(" "):t}},Xre={...Bj,color:Mn,backgroundColor:Mn,outlineColor:Mn,fill:Mn,stroke:Mn,borderColor:Mn,borderTopColor:Mn,borderRightColor:Mn,borderBottomColor:Mn,borderLeftColor:Mn,filter:j6,WebkitFilter:j6},f$=t=>Xre[t];function u$(t,e){var r;let n=f$(t);return n!==j6&&(n=jl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const uF=t=>e=>e.test(t),Zre={test:t=>t==="auto",parse:t=>t},dF=[jf,Ce,Co,Ga,Xte,Jte,Zre],l1=t=>dF.find(uF(t)),ene=[...dF,Mn,jl],tne=t=>ene.find(uF(t));function rne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function nne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function W2(t,e,r){const n=t.getProps();return r$(n,e,r!==void 0?r:n.custom,rne(t),nne(t))}function sne(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Od(r))}function ine(t,e){const r=W2(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=mre(i[o]);sne(t,o,a)}}function one(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,une={current:!1},d$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,h$=t=>e=>1-t(1-e),v$=t=>t*t,dne=h$(v$),y$=d$(v$),wr=(t,e,r)=>-r*t+r*e+t;function FC(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hne({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=FC(l,a,t+1/3),i=FC(l,a,t),o=FC(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const BC=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},vne=[L6,Qc,zu],yne=t=>vne.find(e=>e.test(t));function PT(t){const e=yne(t);let r=e.parse(t);return e===zu&&(r=hne(r)),r}const vF=(t,e)=>{const r=PT(t),n=PT(e),s={...r};return i=>(s.red=BC(r.red,n.red,i),s.green=BC(r.green,n.green,i),s.blue=BC(r.blue,n.blue,i),s.alpha=wr(r.alpha,n.alpha,i),Qc.transform(s))};function yF(t,e){return typeof t=="number"?r=>wr(t,e,r):Mn.test(t)?vF(t,e):pF(t,e)}const mF=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>yF(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=yF(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},pF=(t,e)=>{const r=jl.createTransformer(e),n=Ng(t),s=Ng(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?V2(mF(n.values,s.values),r):o=>`${o>0?e:t}`},jg=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},TT=(t,e)=>r=>wr(t,e,r);function pne(t){return typeof t=="number"?TT:typeof t=="string"?Mn.test(t)?vF:pF:Array.isArray(t)?mF:typeof t=="object"?mne:TT}function gne(t,e,r){const n=[],s=r||pne(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=gne(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Id(t[0],t[i-1],c)):l}const m$=t=>t,bF=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,bne=1e-7,wne=12;function xne(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=bF(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>bne&&++axne(i,0,1,t,r);return i=>i===0||i===1?i:bF(s(i),e,n)}const xF=t=>1-Math.sin(Math.acos(t)),p$=h$(xF),Cne=d$(p$),CF=wF(.33,1.53,.69,.99),g$=h$(CF),Ene=d$(g$),Sne=t=>(t*=2)<1?.5*g$(t):.5*(2-Math.pow(2,-10*(t-1))),kne={linear:m$,easeIn:v$,easeInOut:y$,easeOut:dne,circIn:xF,circInOut:Cne,circOut:p$,backIn:g$,backInOut:Ene,backOut:CF,anticipate:Sne},RT=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return wF(e,r,n,s)}else if(typeof t=="string")return kne[t];return t},$ne=t=>Array.isArray(t)&&typeof t[0]!="number";function Ane(t,e){return t.map(()=>e||y$).splice(0,t.length-1)}function _ne(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Pne(t,e){return t.map(r=>r*e)}function F6({keyframes:t,ease:e=y$,times:r,duration:n=300}){t=[...t];const s=$ne(e)?e.map(RT):RT(e),i={done:!1,value:t[0]},o=Pne(r&&r.length===t.length?r:_ne(t),n);function a(){return gF(o,t,{ease:Array.isArray(s)?s:Ane(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const UC=.001,Tne=.01,IT=10,Rne=.05,Ine=1;function One({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=IT*1e3);let o=1-e;o=Id(Rne,Ine,o),t=Id(Tne,IT,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=B6(c,o),v=Math.exp(-u);return UC-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=B6(Math.pow(c,2),o);return(-s(c)+UC>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-UC+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=Dne(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const Mne=12;function Dne(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function jne(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!OT(t,Lne)&&OT(t,Nne)){const r=One(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Fne=5;function EF({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=jne(n);let h=Bne,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=B6(p,y);h=k=>{const $=Math.exp(-y*p*k);return i-$*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-$*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const $=Math.max(0,b-Fne);w=l$(p-h($),b-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}EF.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Bne=t=>0;function Une({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const zne={decay:Une,keyframes:F6,tween:F6,spring:EF};function SF(t,e,r=0){return t-e-r}function Vne(t,e=0,r=0,n=!0){return n?SF(e+-t,e,r):e-(t-e)+r}function qne(t,e,r,n){return n?t>=e+r:t<=-r}const Wne=t=>{const e=({delta:r})=>t(r);return{start:()=>zn.update(e,!0),stop:()=>Ll.update(e)}};function Fg({duration:t,driver:e=Wne,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,$=!0,x;const T=zne[o.length>2?"keyframes":h]||F6,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=gF([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=Vne(r,E,i,$)):(r=SF(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function Hne(t){return!t||Array.isArray(t)||typeof t=="string"&&kF[t]}const M1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,kF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M1([0,.65,.55,1]),circOut:M1([.55,0,1,.45]),backIn:M1([.31,.01,.66,-.59]),backOut:M1([.33,1.53,.69,.99])};function Gne(t){if(t)return Array.isArray(t)?M1(t):kF[t]}function Kne(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:Gne(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const MT={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},zC={},$F={};for(const t in MT)$F[t]=()=>(zC[t]===void 0&&(zC[t]=MT[t]()),zC[t]);function Qne(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Yne=new Set(["opacity"]),dm=10;function Jne(t,e,{onUpdate:r,onComplete:n,...s}){if(!($F.waapi()&&Yne.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!Hne(s.ease)){if(s.repeat===1/0)return;const u=Fg({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=dm;o=h,a=v-dm,c="linear"}const f=Kne(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(Qne(o,s)),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=Fg({...s,autoplay:!1});t.setWithVelocity(d.sample(u-dm).value,d.sample(u).value,dm)}zn.update(()=>f.cancel())}}}function AF(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ll.read(n),t(i-e))};return zn.read(n,!0),()=>Ll.read(n)}function Xne({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:AF(s,-e)}:s()}function Zne({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),$=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=l$(L-x,sa.delta),($===1&&L>k||$===-1&&Ly==null?void 0:y.stop()}}const kc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),hm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),VC=()=>({type:"keyframes",ease:"linear",duration:.3}),ese={type:"keyframes",duration:.8},DT={x:kc,y:kc,z:kc,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scaleX:hm,scaleY:hm,scale:hm,opacity:VC,backgroundColor:VC,color:VC,default:hm},tse=(t,{keyframes:e})=>e.length>2?ese:(DT[t]||DT.default)(e[1]),U6=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&jl.test(e)&&!e.startsWith("url("));function rse({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function NT(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function LT(t){return typeof t=="number"?0:u$("",t)}function _F(t,e){return t[e]||t.default||t}function nse(t,e,r,n){const s=U6(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=u$(e,r):NT(i)&&typeof r=="string"?i=LT(r):!Array.isArray(r)&&NT(r)&&typeof i=="string"&&(r=LT(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const b$=(t,e,r,n={})=>s=>{const i=_F(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Cp(o);const l=nse(e,t,r,i),c=l[0],f=l[l.length-1],u=U6(t,c),d=U6(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||une.current||i.type===!1)return Xne(h);if(i.type==="inertia")return Zne(h);rse(i)||(h={...h,...tse(t,h)}),h.duration&&(h.duration=Cp(h.duration)),h.repeatDelay&&(h.repeatDelay=Cp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=Jne(e,t,h);if(g)return g}return Fg(h)};function sse(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>z6(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=z6(t,e,r);else{const s=typeof e=="function"?W2(t,e,r.custom):e;n=PF(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function z6(t,e,r={}){var n;const s=W2(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>PF(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return ise(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function PF(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&ase(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[fne];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,zn))}let g=h.start(b$(d,h,v,t.shouldReduceMotion&&yh.has(d)?{type:!1}:y));Lg(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&ine(t,a)})}function ise(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(ose).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(z6(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function ose(t,e){return t.sortNodePosition(e)}function ase({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const w$=[pt.Animate,pt.InView,pt.Focus,pt.Hover,pt.Tap,pt.Drag,pt.Exit],lse=[...w$].reverse(),cse=w$.length;function fse(t){return e=>Promise.all(e.map(({animation:r,options:n})=>sse(t,r,n)))}function use(t){let e=fse(t);const r=hse();let n=!0;const s=(l,c)=>{const f=W2(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Mg(R)&&Mg(M)?!rF(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function dse(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!rF(e,t):!1}function $c(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hse(){return{[pt.Animate]:$c(!0),[pt.InView]:$c(),[pt.Hover]:$c(),[pt.Tap]:$c(),[pt.Drag]:$c(),[pt.Focus]:$c(),[pt.Exit]:$c()}}const vse={animation:dl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=use(t)),F2(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:dl(t=>{const{custom:e,visualElement:r}=t,[n,s]=tF(),i=m.useContext(a0);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(pt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},jT=(t,e)=>Math.abs(t-e);function yse(t,e){const r=jT(t.x,e.x),n=jT(t.y,e.y);return Math.sqrt(r**2+n**2)}let TF=class{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=WC(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=yse(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=sa;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=qC(f,this.transformPagePoint),zn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=WC(c.type==="pointercancel"?this.lastMoveEventInfo:qC(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!Qj(e))return;this.handlers=r,this.transformPagePoint=n;const s=n$(e),i=qC(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=sa;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,WC(i,this.history)),this.removeListeners=V2(ad(window,"pointermove",this.handlePointerMove),ad(window,"pointerup",this.handlePointerUp),ad(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ll.update(this.updatePoint)}};function qC(t,e){return e?{point:e(t.point)}:t}function FT(t,e){return{x:t.x-e.x,y:t.y-e.y}}function WC({point:t},e){return{point:t,delta:FT(t,RF(e)),offset:FT(t,mse(e)),velocity:pse(e,.1)}}function mse(t){return t[0]}function RF(t){return t[t.length-1]}function pse(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=RF(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Cp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Is(t){return t.max-t.min}function V6(t,e=0,r=.01){return Math.abs(t-e)<=r}function BT(t,e,r,n=.5){t.origin=n,t.originPoint=wr(e.min,e.max,t.origin),t.scale=Is(r)/Is(e),(V6(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=wr(r.min,r.max,t.origin)-t.originPoint,(V6(t.translate)||isNaN(t.translate))&&(t.translate=0)}function X1(t,e,r,n){BT(t.x,e.x,r.x,n==null?void 0:n.originX),BT(t.y,e.y,r.y,n==null?void 0:n.originY)}function UT(t,e,r){t.min=r.min+e.min,t.max=t.min+Is(e)}function gse(t,e,r){UT(t.x,e.x,r.x),UT(t.y,e.y,r.y)}function zT(t,e,r){t.min=e.min-r.min,t.max=t.min+Is(e)}function Z1(t,e,r){zT(t.x,e.x,r.x),zT(t.y,e.y,r.y)}function bse(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?wr(r,t,n.max):Math.min(t,r)),t}function VT(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function wse(t,{top:e,left:r,bottom:n,right:s}){return{x:VT(t.x,r,s),y:VT(t.y,e,n)}}function qT(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=jg(e.min,e.max-n,t.min):n>s&&(r=jg(t.min,t.max-s,e.min)),Id(0,1,r)}function Ese(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const q6=.35;function Sse(t=q6){return t===!1?t=0:t===!0&&(t=q6),{x:WT(t,"left","right"),y:WT(t,"top","bottom")}}function WT(t,e,r){return{min:HT(t,e),max:HT(t,r)}}function HT(t,e){return typeof t=="number"?t:t[e]||0}const GT=()=>({translate:0,scale:1,origin:0,originPoint:0}),ev=()=>({x:GT(),y:GT()}),KT=()=>({min:0,max:0}),Fr=()=>({x:KT(),y:KT()});function no(t){return[t("x"),t("y")]}function IF({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function kse({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function $se(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function HC(t){return t===void 0||t===1}function W6({scale:t,scaleX:e,scaleY:r}){return!HC(t)||!HC(e)||!HC(r)}function Oc(t){return W6(t)||OF(t)||t.z||t.rotate||t.rotateX||t.rotateY}function OF(t){return QT(t.x)||QT(t.y)}function QT(t){return t&&t!=="0%"}function Bg(t,e,r){const n=t-r,s=e*n;return r+s}function YT(t,e,r,n,s){return s!==void 0&&(t=Bg(t,s,n)),Bg(t,r,n)+e}function H6(t,e=0,r=1,n,s){t.min=YT(t.min,e,r,n,s),t.max=YT(t.max,e,r,n,s)}function MF(t,{x:e,y:r}){H6(t.x,e.translate,e.scale,e.originPoint),H6(t.y,r.translate,r.scale,r.originPoint)}function Ase(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function rl(t,e){t.min=t.min+e,t.max=t.max+e}function XT(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=wr(t.min,t.max,i);H6(t,e[r],e[n],o,e.scale)}const _se=["x","scaleX","originX"],Pse=["y","scaleY","originY"];function Vu(t,e){XT(t.x,e,_se),XT(t.y,e,Pse)}function DF(t,e){return IF($se(t.getBoundingClientRect(),e))}function Tse(t,e,r){const n=DF(t,r),{scroll:s}=e;return s&&(rl(n.x,s.offset.x),rl(n.y,s.offset.y)),n}const Rse=new WeakMap;let Ise=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(n$(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xj(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),no(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(Co.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Is(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(pt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=Ose(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new TF(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(pt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!vm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=bse(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Uu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=wse(n.layoutBox,e):this.constraints=!1,this.elastic=Sse(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&no(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=Ese(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Uu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Tse(n,s.root,this.visualElement.getTransformPagePoint());let o=xse(s.layout.layoutBox,i);if(r){const a=r(kse(o));this.hasMutatedConstraints=!!a,a&&(o=IF(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=no(f=>{if(!vm(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(b$(e,n,0,r))}stopAnimation(){no(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){no(r=>{const{drag:n}=this.getProps();if(!vm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-wr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Uu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};no(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=Cse({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),no(a=>{if(!vm(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(wr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Rse.set(this.visualElement,this);const r=this.visualElement.current,n=ad(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Uu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=z2(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(no(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=q6,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}};function vm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function Ose(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Mse(t){const{dragControls:e,visualElement:r}=t,n=U2(()=>new Ise(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function Dse({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(G8),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new TF(f,l,{transformPagePoint:a})}Dg(s,"pointerdown",i&&c),s$(()=>o.current&&o.current.end())}const Nse={pan:dl(Dse),drag:dl(Mse)};function G6(t){return typeof t=="string"&&t.startsWith("var(--")}const NF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Lse(t){const e=NF.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function K6(t,e,r=1){const[n,s]=Lse(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():G6(s)?K6(s,e,r+1):s}function jse(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!G6(i))return;const o=K6(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!G6(i))continue;const o=K6(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Fse=new Set(["width","height","top","left","right","bottom","x","y"]),LF=t=>Fse.has(t),Bse=t=>Object.keys(t).some(LF),ZT=t=>t===jf||t===Ce;var e7;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(e7||(e7={}));const t7=(t,e)=>parseFloat(t.split(", ")[e]),r7=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return t7(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?t7(i[1],t):0}},Use=new Set(["x","y","z"]),zse=Ig.filter(t=>!Use.has(t));function Vse(t){const e=[];return zse.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const n7={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:r7(4,13),y:r7(5,14)},qse=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=n7[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=n7[c](l,i)}),t},Wse=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(LF);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=l1(f);const d=e[l];let h;if(Mg(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=l1(f);for(let g=y;g=0?window.pageYOffset:null,c=qse(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),j2&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function Hse(t,e,r,n){return Bse(e)?Wse(t,e,r,n):{target:e,transitionEnd:n}}const Gse=(t,e,r,n)=>{const s=jse(t,e,n);return e=s.target,n=s.transitionEnd,Hse(t,e,r,n)},Q6={current:null},jF={current:!1};function Kse(){if(jF.current=!0,!!j2)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Q6.current=t.matches;t.addListener(e),e()}else Q6.current=!1}function Qse(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(fs(i))t.addValue(s,i),Lg(n)&&n.add(s);else if(fs(o))t.addValue(s,Od(i,{owner:t})),Lg(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Od(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const FF=Object.keys(Yv),Yse=FF.length,s7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jse=class{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>zn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=B2(r),this.isVariantNode=Nj(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&fs(u)&&(u.set(o[f],!1),Lg(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),jF.current||Kse(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Q6.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Ll.update(this.notifyUpdate),Ll.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=yh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&zn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Od(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=r$(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new a$),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}};const BF=["initial",...w$],Xse=BF.length;let UF=class extends Jse{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=lne(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){one(this,n,o);const a=Gse(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}};function Zse(t){return window.getComputedStyle(t)}let eie=class extends UF{readValueFromInstance(e,r){if(yh.has(r)){const n=f$(r);return n&&n.default||0}else{const n=Zse(e),s=(Fj(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return DF(e,r)}build(e,r,n,s){Y8(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return t$(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fs(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){qj(e,r,n,s)}},tie=class extends UF{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return yh.has(r)?((n=f$(r))===null||n===void 0?void 0:n.default)||0:(r=Wj.has(r)?r:e$(r),e.getAttribute(r))}measureInstanceViewportBox(){return Fr()}scrapeMotionValuesFromProps(e,r){return Gj(e,r)}build(e,r,n,s){X8(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){Hj(e,r,n,s)}mount(e){this.isSVGTag=Z8(e.tagName),super.mount(e)}};const rie=(t,e)=>Q8(t)?new tie(e,{enableHardwareAcceleration:!1}):new eie(e,{enableHardwareAcceleration:!0});function i7(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const c1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ce.test(t))t=parseFloat(t);else return t;const r=i7(t,e.target.x),n=i7(t,e.target.y);return`${r}% ${n}%`}},o7="_$css",nie={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(NF,h=>(i.push(h),o7)));const o=jl.parse(t);if(o.length>5)return n;const a=jl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=wr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(o7,()=>{const v=i[h];return h++,v})}return d}};let sie=class extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Wte(oie),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Q1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||zn.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}};function iie(t){const[e,r]=tF(),n=m.useContext(K8);return P.createElement(sie,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(Lj),isPresent:e,safeToRemove:r})}const oie={borderRadius:{...c1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:c1,borderTopRightRadius:c1,borderBottomLeftRadius:c1,borderBottomRightRadius:c1,boxShadow:nie},aie={measureLayout:iie};function lie(t,e,r={}){const n=fs(t)?t:Od(t);return n.start(b$("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const zF=["TopLeft","TopRight","BottomLeft","BottomRight"],cie=zF.length,a7=t=>typeof t=="string"?parseFloat(t):t,l7=t=>typeof t=="number"||Ce.test(t);function fie(t,e,r,n,s,i){s?(t.opacity=wr(0,r.opacity!==void 0?r.opacity:1,uie(n)),t.opacityExit=wr(e.opacity!==void 0?e.opacity:1,0,die(n))):i&&(t.opacity=wr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(jg(t,e,n))}function f7(t,e){t.min=e.min,t.max=e.max}function yi(t,e){f7(t.x,e.x),f7(t.y,e.y)}function u7(t,e,r,n,s){return t-=e,t=Bg(t,1/r,n),s!==void 0&&(t=Bg(t,1/s,n)),t}function hie(t,e=0,r=1,n=.5,s,i=t,o=t){if(Co.test(e)&&(e=parseFloat(e),e=wr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=wr(i.min,i.max,n);t===i&&(a-=e),t.min=u7(t.min,e,r,a,s),t.max=u7(t.max,e,r,a,s)}function d7(t,e,[r,n,s],i,o){hie(t,e[r],e[n],e[s],e.scale,i,o)}const vie=["x","scaleX","originX"],yie=["y","scaleY","originY"];function h7(t,e,r,n){d7(t.x,e,vie,r==null?void 0:r.x,n==null?void 0:n.x),d7(t.y,e,yie,r==null?void 0:r.y,n==null?void 0:n.y)}function v7(t){return t.translate===0&&t.scale===1}function qF(t){return v7(t.x)&&v7(t.y)}function WF(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function y7(t){return Is(t.x)/Is(t.y)}let mie=class{constructor(){this.members=[]}add(e){i$(this.members,e),e.scheduleRender()}remove(e){if(o$(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function m7(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const pie=(t,e)=>t.depth-e.depth;let gie=class{constructor(){this.children=[],this.isDirty=!1}add(e){i$(this.children,e),this.isDirty=!0}remove(e){o$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pie),this.isDirty=!1,this.children.forEach(e)}};const p7=["","X","Y","Z"],g7=1e3;let bie=0;function HF({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=bie++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Cie),this.nodes.forEach(kie),this.nodes.forEach($ie)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=AF(h,250),Q1.hasAnimatedSinceResize&&(Q1.hasAnimatedSinceResize=!1,this.nodes.forEach(w7))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:Rie,{onLayoutAnimationStart:$,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!WF(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={..._F(k,"layout"),onPlay:$,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&w7(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Ll.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(Aie),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var w;const E=p/1e3;x7(h.x,o.x,E),x7(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(Z1(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pie(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,fie(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ll.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zn.update(()=>{Q1.hasAnimatedSinceResize=!0,this.currentAnimation=lie(0,g7,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,g7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&GF(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Fr();const u=Is(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Is(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}yi(a,l),Vu(a,f),X1(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new mie),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(b7),this.root.sharedNodes.clear()}}}function wie(t){t.updateLayout()}function xie(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(v);v.min=i[h].min,v.max=v.min+y}):GF(a,s.layoutBox,i)&&no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(i[h]);v.max=v.min+y});const c=ev();X1(c,i,s.layoutBox);const f=ev();l?X1(f,t.applyTransform(o,!0),s.measuredBox):X1(f,i,s.layoutBox);const u=!qF(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Fr();Z1(g,s.layoutBox,v.layoutBox);const b=Fr();Z1(b,i,y.layoutBox),WF(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Cie(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Eie(t){t.clearSnapshot()}function b7(t){t.clearMeasurements()}function Sie(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function w7(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function kie(t){t.resolveTargetDelta()}function $ie(t){t.calcProjection()}function Aie(t){t.resetRotation()}function _ie(t){t.removeLeadSnapshot()}function x7(t,e,r){t.translate=wr(e.translate,0,r),t.scale=wr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function C7(t,e,r,n){t.min=wr(e.min,r.min,n),t.max=wr(e.max,r.max,n)}function Pie(t,e,r,n){C7(t.x,e.x,r.x,n),C7(t.y,e.y,r.y,n)}function Tie(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Rie={duration:.45,ease:[.4,0,.1,1]};function Iie(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function E7(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Oie(t){E7(t.x),E7(t.y)}function GF(t,e,r){return t==="position"||t==="preserve-aspect"&&!V6(y7(e),y7(r),.2)}const Mie=HF({attachResizeListener:(t,e)=>z2(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),GC={current:void 0},Die=HF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!GC.current){const t=new Mie(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),GC.current=t}return GC.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),Nie={...vse,...Mre,...Nse,...aie},Zv=Vte((t,e)=>xre(t,e,Nie,rie,Die));function KF(){const t=m.useRef(!1);return Tg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Lie(){const t=KF(),[e,r]=m.useState(0),n=m.useCallback(()=>{t.current&&r(e+1)},[e]);return[m.useCallback(()=>zn.postRender(n),[n]),e]}class jie extends m.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Fie({children:t,isPresent:e}){const r=m.useId(),n=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` +`+i.stack}return{value:t,source:e,stack:s,digest:null}}function IC(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function g6(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var ite=typeof WeakMap=="function"?WeakMap:Map;function lj(t,e,r){r=na(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){$g||($g=!0,_6=n),g6(t,e)},r}function cj(t,e,r){r=na(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){g6(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){g6(t,e),typeof n!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function nT(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new ite;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=bte.bind(null,t,e,r),e.then(t,t))}function sT(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function iT(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=na(-1,1),e.tag=2,El(r,e,1))),r.lanes|=1),t)}var ote=_a.ReactCurrentOwner,rs=!1;function Nn(t,e,r,n){e.child=t===null?UL(e,null,r,n):_d(e,t.child,r,n)}function oT(t,e,r,n,s){r=r.render;var i=e.ref;return id(e,s),n=T8(t,e,r,n,i,s),r=R8(),t!==null&&!rs?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ha(t,e,s)):(tr&&r&&g8(e),e.flags|=1,Nn(t,e,n,s),e.child)}function aT(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!U8(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,fj(t,e,i,n,s)):(t=wp(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Fv,r(o,n)&&t.ref===e.ref)return ha(t,e,s)}return e.flags|=1,t=$l(i,n),t.ref=e.ref,t.return=e,e.child=t}function fj(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(Fv(i,n)&&t.ref===e.ref)if(rs=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(rs=!0);else return e.lanes=t.lanes,ha(t,e,s)}return b6(t,e,r,n,s)}function uj(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Bu,gs),gs|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,bt(Bu,gs),gs|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,bt(Bu,gs),gs|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,bt(Bu,gs),gs|=n;return Nn(t,e,s,r),e.child}function dj(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function b6(t,e,r,n,s){var i=os(r)?hf:_n.current;return i=$d(e,i),id(e,s),r=T8(t,e,r,n,i,s),n=R8(),t!==null&&!rs?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ha(t,e,s)):(tr&&n&&g8(e),e.flags|=1,Nn(t,e,r,s),e.child)}function lT(t,e,r,n,s){if(os(r)){var i=!0;mg(e)}else i=!1;if(id(e,s),e.stateNode===null)pp(t,e),FL(e,r,n),p6(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=ei(c):(c=os(r)?hf:_n.current,c=$d(e,c));var f=r.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&ZP(e,o,n,c),tl=!1;var d=e.memoizedState;o.state=d,xg(e,n,o,s),l=e.memoizedState,a!==n||d!==l||is.current||tl?(typeof f=="function"&&(m6(e,r,f,n),l=e.memoizedState),(a=tl||XP(e,r,a,n,d,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,LL(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Si(e.type,a),o.props=c,u=e.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=ei(l):(l=os(r)?hf:_n.current,l=$d(e,l));var h=r.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&ZP(e,o,n,l),tl=!1,d=e.memoizedState,o.state=d,xg(e,n,o,s);var v=e.memoizedState;a!==u||d!==v||is.current||tl?(typeof h=="function"&&(m6(e,r,h,n),v=e.memoizedState),(c=tl||XP(e,r,c,n,d,v,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=v),o.props=n,o.state=v,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),n=!1)}return w6(t,e,r,n,i,s)}function w6(t,e,r,n,s,i){dj(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&GP(e,r,!1),ha(t,e,i);n=e.stateNode,ote.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=_d(e,t.child,null,i),e.child=_d(e,null,a,i)):Nn(t,e,a,i),e.memoizedState=n.state,s&&GP(e,r,!0),e.child}function hj(t){var e=t.stateNode;e.pendingContext?HP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&HP(t,e.context,!1),$8(t,e.containerInfo)}function cT(t,e,r,n,s){return Ad(),w8(s),e.flags|=256,Nn(t,e,r,n),e.child}var x6={dehydrated:null,treeContext:null,retryLane:0};function C6(t){return{baseLanes:t,cachePool:null,transitions:null}}function vj(t,e,r){var n=e.pendingProps,s=or.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),bt(or,s&1),t===null)return v6(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=I2(o,n,0,null),t=rf(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=C6(r),e.memoizedState=x6,t):M8(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return ate(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=$l(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=$l(a,i):(i=rf(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?C6(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=x6,n}return i=t.child,t=i.sibling,n=$l(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function M8(t,e){return e=I2({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function am(t,e,r,n){return n!==null&&w8(n),_d(e,t.child,null,r),t=M8(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ate(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=IC(Error(le(422))),am(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=I2({mode:"visible",children:n.children},s,0,null),i=rf(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&_d(e,t.child,null,o),e.child.memoizedState=C6(o),e.memoizedState=x6,i);if(!(e.mode&1))return am(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(le(419)),n=IC(i,n,void 0),am(t,e,o,n)}if(a=(o&t.childLanes)!==0,rs||a){if(n=Zr,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,da(t,s),Mi(n,t,s,-1))}return B8(),n=IC(Error(le(421))),am(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=wte.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Ss=Cl(s.nextSibling),As=e,tr=!0,Ai=null,t!==null&&(Gs[Ks++]=ea,Gs[Ks++]=ta,Gs[Ks++]=vf,ea=t.id,ta=t.overflow,vf=e),e=M8(e,n.children),e.flags|=4096,e)}function fT(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),y6(t.return,e,r)}function OC(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function yj(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(Nn(t,e,n.children,r),n=or.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fT(t,r,e);else if(t.tag===19)fT(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(bt(or,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Cg(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),OC(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Cg(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}OC(e,!0,r,null,i);break;case"together":OC(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function pp(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ha(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),mf|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(le(153));if(e.child!==null){for(t=e.child,r=$l(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=$l(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function lte(t,e,r){switch(e.tag){case 3:hj(e),Ad();break;case 5:zL(e);break;case 1:os(e.type)&&mg(e);break;case 4:$8(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;bt(bg,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(bt(or,or.current&1),e.flags|=128,null):r&e.child.childLanes?vj(t,e,r):(bt(or,or.current&1),t=ha(t,e,r),t!==null?t.sibling:null);bt(or,or.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return yj(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(or,or.current),n)break;return null;case 22:case 23:return e.lanes=0,uj(t,e,r)}return ha(t,e,r)}var mj,E6,pj,gj;mj=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};E6=function(){};pj=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Kc(wo.current);var i=null;switch(r){case"input":s=W5(t,s),n=W5(t,n),i=[];break;case"select":s=dr({},s,{value:void 0}),n=dr({},n,{value:void 0}),i=[];break;case"textarea":s=K5(t,s),n=K5(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=vg)}Y5(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Iv.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Iv.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ut("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};gj=function(t,e,r,n){r!==n&&(e.flags|=4)};function o1(t,e){if(!tr)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function mn(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function cte(t,e,r){var n=e.pendingProps;switch(b8(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(e),null;case 1:return os(e.type)&&yg(),mn(e),null;case 3:return n=e.stateNode,Pd(),Wt(is),Wt(_n),_8(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(im(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ai!==null&&(R6(Ai),Ai=null))),E6(t,e),mn(e),null;case 5:A8(e);var s=Kc(qv.current);if(r=e.type,t!==null&&e.stateNode!=null)pj(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(le(166));return mn(e),null}if(t=Kc(wo.current),im(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[fo]=e,n[zv]=i,t=(e.mode&1)!==0,r){case"dialog":Ut("cancel",n),Ut("close",n);break;case"iframe":case"object":case"embed":Ut("load",n);break;case"video":case"audio":for(s=0;s<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[fo]=e,t[zv]=n,mj(t,e,!1,!1),e.stateNode=t;e:{switch(o=J5(r,n),r){case"dialog":Ut("cancel",t),Ut("close",t),s=n;break;case"iframe":case"object":case"embed":Ut("load",t),s=n;break;case"video":case"audio":for(s=0;sRd&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304)}else{if(!n)if(t=Cg(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),o1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!tr)return mn(e),null}else 2*kr()-i.renderingStartTime>Rd&&r!==1073741824&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=kr(),e.sibling=null,r=or.current,bt(or,n?r&1|2:r&1),e):(mn(e),null);case 22:case 23:return F8(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?gs&1073741824&&(mn(e),e.subtreeFlags&6&&(e.flags|=8192)):mn(e),null;case 24:return null;case 25:return null}throw Error(le(156,e.tag))}function fte(t,e){switch(b8(e),e.tag){case 1:return os(e.type)&&yg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Pd(),Wt(is),Wt(_n),_8(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return A8(e),null;case 13:if(Wt(or),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(le(340));Ad()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(or),null;case 4:return Pd(),null;case 10:return E8(e.type._context),null;case 22:case 23:return F8(),null;case 24:return null;default:return null}}var lm=!1,wn=!1,ute=typeof WeakSet=="function"?WeakSet:Set,de=null;function Fu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){mr(t,e,n)}else r.current=null}function S6(t,e,r){try{r()}catch(n){mr(t,e,n)}}var uT=!1;function dte(t,e){if(a6=ug,t=CL(),p8(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===s&&(a=o),d===i&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(l6={focusedElem:t,selectionRange:r},ug=!1,de=e;de!==null;)if(e=de,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,de=t;else for(;de!==null;){e=de;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,g=v.memoizedState,b=e.stateNode,p=b.getSnapshotBeforeUpdate(e.elementType===e.type?y:Si(e.type,y),g);b.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(E){mr(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,de=t;break}de=e.return}return v=uT,uT=!1,v}function H1(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&S6(e,r,i)}s=s.next}while(s!==n)}}function T2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function k6(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function bj(t){var e=t.alternate;e!==null&&(t.alternate=null,bj(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[fo],delete e[zv],delete e[u6],delete e[Kee],delete e[Qee])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function wj(t){return t.tag===5||t.tag===3||t.tag===4}function dT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wj(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=vg));else if(n!==4&&(t=t.child,t!==null))for($6(t,e,r),t=t.sibling;t!==null;)$6(t,e,r),t=t.sibling}function A6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(A6(t,e,r),t=t.sibling;t!==null;)A6(t,e,r),t=t.sibling}var an=null,$i=!1;function qa(t,e,r){for(r=r.child;r!==null;)xj(t,e,r),r=r.sibling}function xj(t,e,r){if(bo&&typeof bo.onCommitFiberUnmount=="function")try{bo.onCommitFiberUnmount(C2,r)}catch{}switch(r.tag){case 5:wn||Fu(r,e);case 6:var n=an,s=$i;an=null,qa(t,e,r),an=n,$i=s,an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):an.removeChild(r.stateNode));break;case 18:an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?$C(t.parentNode,r):t.nodeType===1&&$C(t,r),Lv(t)):$C(an,r.stateNode));break;case 4:n=an,s=$i,an=r.stateNode.containerInfo,$i=!0,qa(t,e,r),an=n,$i=s;break;case 0:case 11:case 14:case 15:if(!wn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&S6(r,e,o),s=s.next}while(s!==n)}qa(t,e,r);break;case 1:if(!wn&&(Fu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){mr(r,e,a)}qa(t,e,r);break;case 21:qa(t,e,r);break;case 22:r.mode&1?(wn=(n=wn)||r.memoizedState!==null,qa(t,e,r),wn=n):qa(t,e,r);break;default:qa(t,e,r)}}function hT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new ute),e.forEach(function(n){var s=xte.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function vi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=kr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vte(n/1960))-n,10t?16:t,ul===null)var n=!1;else{if(t=ul,ul=null,Ag=0,ot&6)throw Error(le(331));var s=ot;for(ot|=4,de=t.current;de!==null;){var i=de,o=i.child;if(de.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lkr()-L8?tf(t,0):N8|=r),as(t,e)}function Pj(t,e){e===0&&(t.mode&1?(e=Z0,Z0<<=1,!(Z0&130023424)&&(Z0=4194304)):e=1);var r=Un();t=da(t,e),t!==null&&(n0(t,e,r),as(t,r))}function wte(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Pj(t,r)}function xte(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(le(314))}n!==null&&n.delete(e),Pj(t,r)}var Tj;Tj=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||is.current)rs=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return rs=!1,lte(t,e,r);rs=!!(t.flags&131072)}else rs=!1,tr&&e.flags&1048576&&OL(e,gg,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;pp(t,e),t=e.pendingProps;var s=$d(e,_n.current);id(e,r),s=T8(null,e,n,t,s,r);var i=R8();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,os(n)?(i=!0,mg(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,k8(e),s.updater=_2,e.stateNode=s,s._reactInternals=e,p6(e,n,t,r),e=w6(null,e,n,!0,i,r)):(e.tag=0,tr&&i&&g8(e),Nn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(pp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=Ete(n),t=Si(n,t),s){case 0:e=b6(null,e,n,t,r);break e;case 1:e=lT(null,e,n,t,r);break e;case 11:e=oT(null,e,n,t,r);break e;case 14:e=aT(null,e,n,Si(n.type,t),r);break e}throw Error(le(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),b6(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),lT(t,e,n,s,r);case 3:e:{if(hj(e),t===null)throw Error(le(387));n=e.pendingProps,i=e.memoizedState,s=i.element,LL(t,e),xg(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Td(Error(le(423)),e),e=cT(t,e,n,r,s);break e}else if(n!==s){s=Td(Error(le(424)),e),e=cT(t,e,n,r,s);break e}else for(Ss=Cl(e.stateNode.containerInfo.firstChild),As=e,tr=!0,Ai=null,r=UL(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ad(),n===s){e=ha(t,e,r);break e}Nn(t,e,n,r)}e=e.child}return e;case 5:return zL(e),t===null&&v6(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,c6(n,s)?o=null:i!==null&&c6(n,i)&&(e.flags|=32),dj(t,e),Nn(t,e,o,r),e.child;case 6:return t===null&&v6(e),null;case 13:return vj(t,e,r);case 4:return $8(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_d(e,null,n,r):Nn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),oT(t,e,n,s,r);case 7:return Nn(t,e,e.pendingProps,r),e.child;case 8:return Nn(t,e,e.pendingProps.children,r),e.child;case 12:return Nn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,bt(bg,n._currentValue),n._currentValue=o,i!==null)if(Fi(i.value,o)){if(i.children===s.children&&!is.current){e=ha(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=na(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),y6(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(le(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),y6(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Nn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,id(e,r),s=ei(s),n=n(s),e.flags|=1,Nn(t,e,n,r),e.child;case 14:return n=e.type,s=Si(n,e.pendingProps),s=Si(n.type,s),aT(t,e,n,s,r);case 15:return fj(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),pp(t,e),e.tag=1,os(n)?(t=!0,mg(e)):t=!1,id(e,r),FL(e,n,s),p6(e,n,s,r),w6(null,e,n,!0,t,r);case 19:return yj(t,e,r);case 22:return uj(t,e,r)}throw Error(le(156,e.tag))};function Rj(t,e){return nL(t,e)}function Cte(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qs(t,e,r,n){return new Cte(t,e,r,n)}function U8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ete(t){if(typeof t=="function")return U8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===o8)return 11;if(t===a8)return 14}return 2}function $l(t,e){var r=t.alternate;return r===null?(r=Qs(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function wp(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")U8(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Tu:return rf(r.children,s,i,e);case i8:o=8,s|=8;break;case U5:return t=Qs(12,r,e,s|2),t.elementType=U5,t.lanes=i,t;case z5:return t=Qs(13,r,e,s),t.elementType=z5,t.lanes=i,t;case V5:return t=Qs(19,r,e,s),t.elementType=V5,t.lanes=i,t;case BN:return I2(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jN:o=10;break e;case FN:o=9;break e;case o8:o=11;break e;case a8:o=14;break e;case el:o=16,n=null;break e}throw Error(le(130,t==null?t:typeof t,""))}return e=Qs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function rf(t,e,r,n){return t=Qs(7,t,n,e),t.lanes=r,t}function I2(t,e,r,n){return t=Qs(22,t,n,e),t.elementType=BN,t.lanes=r,t.stateNode={isHidden:!1},t}function MC(t,e,r){return t=Qs(6,t,null,e),t.lanes=r,t}function DC(t,e,r){return e=Qs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ste(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yC(0),this.expirationTimes=yC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yC(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function z8(t,e,r,n,s,i,o,a,l){return t=new Ste(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Qs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},k8(i),t}function kte(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=Ms})($Z);const H8=$N(Kr);var xT=Kr;j5.createRoot=xT.createRoot,j5.hydrateRoot=xT.hydrateRoot;const G8=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),L2=m.createContext({});function Tte(){return m.useContext(L2).visualElement}const a0=m.createContext(null),j2=typeof document<"u",Tg=j2?m.useLayoutEffect:m.useEffect,Dj=m.createContext({strict:!1});function Rte(t,e,r,n){const s=Tte(),i=m.useContext(Dj),o=m.useContext(a0),a=m.useContext(G8).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return Tg(()=>{c&&c.render()}),(window.HandoffAppearAnimations?Tg:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Uu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ite(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Uu(r)&&(r.current=n))},[e])}function Qv(t){return typeof t=="string"||Array.isArray(t)}function F2(t){return typeof t=="object"&&typeof t.start=="function"}const Ote=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function B2(t){return F2(t.animate)||Ote.some(e=>Qv(t[e]))}function Nj(t){return Boolean(B2(t)||t.variants)}function Mte(t,e){if(B2(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Qv(r)?r:void 0,animate:Qv(n)?n:void 0}}return t.inherit!==!1?e:{}}function Dte(t){const{initial:e,animate:r}=Mte(t,m.useContext(L2));return m.useMemo(()=>({initial:e,animate:r}),[CT(e),CT(r)])}function CT(t){return Array.isArray(t)?t.join(" "):t}const Uo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Yv={measureLayout:Uo(["layout","layoutId","drag"]),animation:Uo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Uo(["exit"]),drag:Uo(["drag","dragControls"]),focus:Uo(["whileFocus"]),hover:Uo(["whileHover","onHoverStart","onHoverEnd"]),tap:Uo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Uo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Uo(["whileInView","onViewportEnter","onViewportLeave"])};function Nte(t){for(const e in t)e==="projectionNodeConstructor"?Yv.projectionNodeConstructor=t[e]:Yv[e].Component=t[e]}function U2(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Lte=1;function jte(){return U2(()=>{if(Q1.hasEverUpdated)return Lte++})}const K8=m.createContext({});let Fte=class extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}};const Lj=m.createContext({}),Bte=Symbol.for("motionComponentSymbol");function Ute({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&Nte(t);function o(l,c){const f={...m.useContext(G8),...l,layoutId:zte(l)},{isStatic:u}=f;let d=null;const h=Dte(l),v=u?void 0:jte(),y=s(l,u);if(!u&&j2){h.visualElement=Rte(i,y,f,e);const g=m.useContext(Dj).strict,b=m.useContext(Lj);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Yv.projectionNodeConstructor,b))}return m.createElement(Fte,{visualElement:h.visualElement,props:f},d,m.createElement(L2.Provider,{value:h},n(i,l,v,Ite(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Bte]=i,a}function zte({layoutId:t}){const e=m.useContext(K8).id;return e&&t!==void 0?e+"-"+t:t}function Vte(t){function e(n,s={}){return Ute(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const qte=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Q8(t){return typeof t!="string"||t.includes("-")?!1:!!(qte.indexOf(t)>-1||/[A-Z]/.test(t))}const Rg={};function Wte(t){Object.assign(Rg,t)}const Ig=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yh=new Set(Ig);function jj(t,{layout:e,layoutId:r}){return yh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Rg[t]||t==="opacity")}const fs=t=>!!(t!=null&&t.getVelocity),Hte={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gte=(t,e)=>Ig.indexOf(t)-Ig.indexOf(e);function Kte({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Gte);for(const a of e)o+=`${Hte[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function Fj(t){return t.startsWith("--")}const Qte=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Id=(t,e,r)=>Math.min(Math.max(r,t),e),jf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Y1={...jf,transform:t=>Id(0,1,t)},um={...jf,default:1},J1=t=>Math.round(t*1e5)/1e5,Jv=/(-)?([\d]*\.?[\d])+/g,I6=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Yte=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function l0(t){return typeof t=="string"}const c0=t=>({test:e=>l0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ga=c0("deg"),xo=c0("%"),Ce=c0("px"),Jte=c0("vh"),Xte=c0("vw"),ET={...xo,parse:t=>xo.parse(t)/100,transform:t=>xo.transform(t*100)},ST={...jf,transform:Math.round},Bj={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,size:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,rotate:Ga,rotateX:Ga,rotateY:Ga,rotateZ:Ga,scale:um,scaleX:um,scaleY:um,scaleZ:um,skew:Ga,skewX:Ga,skewY:Ga,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:Y1,originX:ET,originY:ET,originZ:Ce,zIndex:ST,fillOpacity:Y1,strokeOpacity:Y1,numOctaves:ST};function Y8(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(Fj(d)){i[d]=h;continue}const v=Bj[d],y=Qte(h,v);if(yh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Kte(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const J8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Uj(t,e,r){for(const n in e)!fs(e[n])&&!jj(n,r)&&(t[n]=e[n])}function Zte({transformTemplate:t},e,r){return m.useMemo(()=>{const n=J8();return Y8(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function ere(t,e,r){const n=t.style||{},s={};return Uj(s,n,t),Object.assign(s,Zte(t,e,r)),t.transformValues?t.transformValues(s):s}function tre(t,e,r){const n={},s=ere(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const rre=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],nre=["whileTap","onTap","onTapStart","onTapCancel"],sre=["onPan","onPanStart","onPanSessionStart","onPanEnd"],ire=["whileInView","onViewportEnter","onViewportLeave","viewport"],ore=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","layoutScroll","layoutRoot","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd",...ire,...nre,...rre,...sre]);function Og(t){return ore.has(t)}let zj=t=>!Og(t);function are(t){t&&(zj=e=>e.startsWith("on")?!Og(e):t(e))}try{are(require("@emotion/is-prop-valid").default)}catch{}function lre(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(zj(s)||r===!0&&Og(s)||!e&&!Og(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function kT(t,e,r){return typeof t=="string"?t:Ce.transform(e+r*t)}function cre(t,e,r){const n=kT(e,t.x,t.width),s=kT(r,t.y,t.height);return`${n} ${s}`}const fre={offset:"stroke-dashoffset",array:"stroke-dasharray"},ure={offset:"strokeDashoffset",array:"strokeDasharray"};function dre(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?fre:ure;t[i.offset]=Ce.transform(-n);const o=Ce.transform(e),a=Ce.transform(r);t[i.array]=`${o} ${a}`}function X8(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(Y8(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=cre(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&dre(d,i,o,a,!1)}const Vj=()=>({...J8(),attrs:{}}),Z8=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hre(t,e,r,n){const s=m.useMemo(()=>{const i=Vj();return X8(i,e,{enableHardwareAcceleration:!1},Z8(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Uj(i,t.style,t),s.style={...i,...s.style}}return s}function vre(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(Q8(r)?hre:tre)(n,o,a,r),u={...lre(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>fs(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const e$=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function qj(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const Wj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hj(t,e,r,n){qj(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(Wj.has(s)?s:e$(s),e.attrs[s])}function t$(t,e){const{style:r}=t,n={};for(const s in r)(fs(r[s])||e.style&&fs(e.style[s])||jj(s,t))&&(n[s]=r[s]);return n}function Gj(t,e){const r=t$(t,e);for(const n in t)if(fs(t[n])||fs(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function r$(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Mg=t=>Array.isArray(t),yre=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),mre=t=>Mg(t)?t[t.length-1]||0:t;function xp(t){const e=fs(t)?t.get():t;return yre(e)?e.toValue():e}function pre({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:gre(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Kj=t=>(e,r)=>{const n=m.useContext(L2),s=m.useContext(a0),i=()=>pre(t,e,n,s);return r?i():U2(i)};function gre(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=xp(i[d]);let{initial:o,animate:a}=t;const l=B2(t),c=Nj(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!F2(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=r$(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const bre={useVisualState:Kj({scrapeMotionValuesFromProps:Gj,createRenderState:Vj,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}X8(r,n,{enableHardwareAcceleration:!1},Z8(e.tagName),t.transformTemplate),Hj(e,r)}})},wre={useVisualState:Kj({scrapeMotionValuesFromProps:t$,createRenderState:J8})};function xre(t,{forwardMotionProps:e=!1},r,n,s){return{...Q8(t)?bre:wre,preloadedFeatures:r,useRender:vre(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var pt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(pt||(pt={}));function z2(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function O6(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return z2(s,e,r,n)},[t,e,r,n])}function Cre({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(pt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(pt.Focus,!1)},[r]);O6(e,"focus",t?n:void 0),O6(e,"blur",t?s:void 0)}const Qj=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function n$(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Yj=t=>e=>Qj(e)&&t(e,n$(e));function ad(t,e,r,n){return z2(t,e,Yj(r),n)}function Dg(t,e,r,n){return O6(t,e,r&&Yj(r),n)}function Jj(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const $T=Jj("dragHorizontal"),AT=Jj("dragVertical");function Xj(t){let e=!1;if(t==="y")e=AT();else if(t==="x")e=$T();else{const r=$T(),n=AT();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function Zj(){const t=Xj(!0);return t?(t(),!1):!0}function _T(t,e,r,n){return(s,i)=>{s.type==="touch"||Zj()||(r&&t.animationState&&t.animationState.setActive(pt.Hover,e),n&&n(s,i))}}function Ere({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Dg(n,"pointerenter",m.useMemo(()=>t||r?_T(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Dg(n,"pointerleave",m.useMemo(()=>e||r?_T(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const eF=(t,e)=>e?t===e?!0:eF(t,e.parentElement):!1;function s$(t){return m.useEffect(()=>()=>t(),[])}const Sre=(t,e)=>r=>e(t(r)),V2=(...t)=>t.reduce(Sre);function kre({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!1),!Zj()}function d(y,g){var b,p,w,E;u()&&(eF(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=V2(ad(window,"pointerup",d,c),ad(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Dg(s,"pointerdown",o?v:void 0,c),s$(f)}const M6=new WeakMap,NC=new WeakMap,$re=t=>{const e=M6.get(t.target);e&&e(t)},Are=t=>{t.forEach($re)};function _re({root:t,...e}){const r=t||document;NC.has(r)||NC.set(r,{});const n=NC.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Are,{root:t,...e})),n[s]}function Pre(t,e,r){const n=_re(e);return M6.set(t,r),n.observe(t),()=>{M6.delete(t),n.unobserve(t)}}function Tre({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?Ore:Ire)(o,i.current,t,s)}const Rre={some:0,all:1};function Ire(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:Rre[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(pt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return Pre(r.current,a,l)},[t,n,s,i])}function Ore(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(pt.InView,!0)})},[t])}const dl=t=>e=>(t(e),null),Mre={inView:dl(Tre),tap:dl(kre),focus:dl(Cre),hover:dl(Ere)};function tF(){const t=m.useContext(a0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function rF(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),Nre=t=>/^0[^.\s]+$/.test(t),sa={delta:0,timestamp:0},nF=1/60*1e3,Lre=typeof performance<"u"?()=>performance.now():()=>Date.now(),sF=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lre()),nF);function jre(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=jre(()=>Xv=!0),t),{}),zn=f0.reduce((t,e)=>{const r=q2[e];return t[e]=(n,s=!1,i=!1)=>(Xv||Ure(),r.schedule(n,s,i)),t},{}),Ll=f0.reduce((t,e)=>(t[e]=q2[e].cancel,t),{}),LC=f0.reduce((t,e)=>(t[e]=()=>q2[e].process(sa),t),{}),Bre=t=>q2[t].process(sa),iF=t=>{Xv=!1,sa.delta=D6?nF:Math.max(Math.min(t-sa.timestamp,Fre),1),sa.timestamp=t,N6=!0,f0.forEach(Bre),N6=!1,Xv&&(D6=!1,sF(iF))},Ure=()=>{Xv=!0,D6=!0,N6||sF(iF)};function i$(t,e){t.indexOf(e)===-1&&t.push(e)}function o$(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}let a$=class{constructor(){this.subscriptions=[]}add(e){return i$(this.subscriptions,e),()=>o$(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));let Vre=class{constructor(e,r={}){this.version="8.5.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sa;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,zn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>zn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=zre(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new a$);const n=this.events[e].add(r);return e==="change"?()=>{n(),zn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?l$(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Od(t,e){return new Vre(t,e)}const c$=(t,e)=>r=>Boolean(l0(r)&&Yte.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),oF=(t,e,r)=>n=>{if(!l0(n))return n;const[s,i,o,a]=n.match(Jv);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},qre=t=>Id(0,255,t),jC={...jf,transform:t=>Math.round(qre(t))},Qc={test:c$("rgb","red"),parse:oF("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+jC.transform(t)+", "+jC.transform(e)+", "+jC.transform(r)+", "+J1(Y1.transform(n))+")"};function Wre(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const L6={test:c$("#"),parse:Wre,transform:Qc.transform},zu={test:c$("hsl","hue"),parse:oF("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+xo.transform(J1(e))+", "+xo.transform(J1(r))+", "+J1(Y1.transform(n))+")"},Mn={test:t=>Qc.test(t)||L6.test(t)||zu.test(t),parse:t=>Qc.test(t)?Qc.parse(t):zu.test(t)?zu.parse(t):L6.parse(t),transform:t=>l0(t)?t:t.hasOwnProperty("red")?Qc.transform(t):zu.transform(t)},aF="${c}",lF="${n}";function Hre(t){var e,r;return isNaN(t)&&l0(t)&&(((e=t.match(Jv))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(I6))===null||r===void 0?void 0:r.length)||0)>0}function Ng(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(I6);s&&(r=s.length,t=t.replace(I6,aF),e.push(...s.map(Mn.parse)));const i=t.match(Jv);return i&&(n=i.length,t=t.replace(Jv,lF),e.push(...i.map(jf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function cF(t){return Ng(t).values}function fF(t){const{values:e,numColors:r,tokenised:n}=Ng(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Kre(t){const e=cF(t);return fF(t)(e.map(Gre))}const jl={test:Hre,parse:cF,createTransformer:fF,getAnimatableNone:Kre},Qre=new Set(["brightness","contrast","saturate","opacity"]);function Yre(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Jv)||[];if(!n)return t;const s=r.replace(n,"");let i=Qre.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const Jre=/([a-z-]*)\(.*?\)/g,j6={...jl,getAnimatableNone:t=>{const e=t.match(Jre);return e?e.map(Yre).join(" "):t}},Xre={...Bj,color:Mn,backgroundColor:Mn,outlineColor:Mn,fill:Mn,stroke:Mn,borderColor:Mn,borderTopColor:Mn,borderRightColor:Mn,borderBottomColor:Mn,borderLeftColor:Mn,filter:j6,WebkitFilter:j6},f$=t=>Xre[t];function u$(t,e){var r;let n=f$(t);return n!==j6&&(n=jl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const uF=t=>e=>e.test(t),Zre={test:t=>t==="auto",parse:t=>t},dF=[jf,Ce,xo,Ga,Xte,Jte,Zre],l1=t=>dF.find(uF(t)),ene=[...dF,Mn,jl],tne=t=>ene.find(uF(t));function rne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function nne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function W2(t,e,r){const n=t.getProps();return r$(n,e,r!==void 0?r:n.custom,rne(t),nne(t))}function sne(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Od(r))}function ine(t,e){const r=W2(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=mre(i[o]);sne(t,o,a)}}function one(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,une={current:!1},d$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,h$=t=>e=>1-t(1-e),v$=t=>t*t,dne=h$(v$),y$=d$(v$),br=(t,e,r)=>-r*t+r*e+t;function FC(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hne({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=FC(l,a,t+1/3),i=FC(l,a,t),o=FC(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const BC=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},vne=[L6,Qc,zu],yne=t=>vne.find(e=>e.test(t));function PT(t){const e=yne(t);let r=e.parse(t);return e===zu&&(r=hne(r)),r}const vF=(t,e)=>{const r=PT(t),n=PT(e),s={...r};return i=>(s.red=BC(r.red,n.red,i),s.green=BC(r.green,n.green,i),s.blue=BC(r.blue,n.blue,i),s.alpha=br(r.alpha,n.alpha,i),Qc.transform(s))};function yF(t,e){return typeof t=="number"?r=>br(t,e,r):Mn.test(t)?vF(t,e):pF(t,e)}const mF=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>yF(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=yF(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},pF=(t,e)=>{const r=jl.createTransformer(e),n=Ng(t),s=Ng(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?V2(mF(n.values,s.values),r):o=>`${o>0?e:t}`},jg=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},TT=(t,e)=>r=>br(t,e,r);function pne(t){return typeof t=="number"?TT:typeof t=="string"?Mn.test(t)?vF:pF:Array.isArray(t)?mF:typeof t=="object"?mne:TT}function gne(t,e,r){const n=[],s=r||pne(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=gne(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Id(t[0],t[i-1],c)):l}const m$=t=>t,bF=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,bne=1e-7,wne=12;function xne(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=bF(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>bne&&++axne(i,0,1,t,r);return i=>i===0||i===1?i:bF(s(i),e,n)}const xF=t=>1-Math.sin(Math.acos(t)),p$=h$(xF),Cne=d$(p$),CF=wF(.33,1.53,.69,.99),g$=h$(CF),Ene=d$(g$),Sne=t=>(t*=2)<1?.5*g$(t):.5*(2-Math.pow(2,-10*(t-1))),kne={linear:m$,easeIn:v$,easeInOut:y$,easeOut:dne,circIn:xF,circInOut:Cne,circOut:p$,backIn:g$,backInOut:Ene,backOut:CF,anticipate:Sne},RT=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return wF(e,r,n,s)}else if(typeof t=="string")return kne[t];return t},$ne=t=>Array.isArray(t)&&typeof t[0]!="number";function Ane(t,e){return t.map(()=>e||y$).splice(0,t.length-1)}function _ne(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Pne(t,e){return t.map(r=>r*e)}function F6({keyframes:t,ease:e=y$,times:r,duration:n=300}){t=[...t];const s=$ne(e)?e.map(RT):RT(e),i={done:!1,value:t[0]},o=Pne(r&&r.length===t.length?r:_ne(t),n);function a(){return gF(o,t,{ease:Array.isArray(s)?s:Ane(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const UC=.001,Tne=.01,IT=10,Rne=.05,Ine=1;function One({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=IT*1e3);let o=1-e;o=Id(Rne,Ine,o),t=Id(Tne,IT,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=B6(c,o),v=Math.exp(-u);return UC-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=B6(Math.pow(c,2),o);return(-s(c)+UC>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-UC+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=Dne(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const Mne=12;function Dne(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function jne(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!OT(t,Lne)&&OT(t,Nne)){const r=One(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Fne=5;function EF({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=jne(n);let h=Bne,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=B6(p,y);h=k=>{const A=Math.exp(-y*p*k);return i-A*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const A=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-A*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const A=Math.max(0,b-Fne);w=l$(p-h(A),b-A)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}EF.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Bne=t=>0;function Une({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const zne={decay:Une,keyframes:F6,tween:F6,spring:EF};function SF(t,e,r=0){return t-e-r}function Vne(t,e=0,r=0,n=!0){return n?SF(e+-t,e,r):e-(t-e)+r}function qne(t,e,r,n){return n?t>=e+r:t<=-r}const Wne=t=>{const e=({delta:r})=>t(r);return{start:()=>zn.update(e,!0),stop:()=>Ll.update(e)}};function Fg({duration:t,driver:e=Wne,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,A=!0,x;const T=zne[o.length>2?"keyframes":h]||F6,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=gF([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?(A=w%2===0,r=Vne(r,E,i,A)):(r=SF(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){A||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=A?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function Hne(t){return!t||Array.isArray(t)||typeof t=="string"&&kF[t]}const M1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,kF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M1([0,.65,.55,1]),circOut:M1([.55,0,1,.45]),backIn:M1([.31,.01,.66,-.59]),backOut:M1([.33,1.53,.69,.99])};function Gne(t){if(t)return Array.isArray(t)?M1(t):kF[t]}function Kne(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:Gne(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const MT={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},zC={},$F={};for(const t in MT)$F[t]=()=>(zC[t]===void 0&&(zC[t]=MT[t]()),zC[t]);function Qne(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Yne=new Set(["opacity"]),dm=10;function Jne(t,e,{onUpdate:r,onComplete:n,...s}){if(!($F.waapi()&&Yne.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!Hne(s.ease)){if(s.repeat===1/0)return;const u=Fg({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=dm;o=h,a=v-dm,c="linear"}const f=Kne(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(Qne(o,s)),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=Fg({...s,autoplay:!1});t.setWithVelocity(d.sample(u-dm).value,d.sample(u).value,dm)}zn.update(()=>f.cancel())}}}function AF(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ll.read(n),t(i-e))};return zn.read(n,!0),()=>Ll.read(n)}function Xne({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:AF(s,-e)}:s()}function Zne({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var A;u==null||u(k),(A=E.onUpdate)===null||A===void 0||A.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),A=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=l$(L-x,sa.delta),(A===1&&L>k||A===-1&&Ly==null?void 0:y.stop()}}const kc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),hm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),VC=()=>({type:"keyframes",ease:"linear",duration:.3}),ese={type:"keyframes",duration:.8},DT={x:kc,y:kc,z:kc,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scaleX:hm,scaleY:hm,scale:hm,opacity:VC,backgroundColor:VC,color:VC,default:hm},tse=(t,{keyframes:e})=>e.length>2?ese:(DT[t]||DT.default)(e[1]),U6=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&jl.test(e)&&!e.startsWith("url("));function rse({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function NT(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function LT(t){return typeof t=="number"?0:u$("",t)}function _F(t,e){return t[e]||t.default||t}function nse(t,e,r,n){const s=U6(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=u$(e,r):NT(i)&&typeof r=="string"?i=LT(r):!Array.isArray(r)&&NT(r)&&typeof i=="string"&&(r=LT(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const b$=(t,e,r,n={})=>s=>{const i=_F(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Cp(o);const l=nse(e,t,r,i),c=l[0],f=l[l.length-1],u=U6(t,c),d=U6(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||une.current||i.type===!1)return Xne(h);if(i.type==="inertia")return Zne(h);rse(i)||(h={...h,...tse(t,h)}),h.duration&&(h.duration=Cp(h.duration)),h.repeatDelay&&(h.repeatDelay=Cp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=Jne(e,t,h);if(g)return g}return Fg(h)};function sse(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>z6(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=z6(t,e,r);else{const s=typeof e=="function"?W2(t,e,r.custom):e;n=PF(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function z6(t,e,r={}){var n;const s=W2(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>PF(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return ise(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function PF(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&ase(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[fne];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,zn))}let g=h.start(b$(d,h,v,t.shouldReduceMotion&&yh.has(d)?{type:!1}:y));Lg(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&ine(t,a)})}function ise(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(ose).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(z6(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function ose(t,e){return t.sortNodePosition(e)}function ase({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const w$=[pt.Animate,pt.InView,pt.Focus,pt.Hover,pt.Tap,pt.Drag,pt.Exit],lse=[...w$].reverse(),cse=w$.length;function fse(t){return e=>Promise.all(e.map(({animation:r,options:n})=>sse(t,r,n)))}function use(t){let e=fse(t);const r=hse();let n=!0;const s=(l,c)=>{const f=W2(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});A===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Mg(R)&&Mg(M)?!rF(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function dse(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!rF(e,t):!1}function $c(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hse(){return{[pt.Animate]:$c(!0),[pt.InView]:$c(),[pt.Hover]:$c(),[pt.Tap]:$c(),[pt.Drag]:$c(),[pt.Focus]:$c(),[pt.Exit]:$c()}}const vse={animation:dl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=use(t)),F2(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:dl(t=>{const{custom:e,visualElement:r}=t,[n,s]=tF(),i=m.useContext(a0);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(pt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},jT=(t,e)=>Math.abs(t-e);function yse(t,e){const r=jT(t.x,e.x),n=jT(t.y,e.y);return Math.sqrt(r**2+n**2)}let TF=class{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=WC(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=yse(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=sa;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=qC(f,this.transformPagePoint),zn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=WC(c.type==="pointercancel"?this.lastMoveEventInfo:qC(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!Qj(e))return;this.handlers=r,this.transformPagePoint=n;const s=n$(e),i=qC(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=sa;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,WC(i,this.history)),this.removeListeners=V2(ad(window,"pointermove",this.handlePointerMove),ad(window,"pointerup",this.handlePointerUp),ad(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ll.update(this.updatePoint)}};function qC(t,e){return e?{point:e(t.point)}:t}function FT(t,e){return{x:t.x-e.x,y:t.y-e.y}}function WC({point:t},e){return{point:t,delta:FT(t,RF(e)),offset:FT(t,mse(e)),velocity:pse(e,.1)}}function mse(t){return t[0]}function RF(t){return t[t.length-1]}function pse(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=RF(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Cp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Is(t){return t.max-t.min}function V6(t,e=0,r=.01){return Math.abs(t-e)<=r}function BT(t,e,r,n=.5){t.origin=n,t.originPoint=br(e.min,e.max,t.origin),t.scale=Is(r)/Is(e),(V6(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=br(r.min,r.max,t.origin)-t.originPoint,(V6(t.translate)||isNaN(t.translate))&&(t.translate=0)}function X1(t,e,r,n){BT(t.x,e.x,r.x,n==null?void 0:n.originX),BT(t.y,e.y,r.y,n==null?void 0:n.originY)}function UT(t,e,r){t.min=r.min+e.min,t.max=t.min+Is(e)}function gse(t,e,r){UT(t.x,e.x,r.x),UT(t.y,e.y,r.y)}function zT(t,e,r){t.min=e.min-r.min,t.max=t.min+Is(e)}function Z1(t,e,r){zT(t.x,e.x,r.x),zT(t.y,e.y,r.y)}function bse(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?br(r,t,n.max):Math.min(t,r)),t}function VT(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function wse(t,{top:e,left:r,bottom:n,right:s}){return{x:VT(t.x,r,s),y:VT(t.y,e,n)}}function qT(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=jg(e.min,e.max-n,t.min):n>s&&(r=jg(t.min,t.max-s,e.min)),Id(0,1,r)}function Ese(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const q6=.35;function Sse(t=q6){return t===!1?t=0:t===!0&&(t=q6),{x:WT(t,"left","right"),y:WT(t,"top","bottom")}}function WT(t,e,r){return{min:HT(t,e),max:HT(t,r)}}function HT(t,e){return typeof t=="number"?t:t[e]||0}const GT=()=>({translate:0,scale:1,origin:0,originPoint:0}),ev=()=>({x:GT(),y:GT()}),KT=()=>({min:0,max:0}),Fr=()=>({x:KT(),y:KT()});function ro(t){return[t("x"),t("y")]}function IF({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function kse({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function $se(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function HC(t){return t===void 0||t===1}function W6({scale:t,scaleX:e,scaleY:r}){return!HC(t)||!HC(e)||!HC(r)}function Oc(t){return W6(t)||OF(t)||t.z||t.rotate||t.rotateX||t.rotateY}function OF(t){return QT(t.x)||QT(t.y)}function QT(t){return t&&t!=="0%"}function Bg(t,e,r){const n=t-r,s=e*n;return r+s}function YT(t,e,r,n,s){return s!==void 0&&(t=Bg(t,s,n)),Bg(t,r,n)+e}function H6(t,e=0,r=1,n,s){t.min=YT(t.min,e,r,n,s),t.max=YT(t.max,e,r,n,s)}function MF(t,{x:e,y:r}){H6(t.x,e.translate,e.scale,e.originPoint),H6(t.y,r.translate,r.scale,r.originPoint)}function Ase(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function rl(t,e){t.min=t.min+e,t.max=t.max+e}function XT(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=br(t.min,t.max,i);H6(t,e[r],e[n],o,e.scale)}const _se=["x","scaleX","originX"],Pse=["y","scaleY","originY"];function Vu(t,e){XT(t.x,e,_se),XT(t.y,e,Pse)}function DF(t,e){return IF($se(t.getBoundingClientRect(),e))}function Tse(t,e,r){const n=DF(t,r),{scroll:s}=e;return s&&(rl(n.x,s.offset.x),rl(n.y,s.offset.y)),n}const Rse=new WeakMap;let Ise=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(n$(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xj(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ro(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(xo.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Is(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(pt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=Ose(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new TF(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(pt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!vm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=bse(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Uu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=wse(n.layoutBox,e):this.constraints=!1,this.elastic=Sse(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ro(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=Ese(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Uu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Tse(n,s.root,this.visualElement.getTransformPagePoint());let o=xse(s.layout.layoutBox,i);if(r){const a=r(kse(o));this.hasMutatedConstraints=!!a,a&&(o=IF(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ro(f=>{if(!vm(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(b$(e,n,0,r))}stopAnimation(){ro(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ro(r=>{const{drag:n}=this.getProps();if(!vm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-br(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Uu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ro(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=Cse({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),ro(a=>{if(!vm(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(br(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Rse.set(this.visualElement,this);const r=this.visualElement.current,n=ad(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Uu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=z2(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(ro(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=q6,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}};function vm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function Ose(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Mse(t){const{dragControls:e,visualElement:r}=t,n=U2(()=>new Ise(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function Dse({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(G8),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new TF(f,l,{transformPagePoint:a})}Dg(s,"pointerdown",i&&c),s$(()=>o.current&&o.current.end())}const Nse={pan:dl(Dse),drag:dl(Mse)};function G6(t){return typeof t=="string"&&t.startsWith("var(--")}const NF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Lse(t){const e=NF.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function K6(t,e,r=1){const[n,s]=Lse(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():G6(s)?K6(s,e,r+1):s}function jse(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!G6(i))return;const o=K6(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!G6(i))continue;const o=K6(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Fse=new Set(["width","height","top","left","right","bottom","x","y"]),LF=t=>Fse.has(t),Bse=t=>Object.keys(t).some(LF),ZT=t=>t===jf||t===Ce;var e7;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(e7||(e7={}));const t7=(t,e)=>parseFloat(t.split(", ")[e]),r7=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return t7(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?t7(i[1],t):0}},Use=new Set(["x","y","z"]),zse=Ig.filter(t=>!Use.has(t));function Vse(t){const e=[];return zse.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const n7={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:r7(4,13),y:r7(5,14)},qse=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=n7[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=n7[c](l,i)}),t},Wse=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(LF);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=l1(f);const d=e[l];let h;if(Mg(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=l1(f);for(let g=y;g=0?window.pageYOffset:null,c=qse(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),j2&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function Hse(t,e,r,n){return Bse(e)?Wse(t,e,r,n):{target:e,transitionEnd:n}}const Gse=(t,e,r,n)=>{const s=jse(t,e,n);return e=s.target,n=s.transitionEnd,Hse(t,e,r,n)},Q6={current:null},jF={current:!1};function Kse(){if(jF.current=!0,!!j2)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Q6.current=t.matches;t.addListener(e),e()}else Q6.current=!1}function Qse(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(fs(i))t.addValue(s,i),Lg(n)&&n.add(s);else if(fs(o))t.addValue(s,Od(i,{owner:t})),Lg(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Od(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const FF=Object.keys(Yv),Yse=FF.length,s7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jse=class{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>zn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=B2(r),this.isVariantNode=Nj(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&fs(u)&&(u.set(o[f],!1),Lg(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),jF.current||Kse(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Q6.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Ll.update(this.notifyUpdate),Ll.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=yh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&zn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Od(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=r$(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new a$),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}};const BF=["initial",...w$],Xse=BF.length;let UF=class extends Jse{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=lne(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){one(this,n,o);const a=Gse(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}};function Zse(t){return window.getComputedStyle(t)}let eie=class extends UF{readValueFromInstance(e,r){if(yh.has(r)){const n=f$(r);return n&&n.default||0}else{const n=Zse(e),s=(Fj(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return DF(e,r)}build(e,r,n,s){Y8(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return t$(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fs(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){qj(e,r,n,s)}},tie=class extends UF{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return yh.has(r)?((n=f$(r))===null||n===void 0?void 0:n.default)||0:(r=Wj.has(r)?r:e$(r),e.getAttribute(r))}measureInstanceViewportBox(){return Fr()}scrapeMotionValuesFromProps(e,r){return Gj(e,r)}build(e,r,n,s){X8(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){Hj(e,r,n,s)}mount(e){this.isSVGTag=Z8(e.tagName),super.mount(e)}};const rie=(t,e)=>Q8(t)?new tie(e,{enableHardwareAcceleration:!1}):new eie(e,{enableHardwareAcceleration:!0});function i7(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const c1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ce.test(t))t=parseFloat(t);else return t;const r=i7(t,e.target.x),n=i7(t,e.target.y);return`${r}% ${n}%`}},o7="_$css",nie={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(NF,h=>(i.push(h),o7)));const o=jl.parse(t);if(o.length>5)return n;const a=jl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=br(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(o7,()=>{const v=i[h];return h++,v})}return d}};let sie=class extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Wte(oie),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Q1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||zn.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}};function iie(t){const[e,r]=tF(),n=m.useContext(K8);return P.createElement(sie,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(Lj),isPresent:e,safeToRemove:r})}const oie={borderRadius:{...c1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:c1,borderTopRightRadius:c1,borderBottomLeftRadius:c1,borderBottomRightRadius:c1,boxShadow:nie},aie={measureLayout:iie};function lie(t,e,r={}){const n=fs(t)?t:Od(t);return n.start(b$("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const zF=["TopLeft","TopRight","BottomLeft","BottomRight"],cie=zF.length,a7=t=>typeof t=="string"?parseFloat(t):t,l7=t=>typeof t=="number"||Ce.test(t);function fie(t,e,r,n,s,i){s?(t.opacity=br(0,r.opacity!==void 0?r.opacity:1,uie(n)),t.opacityExit=br(e.opacity!==void 0?e.opacity:1,0,die(n))):i&&(t.opacity=br(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(jg(t,e,n))}function f7(t,e){t.min=e.min,t.max=e.max}function yi(t,e){f7(t.x,e.x),f7(t.y,e.y)}function u7(t,e,r,n,s){return t-=e,t=Bg(t,1/r,n),s!==void 0&&(t=Bg(t,1/s,n)),t}function hie(t,e=0,r=1,n=.5,s,i=t,o=t){if(xo.test(e)&&(e=parseFloat(e),e=br(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=br(i.min,i.max,n);t===i&&(a-=e),t.min=u7(t.min,e,r,a,s),t.max=u7(t.max,e,r,a,s)}function d7(t,e,[r,n,s],i,o){hie(t,e[r],e[n],e[s],e.scale,i,o)}const vie=["x","scaleX","originX"],yie=["y","scaleY","originY"];function h7(t,e,r,n){d7(t.x,e,vie,r==null?void 0:r.x,n==null?void 0:n.x),d7(t.y,e,yie,r==null?void 0:r.y,n==null?void 0:n.y)}function v7(t){return t.translate===0&&t.scale===1}function qF(t){return v7(t.x)&&v7(t.y)}function WF(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function y7(t){return Is(t.x)/Is(t.y)}let mie=class{constructor(){this.members=[]}add(e){i$(this.members,e),e.scheduleRender()}remove(e){if(o$(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function m7(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const pie=(t,e)=>t.depth-e.depth;let gie=class{constructor(){this.children=[],this.isDirty=!1}add(e){i$(this.children,e),this.isDirty=!0}remove(e){o$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pie),this.isDirty=!1,this.children.forEach(e)}};const p7=["","X","Y","Z"],g7=1e3;let bie=0;function HF({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=bie++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Cie),this.nodes.forEach(kie),this.nodes.forEach($ie)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=AF(h,250),Q1.hasAnimatedSinceResize&&(Q1.hasAnimatedSinceResize=!1,this.nodes.forEach(w7))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:Rie,{onLayoutAnimationStart:A,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!WF(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={..._F(k,"layout"),onPlay:A,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&w7(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Ll.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(Aie),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var w;const E=p/1e3;x7(h.x,o.x,E),x7(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(Z1(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pie(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,fie(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ll.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zn.update(()=>{Q1.hasAnimatedSinceResize=!0,this.currentAnimation=lie(0,g7,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,g7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&GF(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Fr();const u=Is(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Is(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}yi(a,l),Vu(a,f),X1(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new mie),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(b7),this.root.sharedNodes.clear()}}}function wie(t){t.updateLayout()}function xie(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?ro(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(v);v.min=i[h].min,v.max=v.min+y}):GF(a,s.layoutBox,i)&&ro(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(i[h]);v.max=v.min+y});const c=ev();X1(c,i,s.layoutBox);const f=ev();l?X1(f,t.applyTransform(o,!0),s.measuredBox):X1(f,i,s.layoutBox);const u=!qF(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Fr();Z1(g,s.layoutBox,v.layoutBox);const b=Fr();Z1(b,i,y.layoutBox),WF(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Cie(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Eie(t){t.clearSnapshot()}function b7(t){t.clearMeasurements()}function Sie(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function w7(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function kie(t){t.resolveTargetDelta()}function $ie(t){t.calcProjection()}function Aie(t){t.resetRotation()}function _ie(t){t.removeLeadSnapshot()}function x7(t,e,r){t.translate=br(e.translate,0,r),t.scale=br(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function C7(t,e,r,n){t.min=br(e.min,r.min,n),t.max=br(e.max,r.max,n)}function Pie(t,e,r,n){C7(t.x,e.x,r.x,n),C7(t.y,e.y,r.y,n)}function Tie(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Rie={duration:.45,ease:[.4,0,.1,1]};function Iie(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function E7(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Oie(t){E7(t.x),E7(t.y)}function GF(t,e,r){return t==="position"||t==="preserve-aspect"&&!V6(y7(e),y7(r),.2)}const Mie=HF({attachResizeListener:(t,e)=>z2(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),GC={current:void 0},Die=HF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!GC.current){const t=new Mie(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),GC.current=t}return GC.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),Nie={...vse,...Mre,...Nse,...aie},Zv=Vte((t,e)=>xre(t,e,Nie,rie,Die));function KF(){const t=m.useRef(!1);return Tg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Lie(){const t=KF(),[e,r]=m.useState(0),n=m.useCallback(()=>{t.current&&r(e+1)},[e]);return[m.useCallback(()=>zn.postRender(n),[n]),e]}class jie extends m.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Fie({children:t,isPresent:e}){const r=m.useId(),n=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${i}px !important; @@ -45,7 +45,7 @@ Error generating stack: `+i.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(c)}},[e]),m.createElement(jie,{isPresent:e,childRef:n,sizeRef:s},m.cloneElement(t,{ref:n}))}const KC=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=U2(Bie),l=m.useId(),c=m.useMemo(()=>({id:l,initial:e,isPresent:r,custom:s,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[r]);return m.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),m.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=m.createElement(Fie,{isPresent:r},t)),m.createElement(a0.Provider,{value:c},t)};function Bie(){return new Map}const Cu=t=>t.key||"";function Uie(t,e){t.forEach(r=>{const n=Cu(r);e.set(n,r)})}function zie(t){const e=[];return m.Children.forEach(t,r=>{m.isValidElement(r)&&e.push(r)}),e}const H2=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=Lie();const l=m.useContext(K8).forceRender;l&&(a=l);const c=KF(),f=zie(t);let u=f;const d=new Set,h=m.useRef(u),v=m.useRef(new Map).current,y=m.useRef(!0);if(Tg(()=>{y.current=!1,Uie(f,v),h.current=u}),s$(()=>{y.current=!0,v.clear(),d.clear()}),y.current)return m.createElement(m.Fragment,null,u.map(w=>m.createElement(KC,{key:Cu(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},w)));u=[...u];const g=h.current.map(Cu),b=f.map(Cu),p=g.length;for(let w=0;w{if(b.indexOf(w)!==-1)return;const E=v.get(w);if(!E)return;const k=g.indexOf(w),$=()=>{v.delete(w),d.delete(w);const x=h.current.findIndex(T=>T.key===w);if(h.current.splice(x,1),!d.size){if(h.current=f,c.current===!1)return;a(),n&&n()}};u.splice(k,0,m.createElement(KC,{key:Cu(E),isPresent:!1,onExitComplete:$,custom:e,presenceAffectsLayout:i,mode:o},E))}),u=u.map(w=>{const E=w.key;return d.has(E)?w:m.createElement(KC,{key:Cu(w),isPresent:!0,presenceAffectsLayout:i,mode:o},w)}),m.createElement(m.Fragment,null,d.size?u:u.map(w=>m.cloneElement(w)))};var ho=function(){return ho=Object.assign||function(e){for(var r,n=1,s=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=QC({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?QC(QC({},f),u):l,p=function(){var $=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(x.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var B=$[T];if(B!=null){var L=x.responsiveArray[T];c.push(x.values[B].conditions[L])}}else for(var U in $){var V=$[U];V!=null&&c.push(x.values[V].conditions[U])}}catch(N){throw N}};for(var w in b)var E=p();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},Qie=t=>t,Yie=function(){return Kie(Qie)(...arguments)},YF=Yie({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},backgroundRaised:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderNormal:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},borderFocus:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonGlass:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonEmphasis:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},buttonInverse:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text80:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},text100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},textInverse100:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumDark:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},arbitrumLight:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceDark:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},avalanceLight:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscDark:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},bscLight:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumDark:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},ethereumLight:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisDark:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},gnosisLight:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonDark:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},polygonLight:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundPrimary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundSecondary:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundContrast:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundMuted:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundControl:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundInverse:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundBackdrop:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},backgroundOverlay:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},backgroundRaised:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},borderNormal:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},borderFocus:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonGlass:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},buttonEmphasis:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},buttonInverse:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},text80:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},text100:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},textInverse100:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},arbitrumDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},arbitrumLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},avalanceDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},avalanceLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},bscDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},bscLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},ethereumDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},ethereumLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},gnosisDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},gnosisLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},polygonDark:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},polygonLight:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundPrimary:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundSecondary:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundContrast:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundMuted:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundControl:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundInverse:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},backgroundBackdrop:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},backgroundOverlay:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},backgroundRaised:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},borderNormal:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},borderFocus:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},buttonGlass:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},buttonEmphasis:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},buttonInverse:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},text80:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},text100:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},textInverse100:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},arbitrumDark:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},arbitrumLight:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},avalanceDark:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},avalanceLight:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},bscDark:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},bscLight:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},ethereumDark:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},ethereumLight:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},gnosisDark:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},gnosisLight:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},polygonDark:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},polygonLight:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundPrimary:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundSecondary:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundContrast:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundMuted:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundControl:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},backgroundInverse:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},backgroundBackdrop:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},backgroundOverlay:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},backgroundRaised:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},borderNormal:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},borderFocus:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},buttonGlass:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},buttonEmphasis:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},buttonInverse:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},text80:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},text100:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},textInverse100:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},arbitrumDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},arbitrumLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},avalanceDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},avalanceLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},bscDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},bscLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},ethereumDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},ethereumLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},gnosisDark:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},gnosisLight:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},polygonDark:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},polygonLight:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundPrimary:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundSecondary:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundContrast:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundMuted:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},backgroundControl:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},backgroundInverse:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},backgroundBackdrop:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},backgroundOverlay:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},backgroundRaised:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},borderNormal:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},borderFocus:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},buttonGlass:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},buttonEmphasis:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},buttonInverse:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},text80:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},text100:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},textInverse100:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},arbitrumDark:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},arbitrumLight:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},avalanceDark:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},avalanceLight:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},bscDark:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},bscLight:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},ethereumDark:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},ethereumLight:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},gnosisDark:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},gnosisLight:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},polygonDark:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},polygonLight:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundPrimary:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundSecondary:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundContrast:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},backgroundMuted:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},backgroundControl:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},backgroundInverse:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},backgroundBackdrop:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},backgroundOverlay:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},backgroundRaised:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},borderNormal:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},borderFocus:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},buttonGlass:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},buttonEmphasis:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},buttonInverse:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},text80:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},text100:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},textInverse100:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},arbitrumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},arbitrumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},avalanceDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},avalanceLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},bscDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},bscLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},ethereumDark:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},ethereumLight:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},gnosisDark:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},gnosisLight:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},polygonDark:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},polygonLight:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const Jie=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Y6=t=>(t.display||(t.display=Object.keys(t).some(e=>Jie.includes(e))?"flex":void 0),YF(t));Y6.properties=YF.properties;function JF(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const c in i)Y6.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=Y6({...o,...n});return m.createElement(r,{className:Ns(l,s),...a,ref:e})});var XF={exports:{}},f1={};/** + `),()=>{document.head.removeChild(c)}},[e]),m.createElement(jie,{isPresent:e,childRef:n,sizeRef:s},m.cloneElement(t,{ref:n}))}const KC=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=U2(Bie),l=m.useId(),c=m.useMemo(()=>({id:l,initial:e,isPresent:r,custom:s,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[r]);return m.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),m.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=m.createElement(Fie,{isPresent:r},t)),m.createElement(a0.Provider,{value:c},t)};function Bie(){return new Map}const Cu=t=>t.key||"";function Uie(t,e){t.forEach(r=>{const n=Cu(r);e.set(n,r)})}function zie(t){const e=[];return m.Children.forEach(t,r=>{m.isValidElement(r)&&e.push(r)}),e}const H2=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=Lie();const l=m.useContext(K8).forceRender;l&&(a=l);const c=KF(),f=zie(t);let u=f;const d=new Set,h=m.useRef(u),v=m.useRef(new Map).current,y=m.useRef(!0);if(Tg(()=>{y.current=!1,Uie(f,v),h.current=u}),s$(()=>{y.current=!0,v.clear(),d.clear()}),y.current)return m.createElement(m.Fragment,null,u.map(w=>m.createElement(KC,{key:Cu(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},w)));u=[...u];const g=h.current.map(Cu),b=f.map(Cu),p=g.length;for(let w=0;w{if(b.indexOf(w)!==-1)return;const E=v.get(w);if(!E)return;const k=g.indexOf(w),A=()=>{v.delete(w),d.delete(w);const x=h.current.findIndex(T=>T.key===w);if(h.current.splice(x,1),!d.size){if(h.current=f,c.current===!1)return;a(),n&&n()}};u.splice(k,0,m.createElement(KC,{key:Cu(E),isPresent:!1,onExitComplete:A,custom:e,presenceAffectsLayout:i,mode:o},E))}),u=u.map(w=>{const E=w.key;return d.has(E)?w:m.createElement(KC,{key:Cu(w),isPresent:!0,presenceAffectsLayout:i,mode:o},w)}),m.createElement(m.Fragment,null,d.size?u:u.map(w=>m.cloneElement(w)))};var uo=function(){return uo=Object.assign||function(e){for(var r,n=1,s=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=QC({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?QC(QC({},f),u):l,p=function(){var A=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof A=="string"||typeof A=="number")c.push(x.values[A].defaultClass);else if(Array.isArray(A))for(var T=0;Tt,Yie=function(){return Kie(Qie)(...arguments)},YF=Yie({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},backgroundRaised:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderNormal:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},borderFocus:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonGlass:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonEmphasis:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},buttonInverse:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text80:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},text100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},textInverse100:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumDark:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},arbitrumLight:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceDark:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},avalanceLight:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscDark:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},bscLight:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumDark:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},ethereumLight:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisDark:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},gnosisLight:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonDark:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},polygonLight:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundPrimary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundSecondary:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundContrast:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundMuted:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundControl:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundInverse:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundBackdrop:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},backgroundOverlay:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},backgroundRaised:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},borderNormal:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},borderFocus:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonGlass:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},buttonEmphasis:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},buttonInverse:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},text80:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},text100:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},textInverse100:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},arbitrumDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},arbitrumLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},avalanceDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},avalanceLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},bscDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},bscLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},ethereumDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},ethereumLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},gnosisDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},gnosisLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},polygonDark:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},polygonLight:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundPrimary:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundSecondary:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundContrast:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundMuted:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundControl:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundInverse:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},backgroundBackdrop:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},backgroundOverlay:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},backgroundRaised:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},borderNormal:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},borderFocus:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},buttonGlass:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},buttonEmphasis:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},buttonInverse:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},text80:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},text100:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},textInverse100:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},arbitrumDark:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},arbitrumLight:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},avalanceDark:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},avalanceLight:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},bscDark:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},bscLight:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},ethereumDark:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},ethereumLight:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},gnosisDark:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},gnosisLight:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},polygonDark:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},polygonLight:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundPrimary:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundSecondary:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundContrast:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundMuted:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundControl:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},backgroundInverse:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},backgroundBackdrop:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},backgroundOverlay:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},backgroundRaised:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},borderNormal:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},borderFocus:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},buttonGlass:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},buttonEmphasis:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},buttonInverse:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},text80:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},text100:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},textInverse100:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},arbitrumDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},arbitrumLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},avalanceDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},avalanceLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},bscDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},bscLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},ethereumDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},ethereumLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},gnosisDark:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},gnosisLight:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},polygonDark:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},polygonLight:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundPrimary:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundSecondary:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundContrast:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundMuted:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},backgroundControl:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},backgroundInverse:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},backgroundBackdrop:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},backgroundOverlay:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},backgroundRaised:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},borderNormal:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},borderFocus:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},buttonGlass:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},buttonEmphasis:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},buttonInverse:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},text80:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},text100:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},textInverse100:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},arbitrumDark:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},arbitrumLight:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},avalanceDark:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},avalanceLight:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},bscDark:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},bscLight:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},ethereumDark:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},ethereumLight:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},gnosisDark:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},gnosisLight:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},polygonDark:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},polygonLight:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundPrimary:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundSecondary:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundContrast:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},backgroundMuted:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},backgroundControl:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},backgroundInverse:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},backgroundBackdrop:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},backgroundOverlay:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},backgroundRaised:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},borderNormal:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},borderFocus:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},buttonGlass:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},buttonEmphasis:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},buttonInverse:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},text80:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},text100:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},textInverse100:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},arbitrumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},arbitrumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},avalanceDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},avalanceLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},bscDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},bscLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},ethereumDark:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},ethereumLight:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},gnosisDark:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},gnosisLight:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},polygonDark:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},polygonLight:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const Jie=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Y6=t=>(t.display||(t.display=Object.keys(t).some(e=>Jie.includes(e))?"flex":void 0),YF(t));Y6.properties=YF.properties;function JF(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const c in i)Y6.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=Y6({...o,...n});return m.createElement(r,{className:Ns(l,s),...a,ref:e})});var XF={exports:{}},f1={};/** * @license React * react-jsx-runtime.production.min.js * @@ -53,8 +53,8 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $7;function Xie(){if($7)return f1;$7=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return f1.Fragment=r,f1.jsx=o,f1.jsxs=o,f1}XF.exports=Xie();var Y=XF.exports;function Zie(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eoe(t){var e=Zie(t,"string");return typeof e=="symbol"?e:String(e)}function toe(t,e,r){return e=eoe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function A7(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function _7(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},hr=t=>{var e=r=>{var n=t.defaultClassName,s=_7(_7({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)roe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return P7(t.variantClassNames,r=>P7(r,n=>n.split(" ")[0]))}},e};hr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const ey=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return Y.jsx(W,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var noe=hr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const re=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=qie[n];return Y.jsx(W,{as:r,className:Ns(s,noe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var soe=hr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11rh fyvr12sh",emphasis:"fyvr11rn fyvr12sh",raised:"fyvr11qz fyvr12sh",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const nt=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return Y.jsx(W,{as:r,className:Ns(s,soe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?Y.jsx(f,{size:k}):Y.jsxs(W,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Y.jsxs(W,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:k}),Y.jsx(re,{children:c})]}),u&&Y.jsx(u,{size:k})]})})});var ioe=hr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const To=m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(W,{className:Ns(r,ioe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>ooe(r,e))}function Kt(...t){return m.useCallback(ZF(...t),t)}function Pn(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,aoe(s,...e)]}function aoe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Se(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ri(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Bl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=loe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=ri(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function loe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=ri(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function G2(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ni=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function K2(t){const[e,r]=m.useState(void 0);return ni(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function coe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const ic=t=>{const{present:e,children:r}=t,n=foe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Kt(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};ic.displayName="Presence";function foe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=coe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=ym(n.current);i.current=a==="mounted"?c:"none"},[a]),ni(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=ym(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ni(()=>{if(e){const c=u=>{const h=ym(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=ym(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function ym(t){return(t==null?void 0:t.animationName)||"none"}function Md(){return Md=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(doe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(J6,he({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(J6,he({},n,{ref:e}),r)});Dd.displayName="Slot";const J6=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...hoe(n,r.props),ref:e?ZF(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});J6.displayName="SlotClone";const uoe=({children:t})=>m.createElement(m.Fragment,null,t);function doe(t){return m.isValidElement(t)&&t.type===uoe}function hoe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const voe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rt=voe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Dd:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,Md({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function x$(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eB="Checkbox",[yoe,Mqe]=Pn(eB),[moe,poe]=yoe(eB),goe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(moe,{scope:r,state:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"checkbox","aria-checked":nf(g)?"mixed":g,"aria-required":o,"data-state":tB(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Se(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Se(t.onClick,w=>{b(E=>nf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(xoe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),boe="CheckboxIndicator",woe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=poe(boe,r);return m.createElement(ic,{present:n||nf(i.state)||i.state===!0},m.createElement(rt.span,he({"data-state":tB(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),xoe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=nf(r),u.call(l,nf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:nf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function nf(t){return t==="indeterminate"}function tB(t){return nf(t)?"indeterminate":t?"checked":"unchecked"}const Coe=goe,Eoe=woe;var Soe=hr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const Ff=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?Y.jsxs(W,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(re,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&Y.jsx(re,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return Y.jsxs(W,{as:"label",className:Soe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var vr=hr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),$oe=({size:t="sm",...e})=>Y.jsx(W,{as:koe,className:vr({size:t}),...e}),Aoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),X6=({size:t="sm",...e})=>Y.jsx(W,{as:Aoe,className:vr({size:t}),...e}),_oe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),mh=({size:t="sm",...e})=>Y.jsx(W,{as:_oe,className:vr({size:t}),...e}),Poe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),rB=({size:t="sm",...e})=>Y.jsx(W,{as:Poe,className:vr({size:t}),...e}),Toe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),Q2=({size:t="sm",...e})=>Y.jsx(W,{as:Toe,className:vr({size:t}),...e}),Roe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),Di=({size:t="sm",...e})=>Y.jsx(W,{as:Roe,className:vr({size:t}),...e}),Ioe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),Bf=({size:t="sm",...e})=>Y.jsx(W,{as:Ioe,className:vr({size:t}),...e}),Ooe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),Y2=({size:t="sm",...e})=>Y.jsx(W,{as:Ooe,className:vr({size:t}),...e}),Moe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),Doe=({size:t="sm",...e})=>Y.jsx(W,{as:Moe,className:vr({size:t}),...e}),Noe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),Loe=({size:t="sm",...e})=>Y.jsx(W,{as:Noe,className:vr({size:t}),...e}),joe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),Y.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),Foe=({size:t="sm",...e})=>Y.jsx(W,{as:joe,className:vr({size:t}),...e}),Boe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),Uoe=({size:t="sm",...e})=>Y.jsx(W,{as:Boe,className:vr({size:t}),...e}),zoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),Voe=({size:t="sm",...e})=>Y.jsx(W,{as:zoe,className:vr({size:t}),...e}),qoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.899 5.261a1 1 0 0 1 1 1v.729H2.102v2.055h15.797v4.694a1 1 0 0 1-1 1H3.102a1 1 0 0 1-1-1V6.261a1 1 0 0 1 1-1h13.797Zm-7.13 7.284h7v1h-7v-1Z",clipRule:"evenodd"})}),Woe=({size:t="sm",...e})=>Y.jsx(W,{as:qoe,className:vr({size:t}),...e}),Hoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),Goe=({size:t="sm",...e})=>Y.jsx(W,{as:Hoe,className:vr({size:t}),...e}),Koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),J2=({size:t="sm",...e})=>Y.jsx(W,{as:Koe,className:vr({size:t}),...e}),Qoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),X2=({size:t="sm",...e})=>Y.jsx(W,{as:Qoe,className:vr({size:t}),...e}),Yoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),nB=({size:t="sm",...e})=>Y.jsx(W,{as:Yoe,className:vr({size:t}),...e}),Joe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),Xoe=({size:t="sm",...e})=>Y.jsx(W,{as:Joe,className:vr({size:t}),...e}),Zoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),sB=({size:t="sm",...e})=>Y.jsx(W,{as:Zoe,className:vr({size:t}),...e}),eae=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),tae=({size:t="sm",...e})=>Y.jsx(W,{as:eae,className:vr({size:t}),...e}),rae=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),nae=({size:t="sm",...e})=>Y.jsx(W,{as:rae,className:vr({size:t}),...e}),sae=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),iB=({size:t="sm",...e})=>Y.jsx(W,{as:sae,className:vr({size:t}),...e});var iae=hr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),oae=hr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const aae=({size:t="sm"})=>Y.jsx(Eoe,{className:oae({size:t}),children:Y.jsx(mh,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(Ff,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(Coe,{className:iae({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:Y.jsx(aae,{})})})});P.createContext(null);const lae=t8["useId".toString()]||(()=>{});let cae=0;function Al(t){const[e,r]=m.useState(lae());return ni(()=>{t||r(n=>n??String(cae++))},[t]),t||(e?`radix-${e}`:"")}const oB="Collapsible",[fae,Dqe]=Pn(oB);fae(oB);function Z2(t){const e=t+"CollectionProvider",[r,n]=Pn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=Kt(v,b.collectionRef);return P.createElement(Dd,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=Kt(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Dd,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const uae=m.createContext(void 0);function ew(t){const e=m.useContext(uae);return t||e||"ltr"}function dae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Z6="dismissableLayer.update",hae="dismissableLayer.pointerDownOutside",vae="dismissableLayer.focusOutside";let T7;const yae=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C$=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(yae),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Kt(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=mae(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=pae(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return dae(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(T7=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),R7(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=T7)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),R7())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(Z6,T),()=>document.removeEventListener(Z6,T)},[]),m.createElement(rt.div,he({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Se(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Se(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Se(t.onPointerDownCapture,$.onPointerDownCapture)}))});function mae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){aB(hae,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function pae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&aB(vae,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function R7(){const t=new CustomEvent(Z6);document.dispatchEvent(t)}function aB(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const gae=C$;let YC=0;function lB(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:I7()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:I7()),YC++,()=>{YC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),YC--}},[])}function I7(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const JC="focusScope.autoFocusOnMount",XC="focusScope.autoFocusOnUnmount",O7={bubbles:!1,cancelable:!0},cB=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=ri(s),f=ri(i),u=m.useRef(null),d=Kt(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ka(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ka(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ka(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){D7.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(JC,O7);a.addEventListener(JC,c),a.dispatchEvent(b),b.defaultPrevented||(bae(Sae(fB(a)),{select:!0}),document.activeElement===y&&Ka(a))}return()=>{a.removeEventListener(JC,c),setTimeout(()=>{const b=new CustomEvent(XC,O7);a.addEventListener(XC,f),a.dispatchEvent(b),b.defaultPrevented||Ka(y??document.body,{select:!0}),a.removeEventListener(XC,f),D7.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=wae(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ka(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ka(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(rt.div,he({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function bae(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ka(n,{select:e}),document.activeElement!==r)return}function wae(t){const e=fB(t),r=M7(e,t),n=M7(e.reverse(),t);return[r,n]}function fB(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function M7(t,e){for(const r of t)if(!xae(r,{upTo:e}))return r}function xae(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Cae(t){return t instanceof HTMLInputElement&&"select"in t}function Ka(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Cae(t)&&e&&t.select()}}const D7=Eae();function Eae(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=N7(t,e),t.unshift(e)},remove(e){var r;t=N7(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function N7(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Sae(t){return t.filter(e=>e.tagName!=="A")}function ph(t){return t.split("-")[1]}function E$(t){return t==="y"?"height":"width"}function ia(t){return t.split("-")[0]}function Uf(t){return["top","bottom"].includes(ia(t))?"x":"y"}function L7(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Uf(e),l=E$(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ia(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(ph(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const kae=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=L7(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=uB(n),u={x:s,y:i},d=Uf(o),h=E$(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[p]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=$-v[h]-f[b],L=$/2-v[h]/2+x,U=t3(T,L,B),V=ph(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const $ae={left:"right",right:"left",bottom:"top",top:"bottom"};function zg(t){return t.replace(/left|right|bottom|top/g,e=>$ae[e])}function Aae(t,e,r){r===void 0&&(r=!1);const n=ph(t),s=Uf(t),i=E$(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=zg(o)),{main:o,cross:zg(o)}}const _ae={start:"end",end:"start"};function ZC(t){return t.replace(/start|end/g,e=>_ae[e])}const Pae=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ia(n),b=ia(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[zg(o)]:function(U){const V=zg(U);return[ZC(U),V,ZC(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=ph(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],A=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?A:j;default:return[]}}(ia(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(ZC)))),R}(o,v,h,p));const E=[o,...w],k=await ty(e,y),$=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[g]),f){const{main:U,cross:V}=Aae(n,i,p);$.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function F7(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B7(t){return dB.some(e=>t[e]>=0)}const Tae=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=F7(await ty(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:B7(i)}}}case"escaped":{const i=F7(await ty(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:B7(i)}}}default:return{}}}}},Rae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ia(a),d=ph(a),h=Uf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function hB(t){return t==="x"?"y":"x"}const Iae=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await ty(e,l),u=Uf(ia(s)),d=hB(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=t3(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=t3(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},Oae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Uf(s),d=hB(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ia(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},Mae=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await ty(e,a),c=ia(r),f=ph(r),u=Uf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?e3(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?e3(g,$):$}if(p&&!f){const $=Mc(l.left,0),x=Mc(l.right,0),T=Mc(l.top,0),B=Mc(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Mc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Mc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Js(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ni(t){return Js(t).getComputedStyle(t)}function vB(t){return t instanceof Js(t).Node}function Ul(t){return vB(t)?(t.nodeName||"").toLowerCase():""}function Ui(t){return t instanceof Js(t).HTMLElement}function ks(t){return t instanceof Js(t).Element}function U7(t){return typeof ShadowRoot>"u"?!1:t instanceof Js(t).ShadowRoot||t instanceof ShadowRoot}function ry(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Ni(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function Dae(t){return["table","td","th"].includes(Ul(t))}function r3(t){const e=S$(),r=Ni(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function S$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function tw(t){return["html","body","#document"].includes(Ul(t))}const z7=Math.min,tv=Math.max,Vg=Math.round;function yB(t){const e=Ni(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ui(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Vg(r)!==i||Vg(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function mB(t){return ks(t)?t:t.contextElement}const pB={x:1,y:1};function ld(t){const e=mB(t);if(!Ui(e))return pB;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=yB(e);let o=(i?Vg(r.width):r.width)/n,a=(i?Vg(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const V7={x:0,y:0};function gB(t,e,r){var n,s;if(e===void 0&&(e=!0),!S$())return V7;const i=t?Js(t):window;return!r||e&&r!==i?V7:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function gf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=mB(t);let o=pB;e&&(n?ks(n)&&(o=ld(n)):o=ld(t));const a=gB(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Js(i),h=n&&ks(n)?Js(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=ld(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Js(v).frameElement}}return Ug({width:f,height:u,x:l,y:c})}function _l(t){return((vB(t)?t.ownerDocument:t.document)||window.document).documentElement}function rw(t){return ks(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bB(t){return gf(_l(t)).left+rw(t).scrollLeft}function Nd(t){if(Ul(t)==="html")return t;const e=t.assignedSlot||t.parentNode||U7(t)&&t.host||_l(t);return U7(e)?e.host:e}function wB(t){const e=Nd(t);return tw(e)?e.ownerDocument.body:Ui(e)&&ry(e)?e:wB(e)}function rv(t,e){var r;e===void 0&&(e=[]);const n=wB(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Js(n);return s?e.concat(i,i.visualViewport||[],ry(n)?n:[]):e.concat(n,rv(n))}function q7(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Js(s),a=_l(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=S$();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=_l(s),o=rw(s),a=s.ownerDocument.body,l=tv(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=tv(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+bB(s);const u=-o.scrollTop;return Ni(a).direction==="rtl"&&(f+=tv(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(_l(t));else if(ks(e))n=function(s,i){const o=gf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Ui(s)?ld(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=gB(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Ug(n)}function xB(t,e){const r=Nd(t);return!(r===e||!ks(r)||tw(r))&&(Ni(r).position==="fixed"||xB(r,e))}function W7(t,e){return Ui(t)&&Ni(t).position!=="fixed"?e?e(t):t.offsetParent:null}function H7(t,e){const r=Js(t);if(!Ui(t))return r;let n=W7(t,e);for(;n&&Dae(n)&&Ni(n).position==="static";)n=W7(n,e);return n&&(Ul(n)==="html"||Ul(n)==="body"&&Ni(n).position==="static"&&!r3(n))?r:n||function(s){let i=Nd(s);for(;Ui(i)&&!tw(i);){if(r3(i))return i;i=Nd(i)}return null}(t)||r}function Nae(t,e,r){const n=Ui(e),s=_l(e),i=r==="fixed",o=gf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Ul(e)!=="body"||ry(s))&&(a=rw(e)),Ui(e)){const c=gf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=bB(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const Lae={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=rv(c).filter(g=>ks(g)&&Ul(g)!=="body"),h=null;const v=Ni(c).position==="fixed";let y=v?Nd(c):c;for(;ks(y)&&!tw(y);){const g=Ni(y),b=r3(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||ry(y)&&!b&&xB(c,y))?d=d.filter(p=>p!==y):h=g,y=Nd(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=q7(e,f,s);return c.top=tv(u.top,c.top),c.right=z7(u.right,c.right),c.bottom=z7(u.bottom,c.bottom),c.left=tv(u.left,c.left),c},q7(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Ui(r),i=_l(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Ul(r)!=="body"||ry(i))&&(o=rw(r)),Ui(r))){const c=gf(r);a=ld(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:ks,getDimensions:function(t){return yB(t)},getOffsetParent:H7,getDocumentElement:_l,getScale:ld,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||H7,i=this.getDimensions;return{reference:Nae(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Ni(t).direction==="rtl"};function jae(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...ks(t)?rv(t):t.contextElement?rv(t.contextElement):[],...rv(e)]:[];l.forEach(d=>{const h=!ks(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),ks(t)&&!a&&f.observe(t),ks(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?gf(t):null;return a&&function d(){const h=gf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const Fae=(t,e,r)=>{const n=new Map,s={platform:Lae,...r},i={...s.platform,_c:n};return kae(t,e,{...s,platform:i})},Bae=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?j7({element:e.current,padding:r}).fn(s):{}:e?j7({element:e,padding:r}).fn(s):{}}}};var Ep=typeof document<"u"?m.useLayoutEffect:m.useEffect;function qg(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!qg(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!qg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function CB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function G7(t,e){const r=CB(t);return Math.round(e*r)/r}function K7(t){const e=m.useRef(t);return Ep(()=>{e.current=t}),e}function Uae(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);qg(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=K7(l),L=K7(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),Fae($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!qg(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Ep(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Ep(()=>(V.current=!0,()=>{V.current=!1}),[]),Ep(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=G7(C.floating,f.x),_=G7(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...CB(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const EB="Popper",[SB,gh]=Pn(EB),[zae,kB]=SB(EB),Vae=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(zae,{scope:e,anchor:n,onAnchorChange:s},r)},qae="PopperAnchor",Wae=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=kB(qae,r),o=m.useRef(null),a=Kt(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(rt.div,he({},s,{ref:a}))}),$B="PopperContent",[Hae,Nqe]=SB($B),Gae=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=kB($B,f),[T,B]=m.useState(null),L=Kt(e,ie=>B(ie)),[U,V]=m.useState(null),N=K2(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(Kae),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=Uae({strategy:"fixed",placement:R,whileElementsMounted:jae,elements:{reference:x.anchor},middleware:[Rae({mainAxis:d+S,alignmentAxis:v}),E&&Iae({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Oae():void 0,...F}),E&&Pae({...F}),Mae({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&Bae({element:U,padding:y}),Qae({arrowWidth:C,arrowHeight:S}),w&&Tae({strategy:"referenceHidden"})]}),[q,z]=AB(j),H=ri(k);ni(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ni(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(Hae,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(rt.div,he({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Kae(t){return t!==null}const Qae=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=AB(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function AB(t){const[e,r="center"]=t.split("-");return[e,r]}const Yae=Vae,Jae=Wae,Xae=Gae,_B=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(rt.div,he({},s,{ref:e})),n):null}),eE="rovingFocusGroup.onEntryFocus",Zae={bubbles:!1,cancelable:!0},k$="RovingFocusGroup",[n3,PB,ele]=Z2(k$),[tle,bh]=Pn(k$,[ele]),[rle,nle]=tle(k$),sle=m.forwardRef((t,e)=>m.createElement(n3.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(n3.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(ile,Md({},t,{ref:e}))))),ile=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Kt(e,u),h=ew(i),[v=null,y]=Bl({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=ri(c),w=PB(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(eE,p),()=>x.removeEventListener(eE,p)},[p]),m.createElement(rle,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>$(x=>x-1),[])},m.createElement(rt.div,Md({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Se(t.onMouseDown,()=>{E.current=!0}),onFocus:Se(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(eE,Zae);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);TB(C)}}E.current=!1}),onBlur:Se(t.onBlur,()=>b(!1))})))}),ole="RovingFocusGroupItem",ale=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Al(),l=i||a,c=nle(ole,r),f=c.currentTabStopId===l,u=PB(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(n3.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(rt.span,Md({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Se(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Se(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=fle(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?ule(b,p+1):b.slice(p+1)}setTimeout(()=>TB(b))}})})))}),lle={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cle(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function fle(t,e,r){const n=cle(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lle[n]}function TB(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function ule(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const RB=sle,$$=ale;var dle=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ou=new WeakMap,mm=new WeakMap,pm={},tE=0,IB=function(t){return t&&(t.host||IB(t.parentNode))},hle=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=IB(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},vle=function(t,e,r,n){var s=hle(e,Array.isArray(t)?t:[t]);pm[r]||(pm[r]=new WeakMap);var i=pm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(ou.get(d)||0)+1,g=(i.get(d)||0)+1;ou.set(d,y),i.set(d,g),o.push(d),y===1&&v&&mm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),tE++,function(){o.forEach(function(u){var d=ou.get(u)-1,h=i.get(u)-1;ou.set(u,d),i.set(u,h),d||(mm.has(u)||u.removeAttribute(n),mm.delete(u)),h||u.removeAttribute(r)}),tE--,tE||(ou=new WeakMap,ou=new WeakMap,mm=new WeakMap,pm={})}},OB=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||dle(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),vle(n,s,r,"aria-hidden")):function(){return null}},vo=function(){return vo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Rle;var e=Ile(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},Mle=LB(),Dle=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(mle,` { + */var $7;function Xie(){if($7)return f1;$7=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return f1.Fragment=r,f1.jsx=o,f1.jsxs=o,f1}XF.exports=Xie();var Y=XF.exports;function Zie(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eoe(t){var e=Zie(t,"string");return typeof e=="symbol"?e:String(e)}function toe(t,e,r){return e=eoe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function A7(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function _7(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},hr=t=>{var e=r=>{var n=t.defaultClassName,s=_7(_7({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)roe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return P7(t.variantClassNames,r=>P7(r,n=>n.split(" ")[0]))}},e};hr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const ey=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return Y.jsx(W,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var noe=hr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const re=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=qie[n];return Y.jsx(W,{as:r,className:Ns(s,noe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var soe=hr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11rh fyvr12sh",emphasis:"fyvr11rn fyvr12sh",raised:"fyvr11qz fyvr12sh",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const it=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return Y.jsx(W,{as:r,className:Ns(s,soe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?Y.jsx(f,{size:k}):Y.jsxs(W,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Y.jsxs(W,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:k}),Y.jsx(re,{children:c})]}),u&&Y.jsx(u,{size:k})]})})});var ioe=hr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const To=m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(W,{className:Ns(r,ioe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>ooe(r,e))}function Kt(...t){return m.useCallback(ZF(...t),t)}function Pn(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,aoe(s,...e)]}function aoe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Se(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ri(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Bl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=loe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=ri(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function loe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=ri(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function G2(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ni=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function K2(t){const[e,r]=m.useState(void 0);return ni(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function coe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const ic=t=>{const{present:e,children:r}=t,n=foe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Kt(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};ic.displayName="Presence";function foe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=coe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=ym(n.current);i.current=a==="mounted"?c:"none"},[a]),ni(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=ym(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ni(()=>{if(e){const c=u=>{const h=ym(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=ym(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function ym(t){return(t==null?void 0:t.animationName)||"none"}function Md(){return Md=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(doe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(J6,he({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(J6,he({},n,{ref:e}),r)});Dd.displayName="Slot";const J6=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...hoe(n,r.props),ref:e?ZF(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});J6.displayName="SlotClone";const uoe=({children:t})=>m.createElement(m.Fragment,null,t);function doe(t){return m.isValidElement(t)&&t.type===uoe}function hoe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const voe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rt=voe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Dd:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,Md({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function x$(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eB="Checkbox",[yoe,Rqe]=Pn(eB),[moe,poe]=yoe(eB),goe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(moe,{scope:r,state:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"checkbox","aria-checked":nf(g)?"mixed":g,"aria-required":o,"data-state":tB(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Se(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Se(t.onClick,w=>{b(E=>nf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(xoe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),boe="CheckboxIndicator",woe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=poe(boe,r);return m.createElement(ic,{present:n||nf(i.state)||i.state===!0},m.createElement(rt.span,he({"data-state":tB(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),xoe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=nf(r),u.call(l,nf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:nf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function nf(t){return t==="indeterminate"}function tB(t){return nf(t)?"indeterminate":t?"checked":"unchecked"}const Coe=goe,Eoe=woe;var Soe=hr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const Ff=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?Y.jsxs(W,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(re,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&Y.jsx(re,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return Y.jsxs(W,{as:"label",className:Soe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var Cr=hr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),$oe=({size:t="sm",...e})=>Y.jsx(W,{as:koe,className:Cr({size:t}),...e}),Aoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),X6=({size:t="sm",...e})=>Y.jsx(W,{as:Aoe,className:Cr({size:t}),...e}),_oe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),mh=({size:t="sm",...e})=>Y.jsx(W,{as:_oe,className:Cr({size:t}),...e}),Poe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),rB=({size:t="sm",...e})=>Y.jsx(W,{as:Poe,className:Cr({size:t}),...e}),Toe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),Q2=({size:t="sm",...e})=>Y.jsx(W,{as:Toe,className:Cr({size:t}),...e}),Roe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),Co=({size:t="sm",...e})=>Y.jsx(W,{as:Roe,className:Cr({size:t}),...e}),Ioe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),Bf=({size:t="sm",...e})=>Y.jsx(W,{as:Ioe,className:Cr({size:t}),...e}),Ooe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),Y2=({size:t="sm",...e})=>Y.jsx(W,{as:Ooe,className:Cr({size:t}),...e}),Moe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),Doe=({size:t="sm",...e})=>Y.jsx(W,{as:Moe,className:Cr({size:t}),...e}),Noe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),Loe=({size:t="sm",...e})=>Y.jsx(W,{as:Noe,className:Cr({size:t}),...e}),joe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),Y.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),Foe=({size:t="sm",...e})=>Y.jsx(W,{as:joe,className:Cr({size:t}),...e}),Boe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),Uoe=({size:t="sm",...e})=>Y.jsx(W,{as:Boe,className:Cr({size:t}),...e}),zoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),Voe=({size:t="sm",...e})=>Y.jsx(W,{as:zoe,className:Cr({size:t}),...e}),qoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),Woe=({size:t="sm",...e})=>Y.jsx(W,{as:qoe,className:Cr({size:t}),...e}),Hoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),J2=({size:t="sm",...e})=>Y.jsx(W,{as:Hoe,className:Cr({size:t}),...e}),Goe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),X2=({size:t="sm",...e})=>Y.jsx(W,{as:Goe,className:Cr({size:t}),...e}),Koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),nB=({size:t="sm",...e})=>Y.jsx(W,{as:Koe,className:Cr({size:t}),...e}),Qoe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),Yoe=({size:t="sm",...e})=>Y.jsx(W,{as:Qoe,className:Cr({size:t}),...e}),Joe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),sB=({size:t="sm",...e})=>Y.jsx(W,{as:Joe,className:Cr({size:t}),...e}),Xoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),Zoe=({size:t="sm",...e})=>Y.jsx(W,{as:Xoe,className:Cr({size:t}),...e}),eae=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),tae=({size:t="sm",...e})=>Y.jsx(W,{as:eae,className:Cr({size:t}),...e}),rae=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),iB=({size:t="sm",...e})=>Y.jsx(W,{as:rae,className:Cr({size:t}),...e});var nae=hr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),sae=hr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const iae=({size:t="sm"})=>Y.jsx(Eoe,{className:sae({size:t}),children:Y.jsx(mh,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(Ff,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(Coe,{className:nae({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:Y.jsx(iae,{})})})});P.createContext(null);const oae=t8["useId".toString()]||(()=>{});let aae=0;function Al(t){const[e,r]=m.useState(oae());return ni(()=>{t||r(n=>n??String(aae++))},[t]),t||(e?`radix-${e}`:"")}const oB="Collapsible",[lae,Iqe]=Pn(oB);lae(oB);function Z2(t){const e=t+"CollectionProvider",[r,n]=Pn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=Kt(v,b.collectionRef);return P.createElement(Dd,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=Kt(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Dd,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const cae=m.createContext(void 0);function ew(t){const e=m.useContext(cae);return t||e||"ltr"}function fae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Z6="dismissableLayer.update",uae="dismissableLayer.pointerDownOutside",dae="dismissableLayer.focusOutside";let T7;const hae=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C$=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(hae),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Kt(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,A=vae(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=yae(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return fae(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(T7=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),R7(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=T7)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),R7())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(Z6,T),()=>document.removeEventListener(Z6,T)},[]),m.createElement(rt.div,he({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Se(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Se(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Se(t.onPointerDownCapture,A.onPointerDownCapture)}))});function vae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){aB(uae,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function yae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&aB(dae,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function R7(){const t=new CustomEvent(Z6);document.dispatchEvent(t)}function aB(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const mae=C$;let YC=0;function lB(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:I7()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:I7()),YC++,()=>{YC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),YC--}},[])}function I7(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const JC="focusScope.autoFocusOnMount",XC="focusScope.autoFocusOnUnmount",O7={bubbles:!1,cancelable:!0},cB=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=ri(s),f=ri(i),u=m.useRef(null),d=Kt(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ka(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ka(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ka(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){D7.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(JC,O7);a.addEventListener(JC,c),a.dispatchEvent(b),b.defaultPrevented||(pae(Cae(fB(a)),{select:!0}),document.activeElement===y&&Ka(a))}return()=>{a.removeEventListener(JC,c),setTimeout(()=>{const b=new CustomEvent(XC,O7);a.addEventListener(XC,f),a.dispatchEvent(b),b.defaultPrevented||Ka(y??document.body,{select:!0}),a.removeEventListener(XC,f),D7.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=gae(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ka(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ka(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(rt.div,he({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function pae(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ka(n,{select:e}),document.activeElement!==r)return}function gae(t){const e=fB(t),r=M7(e,t),n=M7(e.reverse(),t);return[r,n]}function fB(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function M7(t,e){for(const r of t)if(!bae(r,{upTo:e}))return r}function bae(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function wae(t){return t instanceof HTMLInputElement&&"select"in t}function Ka(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&wae(t)&&e&&t.select()}}const D7=xae();function xae(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=N7(t,e),t.unshift(e)},remove(e){var r;t=N7(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function N7(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Cae(t){return t.filter(e=>e.tagName!=="A")}function ph(t){return t.split("-")[1]}function E$(t){return t==="y"?"height":"width"}function ia(t){return t.split("-")[0]}function Uf(t){return["top","bottom"].includes(ia(t))?"x":"y"}function L7(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Uf(e),l=E$(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ia(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(ph(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const Eae=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=L7(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=uB(n),u={x:s,y:i},d=Uf(o),h=E$(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let A=k?k[p]:0;A&&await(l.isElement==null?void 0:l.isElement(k))||(A=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=A-v[h]-f[b],L=A/2-v[h]/2+x,U=t3(T,L,B),V=ph(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const Sae={left:"right",right:"left",bottom:"top",top:"bottom"};function zg(t){return t.replace(/left|right|bottom|top/g,e=>Sae[e])}function kae(t,e,r){r===void 0&&(r=!1);const n=ph(t),s=Uf(t),i=E$(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=zg(o)),{main:o,cross:zg(o)}}const $ae={start:"end",end:"start"};function ZC(t){return t.replace(/start|end/g,e=>$ae[e])}const Aae=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ia(n),b=ia(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[zg(o)]:function(U){const V=zg(U);return[ZC(U),V,ZC(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=ph(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],$=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?$:j;default:return[]}}(ia(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(ZC)))),R}(o,v,h,p));const E=[o,...w],k=await ty(e,y),A=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&A.push(k[g]),f){const{main:U,cross:V}=kae(n,i,p);A.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:A}],!A.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function F7(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B7(t){return dB.some(e=>t[e]>=0)}const _ae=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=F7(await ty(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:B7(i)}}}case"escaped":{const i=F7(await ty(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:B7(i)}}}default:return{}}}}},Pae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ia(a),d=ph(a),h=Uf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function hB(t){return t==="x"?"y":"x"}const Tae=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await ty(e,l),u=Uf(ia(s)),d=hB(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=t3(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=t3(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},Rae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Uf(s),d=hB(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ia(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),A=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);vA&&(v=A)}return{[u]:h,[d]:v}}}},Iae=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await ty(e,a),c=ia(r),f=ph(r),u=Uf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const A=d-l.left-l.right;E=f||p?e3(b,A):A}else{const A=h-l.top-l.bottom;w=f||p?e3(g,A):A}if(p&&!f){const A=Mc(l.left,0),x=Mc(l.right,0),T=Mc(l.top,0),B=Mc(l.bottom,0);u?E=d-2*(A!==0||x!==0?A+x:Mc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Mc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Js(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Di(t){return Js(t).getComputedStyle(t)}function vB(t){return t instanceof Js(t).Node}function Ul(t){return vB(t)?(t.nodeName||"").toLowerCase():""}function Bi(t){return t instanceof Js(t).HTMLElement}function ks(t){return t instanceof Js(t).Element}function U7(t){return typeof ShadowRoot>"u"?!1:t instanceof Js(t).ShadowRoot||t instanceof ShadowRoot}function ry(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Di(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function Oae(t){return["table","td","th"].includes(Ul(t))}function r3(t){const e=S$(),r=Di(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function S$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function tw(t){return["html","body","#document"].includes(Ul(t))}const z7=Math.min,tv=Math.max,Vg=Math.round;function yB(t){const e=Di(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Bi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Vg(r)!==i||Vg(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function mB(t){return ks(t)?t:t.contextElement}const pB={x:1,y:1};function ld(t){const e=mB(t);if(!Bi(e))return pB;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=yB(e);let o=(i?Vg(r.width):r.width)/n,a=(i?Vg(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const V7={x:0,y:0};function gB(t,e,r){var n,s;if(e===void 0&&(e=!0),!S$())return V7;const i=t?Js(t):window;return!r||e&&r!==i?V7:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function gf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=mB(t);let o=pB;e&&(n?ks(n)&&(o=ld(n)):o=ld(t));const a=gB(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Js(i),h=n&&ks(n)?Js(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=ld(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Js(v).frameElement}}return Ug({width:f,height:u,x:l,y:c})}function _l(t){return((vB(t)?t.ownerDocument:t.document)||window.document).documentElement}function rw(t){return ks(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bB(t){return gf(_l(t)).left+rw(t).scrollLeft}function Nd(t){if(Ul(t)==="html")return t;const e=t.assignedSlot||t.parentNode||U7(t)&&t.host||_l(t);return U7(e)?e.host:e}function wB(t){const e=Nd(t);return tw(e)?e.ownerDocument.body:Bi(e)&&ry(e)?e:wB(e)}function rv(t,e){var r;e===void 0&&(e=[]);const n=wB(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Js(n);return s?e.concat(i,i.visualViewport||[],ry(n)?n:[]):e.concat(n,rv(n))}function q7(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Js(s),a=_l(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=S$();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=_l(s),o=rw(s),a=s.ownerDocument.body,l=tv(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=tv(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+bB(s);const u=-o.scrollTop;return Di(a).direction==="rtl"&&(f+=tv(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(_l(t));else if(ks(e))n=function(s,i){const o=gf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Bi(s)?ld(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=gB(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Ug(n)}function xB(t,e){const r=Nd(t);return!(r===e||!ks(r)||tw(r))&&(Di(r).position==="fixed"||xB(r,e))}function W7(t,e){return Bi(t)&&Di(t).position!=="fixed"?e?e(t):t.offsetParent:null}function H7(t,e){const r=Js(t);if(!Bi(t))return r;let n=W7(t,e);for(;n&&Oae(n)&&Di(n).position==="static";)n=W7(n,e);return n&&(Ul(n)==="html"||Ul(n)==="body"&&Di(n).position==="static"&&!r3(n))?r:n||function(s){let i=Nd(s);for(;Bi(i)&&!tw(i);){if(r3(i))return i;i=Nd(i)}return null}(t)||r}function Mae(t,e,r){const n=Bi(e),s=_l(e),i=r==="fixed",o=gf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Ul(e)!=="body"||ry(s))&&(a=rw(e)),Bi(e)){const c=gf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=bB(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const Dae={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=rv(c).filter(g=>ks(g)&&Ul(g)!=="body"),h=null;const v=Di(c).position==="fixed";let y=v?Nd(c):c;for(;ks(y)&&!tw(y);){const g=Di(y),b=r3(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||ry(y)&&!b&&xB(c,y))?d=d.filter(p=>p!==y):h=g,y=Nd(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=q7(e,f,s);return c.top=tv(u.top,c.top),c.right=z7(u.right,c.right),c.bottom=z7(u.bottom,c.bottom),c.left=tv(u.left,c.left),c},q7(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Bi(r),i=_l(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Ul(r)!=="body"||ry(i))&&(o=rw(r)),Bi(r))){const c=gf(r);a=ld(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:ks,getDimensions:function(t){return yB(t)},getOffsetParent:H7,getDocumentElement:_l,getScale:ld,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||H7,i=this.getDimensions;return{reference:Mae(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Di(t).direction==="rtl"};function Nae(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...ks(t)?rv(t):t.contextElement?rv(t.contextElement):[],...rv(e)]:[];l.forEach(d=>{const h=!ks(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),ks(t)&&!a&&f.observe(t),ks(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?gf(t):null;return a&&function d(){const h=gf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const Lae=(t,e,r)=>{const n=new Map,s={platform:Dae,...r},i={...s.platform,_c:n};return Eae(t,e,{...s,platform:i})},jae=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?j7({element:e.current,padding:r}).fn(s):{}:e?j7({element:e,padding:r}).fn(s):{}}}};var Ep=typeof document<"u"?m.useLayoutEffect:m.useEffect;function qg(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!qg(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!qg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function CB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function G7(t,e){const r=CB(t);return Math.round(e*r)/r}function K7(t){const e=m.useRef(t);return Ep(()=>{e.current=t}),e}function Fae(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);qg(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=A.current&&(A.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,A=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=K7(l),L=K7(s),U=m.useCallback(()=>{if(!A.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),Lae(A.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!qg(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Ep(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Ep(()=>(V.current=!0,()=>{V.current=!1}),[]),Ep(()=>{if(E&&(A.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:A,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=G7(C.floating,f.x),_=G7(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...CB(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const EB="Popper",[SB,gh]=Pn(EB),[Bae,kB]=SB(EB),Uae=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(Bae,{scope:e,anchor:n,onAnchorChange:s},r)},zae="PopperAnchor",Vae=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=kB(zae,r),o=m.useRef(null),a=Kt(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(rt.div,he({},s,{ref:a}))}),$B="PopperContent",[qae,Oqe]=SB($B),Wae=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...A}=t,x=kB($B,f),[T,B]=m.useState(null),L=Kt(e,ie=>B(ie)),[U,V]=m.useState(null),N=K2(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(Hae),altBoundary:I},{refs:D,floatingStyles:$,placement:j,isPositioned:G,middlewareData:O}=Fae({strategy:"fixed",placement:R,whileElementsMounted:Nae,elements:{reference:x.anchor},middleware:[Pae({mainAxis:d+S,alignmentAxis:v}),E&&Tae({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Rae():void 0,...F}),E&&Aae({...F}),Iae({...F,apply:({elements:ie,rects:ue,availableWidth:nt,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${nt}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&jae({element:U,padding:y}),Gae({arrowWidth:C,arrowHeight:S}),w&&_ae({strategy:"referenceHidden"})]}),[q,z]=AB(j),H=ri(k);ni(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ni(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:G?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(qae,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(rt.div,he({"data-side":q,"data-align":z},A,{ref:L,style:{...A.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Hae(t){return t!==null}const Gae=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=AB(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function AB(t){const[e,r="center"]=t.split("-");return[e,r]}const Kae=Uae,Qae=Vae,Yae=Wae,_B=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(rt.div,he({},s,{ref:e})),n):null}),eE="rovingFocusGroup.onEntryFocus",Jae={bubbles:!1,cancelable:!0},k$="RovingFocusGroup",[n3,PB,Xae]=Z2(k$),[Zae,bh]=Pn(k$,[Xae]),[ele,tle]=Zae(k$),rle=m.forwardRef((t,e)=>m.createElement(n3.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(n3.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(nle,Md({},t,{ref:e}))))),nle=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Kt(e,u),h=ew(i),[v=null,y]=Bl({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=ri(c),w=PB(r),E=m.useRef(!1),[k,A]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(eE,p),()=>x.removeEventListener(eE,p)},[p]),m.createElement(ele,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>A(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>A(x=>x-1),[])},m.createElement(rt.div,Md({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Se(t.onMouseDown,()=>{E.current=!0}),onFocus:Se(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(eE,Jae);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);TB(C)}}E.current=!1}),onBlur:Se(t.onBlur,()=>b(!1))})))}),sle="RovingFocusGroupItem",ile=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Al(),l=i||a,c=tle(sle,r),f=c.currentTabStopId===l,u=PB(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(n3.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(rt.span,Md({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Se(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Se(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=lle(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?cle(b,p+1):b.slice(p+1)}setTimeout(()=>TB(b))}})})))}),ole={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ale(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function lle(t,e,r){const n=ale(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ole[n]}function TB(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function cle(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const RB=rle,$$=ile;var fle=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ou=new WeakMap,mm=new WeakMap,pm={},tE=0,IB=function(t){return t&&(t.host||IB(t.parentNode))},ule=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=IB(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},dle=function(t,e,r,n){var s=ule(e,Array.isArray(t)?t:[t]);pm[r]||(pm[r]=new WeakMap);var i=pm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(ou.get(d)||0)+1,g=(i.get(d)||0)+1;ou.set(d,y),i.set(d,g),o.push(d),y===1&&v&&mm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),tE++,function(){o.forEach(function(u){var d=ou.get(u)-1,h=i.get(u)-1;ou.set(u,d),i.set(u,h),d||(mm.has(u)||u.removeAttribute(n),mm.delete(u)),h||u.removeAttribute(r)}),tE--,tE||(ou=new WeakMap,ou=new WeakMap,mm=new WeakMap,pm={})}},OB=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||fle(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),dle(n,s,r,"aria-hidden")):function(){return null}},ho=function(){return ho=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Ple;var e=Tle(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},Ile=LB(),Ole=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(vle,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -88,17 +88,17 @@ Error generating stack: `+i.message+` } body { - `).concat(ple,": ").concat(a,`px; + `).concat(yle,": ").concat(a,`px; } -`)},Nle=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return Ole(s)},[s]);return m.createElement(Mle,{styles:Dle(i,!e,s,r?"":"!important")})},s3=!1;if(typeof window<"u")try{var gm=Object.defineProperty({},"passive",{get:function(){return s3=!0,!0}});window.addEventListener("test",gm,gm),window.removeEventListener("test",gm,gm)}catch{s3=!1}var au=s3?{passive:!1}:!1,Lle=function(t){return t.tagName==="TEXTAREA"},jB=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Lle(t)&&r[e]==="visible")},jle=function(t){return jB(t,"overflowY")},Fle=function(t){return jB(t,"overflowX")},Q7=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=FB(t,r);if(n){var s=BB(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Ble=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Ule=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},FB=function(t,e){return t==="v"?jle(e):Fle(e)},BB=function(t,e){return t==="v"?Ble(e):Ule(e)},zle=function(t,e){return t==="h"&&e==="rtl"?-1:1},Vle=function(t,e,r,n,s){var i=zle(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=BB(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&FB(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},bm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Y7=function(t){return[t.deltaX,t.deltaY]},J7=function(t){return t&&"current"in t?t.current:t},qle=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Wle=function(t){return` +`)},Mle=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return Rle(s)},[s]);return m.createElement(Ile,{styles:Ole(i,!e,s,r?"":"!important")})},s3=!1;if(typeof window<"u")try{var gm=Object.defineProperty({},"passive",{get:function(){return s3=!0,!0}});window.addEventListener("test",gm,gm),window.removeEventListener("test",gm,gm)}catch{s3=!1}var au=s3?{passive:!1}:!1,Dle=function(t){return t.tagName==="TEXTAREA"},jB=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Dle(t)&&r[e]==="visible")},Nle=function(t){return jB(t,"overflowY")},Lle=function(t){return jB(t,"overflowX")},Q7=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=FB(t,r);if(n){var s=BB(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},jle=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Fle=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},FB=function(t,e){return t==="v"?Nle(e):Lle(e)},BB=function(t,e){return t==="v"?jle(e):Fle(e)},Ble=function(t,e){return t==="h"&&e==="rtl"?-1:1},Ule=function(t,e,r,n,s){var i=Ble(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=BB(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&FB(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},bm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Y7=function(t){return[t.deltaX,t.deltaY]},J7=function(t){return t&&"current"in t?t.current:t},zle=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Vle=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},Hle=0,lu=[];function Gle(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(Hle++)[0],i=m.useState(function(){return LB()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=yle([t.lockRef.current],(t.shards||[]).map(J7),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=bm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=Q7(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=Q7(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return Vle(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!lu.length||lu[lu.length-1]!==i)){var b="deltaY"in g?Y7(g):bm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&qle(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(J7).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=bm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,Y7(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,bm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return lu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,au),document.addEventListener("touchmove",l,au),document.addEventListener("touchstart",f,au),function(){lu=lu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,au),document.removeEventListener("touchmove",l,au),document.removeEventListener("touchstart",f,au)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:Wle(s)}):null,h?m.createElement(Nle,{gapMode:"margin"}):null)}const Kle=Sle(NB,Gle);var UB=m.forwardRef(function(t,e){return m.createElement(nw,vo({},t,{ref:e,sideCar:Kle}))});UB.classNames=nw.classNames;const zB=UB,Qle=["Enter"," "],sw="Menu",[Yle,Lqe,Jle]=Z2(sw),[zf,VB]=Pn(sw,[Jle,gh,bh]);gh();const Xle=bh();zf(sw);const[jqe,Zle]=zf(sw),ece="MenuPortal";zf(ece,{forceMount:void 0});const tce="MenuContent",[Fqe,qB]=zf(tce),i3="MenuItem",X7="menu.itemSelect",WB=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=Zle(i3,t.__scopeMenu),a=qB(i3,t.__scopeMenu),l=Kt(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(X7,{bubbles:!0,cancelable:!0});u.addEventListener(X7,h=>n==null?void 0:n(h),{once:!0}),x$(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(rce,he({},s,{ref:l,disabled:r,onClick:Se(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Se(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Se(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||Qle.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),rce=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=qB(i3,r),a=Xle(r),l=m.useRef(null),c=Kt(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(Yle.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement($$,he({asChild:!0},a,{focusable:!n}),m.createElement(rt.div,he({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Se(t.onPointerMove,Z7(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Se(t.onPointerLeave,Z7(v=>o.onItemLeave(v))),onFocus:Se(t.onFocus,()=>u(!0)),onBlur:Se(t.onBlur,()=>u(!1))}))))}),nce=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(GB,{scope:t.__scopeMenu,checked:r},m.createElement(WB,he({role:"menuitemcheckbox","aria-checked":Wg(r)?"mixed":r},s,{ref:e,"data-state":A$(r),onSelect:Se(s.onSelect,()=>n==null?void 0:n(Wg(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),sce="MenuRadioGroup",[Bqe,ice]=zf(sce,{value:void 0,onValueChange:()=>{}}),oce="MenuRadioItem",ace=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=ice(oce,t.__scopeMenu),i=r===s.value;return m.createElement(GB,{scope:t.__scopeMenu,checked:i},m.createElement(WB,he({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":A$(i),onSelect:Se(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),HB="MenuItemIndicator",[GB,lce]=zf(HB,{checked:!1}),cce=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=lce(HB,r);return m.createElement(ic,{present:n||Wg(i.checked)||i.checked===!0},m.createElement(rt.span,he({},s,{ref:e,"data-state":A$(i.checked)})))}),fce="MenuSub";zf(fce);function Wg(t){return t==="indeterminate"}function A$(t){return Wg(t)?"indeterminate":t?"checked":"unchecked"}function Z7(t){return e=>e.pointerType==="mouse"?t(e):void 0}const uce=nce,dce=ace,hce=cce,KB="DropdownMenu",[vce,Uqe]=Pn(KB,[VB]),_$=VB();vce(KB);const yce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(uce,he({},s,n,{ref:e}))}),mce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(dce,he({},s,n,{ref:e}))}),pce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(hce,he({},s,n,{ref:e}))}),gce=yce,bce=mce,QB=pce;var YB="_1k2mbvi5",JB="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const wce=({children:t})=>Y.jsx(QB,{className:YB,children:t});m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(gce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(wce,{children:Y.jsx(mh,{size:"xs"})}),Y.jsx(re,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(bce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(QB,{className:YB,children:Y.jsx(re,{children:"•"})}),Y.jsx(re,{variant:"small",children:e})]}));const va=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return Y.jsx(nt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),xce=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var Cce="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",Ece="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",Sce=hr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const kce={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=xce(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,x=k.size/1e3;g({name:$,size:x,extension:$.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>kce[w]).join(",");return Y.jsx(Ff,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:Ns(Ece,Sce({borderRadius:r})),children:[y?Y.jsxs(W,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Y.jsx(re,{children:y.name}),Y.jsxs(re,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):Y.jsx(re,{children:f}),Y.jsx(W,{accept:p,as:"input",className:Cce,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&Y.jsx(va,{cursor:"pointer",icon:Bf,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var $ce=hr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const o3=1e3,cd=64,sE=cd/2,iE=(t,e=o3)=>t%e/(o3/cd),Dc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},Ace=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Dc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},_ce=(t,e)=>{const r=[];for(let n=0;n{const i=cd/10+iE(n.r,o3*1.5/(s+1));return{...Ace(n.a,n.b,n.c),x:iE(n.x),y:iE(n.y),r:i}})},u0=m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=_ce(r,s);return Y.jsxs(W,{as:"svg",className:Ns(e,$ce({size:n})),viewBox:`0 0 ${cd} ${cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:sE,cy:sE,r:sE})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:cd/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),fr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return Y.jsx(W,{as:Zv.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},XB="Dialog",[ZB,zqe]=Pn(XB),[Pce,oc]=ZB(XB),Tce=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=m.useRef(null),l=m.useRef(null),[c=!1,f]=Bl({prop:n,defaultProp:s,onChange:i});return m.createElement(Pce,{scope:e,triggerRef:a,contentRef:l,contentId:Al(),titleId:Al(),descriptionId:Al(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(u=>!u),[f]),modal:o},r)},eU="DialogPortal",[Rce,tU]=ZB(eU,{forceMount:void 0}),Ice=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=oc(eU,e);return m.createElement(Rce,{scope:e,forceMount:r},m.Children.map(n,o=>m.createElement(ic,{present:r||i.open},m.createElement(_B,{asChild:!0,container:s},o))))},a3="DialogOverlay",Oce=m.forwardRef((t,e)=>{const r=tU(a3,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(a3,t.__scopeDialog);return i.modal?m.createElement(ic,{present:n||i.open},m.createElement(Mce,he({},s,{ref:e}))):null}),Mce=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(a3,r);return m.createElement(zB,{as:Dd,allowPinchZoom:!0,shards:[s.contentRef]},m.createElement(rt.div,he({"data-state":nU(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),ny="DialogContent",Dce=m.forwardRef((t,e)=>{const r=tU(ny,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(ny,t.__scopeDialog);return m.createElement(ic,{present:n||i.open},i.modal?m.createElement(Nce,he({},s,{ref:e})):m.createElement(Lce,he({},s,{ref:e})))}),Nce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(null),s=Kt(e,r.contentRef,n);return m.useEffect(()=>{const i=n.current;if(i)return OB(i)},[]),m.createElement(rU,he({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Se(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Se(t.onFocusOutside,i=>i.preventDefault())}))}),Lce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(rU,he({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),rU=m.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=oc(ny,r),l=m.useRef(null),c=Kt(e,l);return lB(),m.createElement(m.Fragment,null,m.createElement(cB,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(C$,he({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nU(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),jce="DialogClose",Fce=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(jce,r);return m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,()=>s.onOpenChange(!1))}))});function nU(t){return t?"open":"closed"}const Bce=Tce,Uce=Ice,zce=Oce,Vce=Dce,qce=Fce;var Wce=hr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),Hce=hr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const sU=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return Y.jsx(W,{className:Wce({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:Y.jsx(W,{className:Hce({direction:n}),background:"backgroundPrimary",...s,children:e})})};var Gce="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",Kce=hr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),Qce="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Yce="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const P$=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t;return Y.jsx(Bce,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(Uce,{forceMount:!0,children:Y.jsxs(W,{className:Yce,children:[Y.jsx(W,{as:zce,asChild:!0,background:r,className:Qce,forceMount:!0,children:Y.jsx(Zv.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(Vce,{asChild:!0,className:Kce({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:u=>{i?o==null||o():u.preventDefault()},onInteractOutside:u=>{i||u.preventDefault()},children:Y.jsxs(Zv.div,{initial:s?!1:{y:"100%",opacity:l==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(sU,{children:n}):n,i&&Y.jsx(qce,{asChild:!0,children:Y.jsx(va,{icon:Bf,backdropFilter:"blur",size:"xs",className:Gce,"aria-label":"Close"})})]},"modal-content")})]})})})};var Jce=hr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),Xce="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",Zce=hr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ac=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{className:Ns(Xce,Zce({borderRadius:s})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Jce({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&Y.jsx(u,{size:"sm"}),h]})})})}),efe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function tfe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const iU=m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||efe.test(tfe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return Y.jsx(ac,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});hr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const oU="Progress",iw=100,[rfe,Vqe]=Pn(oU),[nfe,qqe]=rfe(oU),sfe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=ife,...o}=t,a=l3(s)?s:iw,l=aU(n,a)?n:null,c=Hg(l)?i(l,a):void 0;return m.createElement(nfe,{scope:r,value:l,max:a},m.createElement(rt.div,he({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Hg(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":ofe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});sfe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!l3(n)?new Error(afe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=l3(t.max)?t.max:iw;return n!=null&&!aU(n,i)?new Error(lfe(s,r)):null}};function ife(t,e){return`${Math.round(t/e*100)}%`}function ofe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Hg(t){return typeof t=="number"}function l3(t){return Hg(t)&&!isNaN(t)&&t>0}function aU(t,e){return Hg(t)&&!isNaN(t)&&t<=e&&t>=0}function afe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${iw}\`.`}function lfe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},qle=0,lu=[];function Wle(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(qle++)[0],i=m.useState(function(){return LB()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=hle([t.lockRef.current],(t.shards||[]).map(J7),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=bm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,A=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&A.type==="range")return!1;var T=Q7(x,A);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=Q7(x,A)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return Ule(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!lu.length||lu[lu.length-1]!==i)){var b="deltaY"in g?Y7(g):bm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&zle(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(J7).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=bm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,Y7(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,bm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return lu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,au),document.addEventListener("touchmove",l,au),document.addEventListener("touchstart",f,au),function(){lu=lu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,au),document.removeEventListener("touchmove",l,au),document.removeEventListener("touchstart",f,au)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:Vle(s)}):null,h?m.createElement(Mle,{gapMode:"margin"}):null)}const Hle=Cle(NB,Wle);var UB=m.forwardRef(function(t,e){return m.createElement(nw,ho({},t,{ref:e,sideCar:Hle}))});UB.classNames=nw.classNames;const zB=UB,Gle=["Enter"," "],sw="Menu",[Kle,Mqe,Qle]=Z2(sw),[zf,VB]=Pn(sw,[Qle,gh,bh]);gh();const Yle=bh();zf(sw);const[Dqe,Jle]=zf(sw),Xle="MenuPortal";zf(Xle,{forceMount:void 0});const Zle="MenuContent",[Nqe,qB]=zf(Zle),i3="MenuItem",X7="menu.itemSelect",WB=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=Jle(i3,t.__scopeMenu),a=qB(i3,t.__scopeMenu),l=Kt(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(X7,{bubbles:!0,cancelable:!0});u.addEventListener(X7,h=>n==null?void 0:n(h),{once:!0}),x$(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(ece,he({},s,{ref:l,disabled:r,onClick:Se(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Se(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Se(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||Gle.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),ece=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=qB(i3,r),a=Yle(r),l=m.useRef(null),c=Kt(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(Kle.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement($$,he({asChild:!0},a,{focusable:!n}),m.createElement(rt.div,he({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Se(t.onPointerMove,Z7(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Se(t.onPointerLeave,Z7(v=>o.onItemLeave(v))),onFocus:Se(t.onFocus,()=>u(!0)),onBlur:Se(t.onBlur,()=>u(!1))}))))}),tce=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(GB,{scope:t.__scopeMenu,checked:r},m.createElement(WB,he({role:"menuitemcheckbox","aria-checked":Wg(r)?"mixed":r},s,{ref:e,"data-state":A$(r),onSelect:Se(s.onSelect,()=>n==null?void 0:n(Wg(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),rce="MenuRadioGroup",[Lqe,nce]=zf(rce,{value:void 0,onValueChange:()=>{}}),sce="MenuRadioItem",ice=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=nce(sce,t.__scopeMenu),i=r===s.value;return m.createElement(GB,{scope:t.__scopeMenu,checked:i},m.createElement(WB,he({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":A$(i),onSelect:Se(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),HB="MenuItemIndicator",[GB,oce]=zf(HB,{checked:!1}),ace=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=oce(HB,r);return m.createElement(ic,{present:n||Wg(i.checked)||i.checked===!0},m.createElement(rt.span,he({},s,{ref:e,"data-state":A$(i.checked)})))}),lce="MenuSub";zf(lce);function Wg(t){return t==="indeterminate"}function A$(t){return Wg(t)?"indeterminate":t?"checked":"unchecked"}function Z7(t){return e=>e.pointerType==="mouse"?t(e):void 0}const cce=tce,fce=ice,uce=ace,KB="DropdownMenu",[dce,jqe]=Pn(KB,[VB]),_$=VB();dce(KB);const hce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(cce,he({},s,n,{ref:e}))}),vce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(fce,he({},s,n,{ref:e}))}),yce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(uce,he({},s,n,{ref:e}))}),mce=hce,pce=vce,QB=yce;var YB="_1k2mbvi5",JB="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const gce=({children:t})=>Y.jsx(QB,{className:YB,children:t});m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(mce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(gce,{children:Y.jsx(mh,{size:"xs"})}),Y.jsx(re,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(pce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(QB,{className:YB,children:Y.jsx(re,{children:"•"})}),Y.jsx(re,{variant:"small",children:e})]}));const va=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return Y.jsx(it,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),bce=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var wce="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",xce="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",Cce=hr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const Ece={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=bce(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],A=k.name,x=k.size/1e3;g({name:A,size:x,extension:A.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>Ece[w]).join(",");return Y.jsx(Ff,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:Ns(xce,Cce({borderRadius:r})),children:[y?Y.jsxs(W,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Y.jsx(re,{children:y.name}),Y.jsxs(re,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):Y.jsx(re,{children:f}),Y.jsx(W,{accept:p,as:"input",className:wce,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&Y.jsx(va,{cursor:"pointer",icon:Bf,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var Sce=hr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const o3=1e3,cd=64,sE=cd/2,iE=(t,e=o3)=>t%e/(o3/cd),Dc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},kce=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Dc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},$ce=(t,e)=>{const r=[];for(let n=0;n{const i=cd/10+iE(n.r,o3*1.5/(s+1));return{...kce(n.a,n.b,n.c),x:iE(n.x),y:iE(n.y),r:i}})},u0=m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=$ce(r,s);return Y.jsxs(W,{as:"svg",className:Ns(e,Sce({size:n})),viewBox:`0 0 ${cd} ${cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:sE,cy:sE,r:sE})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:cd/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),fr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return Y.jsx(W,{as:Zv.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},XB="Dialog",[ZB,Fqe]=Pn(XB),[Ace,oc]=ZB(XB),_ce=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=m.useRef(null),l=m.useRef(null),[c=!1,f]=Bl({prop:n,defaultProp:s,onChange:i});return m.createElement(Ace,{scope:e,triggerRef:a,contentRef:l,contentId:Al(),titleId:Al(),descriptionId:Al(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(u=>!u),[f]),modal:o},r)},eU="DialogPortal",[Pce,tU]=ZB(eU,{forceMount:void 0}),Tce=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=oc(eU,e);return m.createElement(Pce,{scope:e,forceMount:r},m.Children.map(n,o=>m.createElement(ic,{present:r||i.open},m.createElement(_B,{asChild:!0,container:s},o))))},a3="DialogOverlay",Rce=m.forwardRef((t,e)=>{const r=tU(a3,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(a3,t.__scopeDialog);return i.modal?m.createElement(ic,{present:n||i.open},m.createElement(Ice,he({},s,{ref:e}))):null}),Ice=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(a3,r);return m.createElement(zB,{as:Dd,allowPinchZoom:!0,shards:[s.contentRef]},m.createElement(rt.div,he({"data-state":nU(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),ny="DialogContent",Oce=m.forwardRef((t,e)=>{const r=tU(ny,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(ny,t.__scopeDialog);return m.createElement(ic,{present:n||i.open},i.modal?m.createElement(Mce,he({},s,{ref:e})):m.createElement(Dce,he({},s,{ref:e})))}),Mce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(null),s=Kt(e,r.contentRef,n);return m.useEffect(()=>{const i=n.current;if(i)return OB(i)},[]),m.createElement(rU,he({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Se(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Se(t.onFocusOutside,i=>i.preventDefault())}))}),Dce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(rU,he({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),rU=m.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=oc(ny,r),l=m.useRef(null),c=Kt(e,l);return lB(),m.createElement(m.Fragment,null,m.createElement(cB,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(C$,he({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nU(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),Nce="DialogClose",Lce=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(Nce,r);return m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,()=>s.onOpenChange(!1))}))});function nU(t){return t?"open":"closed"}const jce=_ce,Fce=Tce,Bce=Rce,Uce=Oce,zce=Lce;var Vce=hr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),qce=hr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const sU=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return Y.jsx(W,{className:Vce({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:Y.jsx(W,{className:qce({direction:n}),background:"backgroundPrimary",...s,children:e})})};var Wce="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",Hce=hr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),Gce="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Kce="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const P$=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t;return Y.jsx(jce,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(Fce,{forceMount:!0,children:Y.jsxs(W,{className:Kce,children:[Y.jsx(W,{as:Bce,asChild:!0,background:r,className:Gce,forceMount:!0,children:Y.jsx(Zv.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(Uce,{asChild:!0,className:Hce({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:u=>{i?o==null||o():u.preventDefault()},onInteractOutside:u=>{i||u.preventDefault()},children:Y.jsxs(Zv.div,{initial:s?!1:{y:"100%",opacity:l==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(sU,{children:n}):n,i&&Y.jsx(zce,{asChild:!0,children:Y.jsx(va,{icon:Bf,backdropFilter:"blur",size:"xs",className:Wce,"aria-label":"Close"})})]},"modal-content")})]})})})};var Qce=hr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),Yce="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",Jce=hr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ac=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{className:Ns(Yce,Jce({borderRadius:s})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Qce({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&Y.jsx(u,{size:"sm"}),h]})})})}),Xce=RegExp("^\\d*(?:\\\\[.])?\\d*$");function Zce(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const iU=m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||Xce.test(Zce(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return Y.jsx(ac,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});hr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const oU="Progress",iw=100,[efe,Bqe]=Pn(oU),[tfe,Uqe]=efe(oU),rfe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=nfe,...o}=t,a=l3(s)?s:iw,l=aU(n,a)?n:null,c=Hg(l)?i(l,a):void 0;return m.createElement(tfe,{scope:r,value:l,max:a},m.createElement(rt.div,he({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Hg(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":sfe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});rfe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!l3(n)?new Error(ife(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=l3(t.max)?t.max:iw;return n!=null&&!aU(n,i)?new Error(ofe(s,r)):null}};function nfe(t,e){return`${Math.round(t/e*100)}%`}function sfe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Hg(t){return typeof t=="number"}function l3(t){return Hg(t)&&!isNaN(t)&&t>0}function aU(t,e){return Hg(t)&&!isNaN(t)&&t<=e&&t>=0}function ife(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${iw}\`.`}function ofe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${iw} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const lU="Radio",[cfe,cU]=Pn(lU),[ffe,ufe]=cfe(lU),dfe=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Kt(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(ffe,{scope:r,checked:s,disabled:o},m.createElement(rt.button,he({type:"button",role:"radio","aria-checked":s,"data-state":fU(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Se(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(yfe,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),hfe="RadioIndicator",vfe=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=ufe(hfe,r);return m.createElement(ic,{present:n||i.checked},m.createElement(rt.span,he({"data-state":fU(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),yfe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fU(t){return t?"checked":"unchecked"}const mfe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uU="RadioGroup",[pfe,Wqe]=Pn(uU,[bh,cU]),dU=bh(),hU=cU(),[gfe,bfe]=pfe(uU),wfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=dU(r),v=ew(c),[y,g]=Bl({prop:i,defaultProp:s,onChange:u});return m.createElement(gfe,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(RB,he({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(rt.div,he({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),xfe="RadioGroupItem",Cfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=bfe(xfe,r),o=i.disabled||n,a=dU(r),l=hU(r),c=m.useRef(null),f=Kt(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{mfe.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement($$,he({asChild:!0},a,{focusable:!o,active:u}),m.createElement(dfe,he({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Se(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Se(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),Efe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=hU(r);return m.createElement(vfe,he({},s,n,{ref:e}))}),Sfe=wfe,kfe=Cfe,$fe=Efe;var Afe=hr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),_fe=hr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const Pfe=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return Y.jsx(W,{alignItems:"center",children:Y.jsx(Ff,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(kfe,{className:_fe({size:n}),value:s,id:e,disabled:i,children:Y.jsx($fe,{className:Afe({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return Y.jsx(Sfe,{disabled:n,name:i,ref:e,...l,children:Y.jsx(W,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(Pfe,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function e9(t,[e,r]){return Math.min(r,Math.max(e,t))}const vU=m.forwardRef((t,e)=>m.createElement(rt.span,he({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),Tfe=[" ","Enter","ArrowUp","ArrowDown"],Rfe=[" ","Enter"],ow="Select",[aw,T$,Ife]=Z2(ow),[wh,Hqe]=Pn(ow,[Ife,gh]),R$=gh(),[Ofe,Vf]=wh(ow),[Mfe,Dfe]=wh(ow),Nfe=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=R$(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=ew(c),[$=!1,x]=Bl({prop:n,defaultProp:s,onChange:i}),[T,B]=Bl({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Yae,v,m.createElement(Ofe,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Al(),value:T,onValueChange:B,open:$,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(aw.Provider,{scope:e},m.createElement(Mfe,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(mU,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},Lfe="SelectTrigger",jfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=R$(r),o=Vf(Lfe,r),a=o.disabled||n,l=Kt(e,o.onTriggerChange),c=T$(r),[f,u,d]=pU(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=gU(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(Jae,he({asChild:!0},i),m.createElement(rt.button,he({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":o.value===void 0?"":void 0},s,{ref:l,onClick:Se(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Se(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Se(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&Tfe.includes(v.key)&&(h(),v.preventDefault())})})))}),Ffe="SelectValue",Bfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Vf(Ffe,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Kt(e,l.onValueNodeChange);return ni(()=>{c(f)},[c,f]),m.createElement(rt.span,he({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),Ufe=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(rt.span,he({"aria-hidden":!0},s,{ref:e}),n||"▼")}),Ld="SelectContent",zfe=m.forwardRef((t,e)=>{const r=Vf(Ld,t.__scopeSelect),[n,s]=m.useState();if(ni(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(yU,{scope:t.__scopeSelect},m.createElement(aw.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(Vfe,he({},t,{ref:e}))}),qo=10,[yU,lw]=wh(Ld),Vfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Vf(Ld,r),[w,E]=m.useState(null),[k,$]=m.useState(null),x=Kt(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=T$(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return OB(w)},[w]),lB();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=pU(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=gU(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),A=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?t9:qfe,q=O===t9?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(yU,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(zB,{as:Dd,allowPinchZoom:!0},m.createElement(cB,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Se(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(C$,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,he({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Se(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),qfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Vf(Ld,r),o=lw(Ld,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Kt(e,x=>f(x)),d=T$(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-qo,ke=e9(Q,[qo,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-qo,ke=e9(Q,[qo,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-qo*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-qo,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${qo}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ni(()=>w(),[w]);const[E,k]=m.useState();ni(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(Wfe,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(rt.div,he({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),t9=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=qo,...i}=t,o=R$(r);return m.createElement(Xae,he({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Wfe,Hfe]=wh(Ld,{}),r9="SelectViewport",Gfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=lw(r9,r),i=Hfe(r9,r),o=Kt(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(aw.Slot,{scope:r},m.createElement(rt.div,he({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Se(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-qo*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),Kfe="SelectGroup",[Qfe,Gqe]=wh(Kfe),Yfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Al();return m.createElement(Qfe,{scope:r,id:s},m.createElement(rt.div,he({role:"group","aria-labelledby":s},n,{ref:e})))}),c3="SelectItem",[Jfe,Xfe]=wh(c3),Zfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Vf(c3,r),l=lw(c3,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Kt(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Al(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(Jfe,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(aw.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(rt.div,he({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Se(o.onFocus,()=>h(!0)),onBlur:Se(o.onBlur,()=>h(!1)),onPointerUp:Se(o.onPointerUp,g),onPointerMove:Se(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Se(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(Rfe.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),wm="SelectItemText",eue=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Vf(wm,r),a=lw(wm,r),l=Xfe(wm,r),c=Dfe(wm,r),[f,u]=m.useState(null),d=Kt(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ni(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(rt.span,he({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),mU=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Kt(e,s),o=G2(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(vU,{asChild:!0},m.createElement("select",he({},n,{ref:i,defaultValue:r})))});mU.displayName="BubbleSelect";function pU(t){const e=ri(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function gU(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=tue(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function tue(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const rue=Nfe,nue=jfe,sue=Bfe,iue=Ufe,oue=zfe,aue=Gfe,lue=Yfe,cue=Zfe,fue=eue;var uue="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",due="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",hue="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",vue=hr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const yue=m.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(cue,{className:Ns(due,e),...r,ref:n,children:Y.jsx(fue,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(Ff,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(rue,{disabled:n,name:l,...u,children:[Y.jsxs(nue,{id:s??l,className:Ns(hue,vue({borderRadius:r})),ref:e,children:[Y.jsx(sue,{placeholder:f}),Y.jsx(W,{as:iue,display:"inline-flex",children:Y.jsx(rB,{})})]}),Y.jsx(oue,{className:uue,children:Y.jsx(aue,{children:Y.jsx(lue,{children:c.map(({value:d,label:h,...v})=>Y.jsx(yue,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?Y.jsx(va,{icon:Bf,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(ac,{ref:e,name:i,leftIcon:J2,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var mue=hr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const I$=m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(W,{className:mue({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>Y.jsx(W,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const bU="Switch",[pue,Kqe]=Pn(bU),[gue,bue]=pue(bU),wue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,p=>d(p)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c});return m.createElement(gue,{scope:r,checked:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":wU(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:Se(t.onClick,p=>{b(w=>!w),y&&(v.current=p.isPropagationStopped(),v.current||p.stopPropagation())})})),y&&m.createElement(Eue,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),xue="SwitchThumb",Cue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=bue(xue,r);return m.createElement(rt.span,he({"data-state":wU(s.checked),"data-disabled":s.disabled?"":void 0},n,{ref:e}))}),Eue=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function wU(t){return t?"checked":"unchecked"}const Sue=wue,kue=Cue;var $ue="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11qb fyvr11hw fyvr12uz",Aue="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const n9=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return Y.jsx(Ff,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:Y.jsx(Sue,{className:$ue,disabled:e,...a,children:Y.jsx(W,{position:"relative",width:"full",height:"full",children:Y.jsx(kue,{className:Aue})})})})};hr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11rt fyvr12sn"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12sb"],[{active:!0,variant:"line"},"fyvr12sh"],[{active:!1,variant:"line"},"fyvr12sb"]]});const xU="Tabs",[_ue,Qqe]=Pn(xU,[bh]),CU=bh(),[Pue,O$]=_ue(xU),Tue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,f=ew(a),[u,d]=Bl({prop:n,onChange:s,defaultProp:i});return m.createElement(Pue,{scope:r,baseId:Al(),value:u,onValueChange:d,orientation:o,dir:f,activationMode:l},m.createElement(rt.div,he({dir:f,"data-orientation":o},c,{ref:e})))}),Rue="TabsList",Iue=m.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=O$(Rue,r),o=CU(r);return m.createElement(RB,he({asChild:!0},o,{orientation:i.orientation,dir:i.dir,loop:n}),m.createElement(rt.div,he({role:"tablist","aria-orientation":i.orientation},s,{ref:e})))}),Oue="TabsTrigger",Mue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=O$(Oue,r),a=CU(r),l=EU(o.baseId,n),c=SU(o.baseId,n),f=n===o.value;return m.createElement($$,he({asChild:!0},a,{focusable:!s,active:f}),m.createElement(rt.button,he({type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l},i,{ref:e,onMouseDown:Se(t.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(n):u.preventDefault()}),onKeyDown:Se(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(n)}),onFocus:Se(t.onFocus,()=>{const u=o.activationMode!=="manual";!f&&!s&&u&&o.onValueChange(n)})})))}),Due="TabsContent",Nue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=O$(Due,r),l=EU(a.baseId,n),c=SU(a.baseId,n),f=n===a.value,u=m.useRef(f);return m.useEffect(()=>{const d=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(d)},[]),m.createElement(ic,{present:s||f},({present:d})=>m.createElement(rt.div,he({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0}}),d&&i))});function EU(t,e){return`${t}-trigger-${e}`}function SU(t,e){return`${t}-content-${e}`}const Lue=Tue,jue=Iue,Fue=Mue;var Bue="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11pt fyvr14o",Uue="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11rh fyvr12vz",zue="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12sb";const Vue=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,s=e.findIndex(i=>i.value===r);return Y.jsxs(jue,{className:Bue,style:{outline:void 0},children:[Y.jsx(W,{display:"flex",position:"absolute",inset:"2",height:"8",children:Y.jsx("div",{className:Uue,style:{width:`${n}%`,transform:`translateX(${s*100}%)`}})}),e.map(i=>Y.jsx(Fue,{className:zue,value:i.value,children:Y.jsx(re,{variant:"normal",fontWeight:"bold",children:i.label})},i.value))]})},que=Lue,s9=Nue;var Wue="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return Y.jsxs(W,{className:Wue,ref:e,background:"buttonGlass",...s,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(re,{children:n})]})});const Hue="ToastProvider",[Gue,Yqe,Kue]=Z2("Toast"),[kU,Jqe]=Pn("Toast",[Kue]),[Xqe,$U]=kU(Hue),i9="toast.viewportPause",o9="toast.viewportResume",cw="Toast",Que="toast.swipeStart",Yue="toast.swipeMove",Jue="toast.swipeCancel",Xue="toast.swipeEnd",[Zue,ede]=kU(cw,{onClose(){}}),tde=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=$U(cw,r),[g,b]=m.useState(null),p=Kt(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=ri(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(i9,R),C.addEventListener(o9,S),()=>{C.removeEventListener(i9,R),C.removeEventListener(o9,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?_U(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(rde,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(Zue,{scope:r,onClose:U},Kr.createPortal(m.createElement(Gue.ItemSlot,{scope:r},m.createElement(gae,{asChild:!0,onEscapeKeyDown:Se(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(rt.li,he({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Se(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Se(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Se(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),A=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,xm(Yue,u,G,{discrete:!1})):a9(j,y.swipeDirection,A)?(E.current=j,xm(Que,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Se(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};a9(S,y.swipeDirection,y.swipeThreshold)?xm(Xue,h,_,{discrete:!0}):xm(Jue,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});tde.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${cw}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const rde=t=>{const{__scopeToast:e,children:r,...n}=t,s=$U(cw,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return ade(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(_B,{asChild:!0},m.createElement(vU,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},nde="ToastAction",sde=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(AU,{altText:r,asChild:!0},m.createElement(ode,he({},n,{ref:e}))):null});sde.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${nde}\``)}};const ide="ToastClose",ode=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=ede(ide,r);return m.createElement(AU,{asChild:!0},m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,s.onClose)})))}),AU=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(rt.div,he({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function _U(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),lde(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(..._U(n))}}),e}function xm(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const a9=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function ade(t=()=>{}){const e=ri(t);ni(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function lde(t){return t.nodeType===t.ELEMENT_NODE}hr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var cde="_15pztn2",fde="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Ns(fde,d&&cde),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});const f3=["dark","light"],ude="dark",dde="data-theme",PU="@sequence.theme",hde=()=>{const t=localStorage.getItem(PU);return f3.includes(t)?t:ude},vde=m.createContext(null),fw=t=>{const[e,r]=m.useState(t.theme||hde());m.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),m.useEffect(()=>{t.theme&&f3.includes(t.theme)&&r(t.theme)},[t.theme]),m.useEffect(()=>{const s=document.querySelector(":root");s&&s.setAttribute(dde,e)},[e]);const n=m.useMemo(()=>({theme:e,setTheme:s=>{f3.includes(s)&&(localStorage.setItem(PU,s),r(s))}}),[e]);return Y.jsx(vde.Provider,{value:n,children:t.children})};var yde="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",mde="bnrrebe",pde=hr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return Y.jsx(W,{className:Ns(r,pde({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?Y.jsx(fr,{className:mde,disableAnimation:n,src:i}):Y.jsx(re,{className:yde,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[uw,Zqe]=Pn("Tooltip",[gh]);gh();const gde="TooltipProvider";uw(gde);const TU="Tooltip";uw(TU);const bde="TooltipPortal";uw(bde,{forceMount:void 0});uw(TU,{isInside:!1});const wde=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${S7.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${S7.lg}px)`);if(!t.startsWith("@media")){const l=r.get(t);if(!l||l==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=l}const n=t.replace(/^@media( ?)/m,""),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1}=e,[o,a]=m.useState(()=>s?window.matchMedia(n).matches:i);return m.useEffect(()=>{let l=!0;if(!s)return;const c=window.matchMedia(n),f=()=>{l&&a(c.matches)};return f(),c.addListener(f),()=>{l=!1,c.removeListener(f)}},[n,s]),o};function xde({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:s=JSON.parse,retry:i}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(l){return l}};return{persistClient:Cde(a=>{let l=a,c=o(l),f=0;for(;c&&l;)f++,l=i==null?void 0:i({persistedClient:l,error:c,errorCount:f}),l&&(c=o(l))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return s(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:l9,restoreClient:()=>{},removeClient:l9}}function Cde(t,e=100){let r=null,n;return function(...s){n=s,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function l9(){}let xh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};const sy=typeof window>"u"||"Deno"in window;function qs(){}function Ede(t,e){return typeof t=="function"?t(e):t}function u3(t){return typeof t=="number"&&t>=0&&t!==1/0}function RU(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cm(t,e,r){return d0(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function IU(t,e,r){return d0(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function nl(t,e,r){return d0(t)?[{...e,queryKey:t},r]:[t||{},e]}function c9(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(d0(o)){if(n){if(e.queryHash!==M$(o,e.options))return!1}else if(!Gg(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function f9(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(d0(i)){if(!e.options.mutationKey)return!1;if(r){if(Yc(e.options.mutationKey)!==Yc(i))return!1}else if(!Gg(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function M$(t,e){return((e==null?void 0:e.queryKeyHashFn)||Yc)(t)}function Yc(t){return JSON.stringify(t,(e,r)=>d3(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Gg(t,e){return OU(t,e)}function OU(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!OU(t[r],e[r])):!1}function MU(t,e){if(t===e)return t;const r=u9(t)&&u9(e);if(r||d3(t)&&d3(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!d9(r)||!r.hasOwnProperty("isPrototypeOf"))}function d9(t){return Object.prototype.toString.call(t)==="[object Object]"}function d0(t){return Array.isArray(t)}function DU(t){return new Promise(e=>{setTimeout(e,t)})}function h9(t){DU(0).then(t)}function Sde(){if(typeof AbortController=="function")return new AbortController}function h3(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?MU(t,e):e}let kde=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}};const Qg=new kde,v9=["online","offline"];let $de=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&window.addEventListener){const r=()=>e();return v9.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{v9.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}};const Yg=new $de;function Ade(t){return Math.min(1e3*2**t,3e4)}function dw(t){return(t??"online")==="online"?Yg.isOnline():!0}let NU=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $p(t){return t instanceof NU}function LU(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new NU(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!Qg.isFocused()||t.networkMode!=="always"&&!Yg.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:Ade,$=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return dw(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const D$=console;function _de(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):h9(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&h9(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const br=_de();let jU=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(sy?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}},Pde=class extends jU{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||D$,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Tde(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=h3(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(qs).catch(qs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!RU(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const o=Sde(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if($p(h)&&h.silent||this.dispatch({type:"error",error:h}),!$p(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=LU({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=e.meta)!=null?s:null,fetchStatus:dw(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return $p(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),br.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}};function Tde(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}let Rde=class extends xh{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:M$(i,r);let a=this.get(o);return a||(a=new Pde({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){br.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nl(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>c9(n,s))}findAll(e,r){const[n]=nl(e,r);return Object.keys(n).length>0?this.queries.filter(s=>c9(n,s)):this.queries}notify(e){br.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){br.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){br.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}},Ide=class extends jU{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||D$,this.observers=[],this.state=e.state||FU(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var x;return this.retryer=LU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,$;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!dw(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),br.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}};function FU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let Ode=class extends xh{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new Ide({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(s),s}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){br.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>f9(e,r))}findAll(e){return this.mutations.filter(r=>f9(e,r))}notify(e){br.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return br.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(qs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function Mde(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),p=($,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...$]:[...$,T]),w=($,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&$.length)return Promise.resolve($);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p($,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",x=$?c:y9(t.options,d);E=w(d,$,x)}else if(u){const $=typeof c<"u",x=$?c:Dde(t.options,d);E=w(d,$,x,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:y9(t.options,B);return w(B,$,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function y9(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function Dde(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}let Nde=class{constructor(e={}){this.queryCache=e.queryCache||new Rde,this.mutationCache=e.mutationCache||new Ode,this.logger=e.logger||D$,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Qg.subscribe(()=>{Qg.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Yg.subscribe(()=>{Yg.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=nl(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const s=Cm(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=Ede(r,i);if(typeof o>"u")return;const a=Cm(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return br.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nl(e,r),s=this.queryCache;br.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=nl(e,r,n),o=this.queryCache,a={type:"active",...s};return br.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=nl(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=br.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(qs).catch(qs)}invalidateQueries(e,r,n){const[s,i]=nl(e,r,n);return br.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=nl(e,r,n),o=br.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(qs);return i!=null&&i.throwOnError||(a=a.catch(qs)),a}fetchQuery(e,r,n){const s=Cm(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(qs).catch(qs)}fetchInfiniteQuery(e,r,n){const s=Cm(e,r,n);return s.behavior=Mde(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(qs).catch(qs)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(s=>Yc(e)===Yc(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Gg(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>Yc(e)===Yc(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Gg(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=M$(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}},Lde=class extends xh{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),m9(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v3(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Kg(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&p9(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return Fde(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(qs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),sy||this.currentResult.isStale||!u3(this.options.staleTime))return;const r=RU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(sy||this.options.enabled===!1||!u3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Qg.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&m9(e,r),L=T&&p9(e,n,r,s);(B||L)&&(y=dw(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=h3(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=h3(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",$=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:N$(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Kg(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const f=c;return this.currentResult[f]!==r[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!$p(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){br.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function jde(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function m9(t,e){return jde(t,e)||t.state.dataUpdatedAt>0&&v3(t,e,e.refetchOnMount)}function v3(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&N$(t,e)}return!1}function p9(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&N$(t,r)}function N$(t,e){return t.isStaleByTime(e.staleTime)}function Fde(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!Kg(t.getCurrentResult(),e)}let Bde=class extends xh{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),Kg(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:FU(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){br.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,s,i;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,l,c;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)})})}};function Ude(t){return{mutationKey:t.options.mutationKey,state:t.state}}function zde(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function Vde(t){return t.state.isPaused}function qde(t){return t.state.status==="success"}function Wde(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const s=e.shouldDehydrateMutation||Vde;t.getMutationCache().getAll().forEach(i=>{s(i)&&r.push(Ude(i))})}if(e.dehydrateQueries!==!1){const s=e.shouldDehydrateQuery||qde;t.getQueryCache().getAll().forEach(i=>{s(i)&&n.push(zde(i))})}return{mutations:r,queries:n}}function Hde(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),s=t.getQueryCache(),i=e.mutations||[],o=e.queries||[];i.forEach(a=>{var l;n.build(t,{...r==null||(l=r.defaultOptions)==null?void 0:l.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(a=>{var l;const c=s.get(a.queryHash),f={...a.state,fetchStatus:"idle"};if(c){c.state.dataUpdatedAt{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Kt(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(lfe,{scope:r,checked:s,disabled:o},m.createElement(rt.button,he({type:"button",role:"radio","aria-checked":s,"data-state":fU(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Se(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(hfe,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),ufe="RadioIndicator",dfe=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=cfe(ufe,r);return m.createElement(ic,{present:n||i.checked},m.createElement(rt.span,he({"data-state":fU(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),hfe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fU(t){return t?"checked":"unchecked"}const vfe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uU="RadioGroup",[yfe,zqe]=Pn(uU,[bh,cU]),dU=bh(),hU=cU(),[mfe,pfe]=yfe(uU),gfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=dU(r),v=ew(c),[y,g]=Bl({prop:i,defaultProp:s,onChange:u});return m.createElement(mfe,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(RB,he({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(rt.div,he({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),bfe="RadioGroupItem",wfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=pfe(bfe,r),o=i.disabled||n,a=dU(r),l=hU(r),c=m.useRef(null),f=Kt(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{vfe.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement($$,he({asChild:!0},a,{focusable:!o,active:u}),m.createElement(ffe,he({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Se(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Se(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),xfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=hU(r);return m.createElement(dfe,he({},s,n,{ref:e}))}),Cfe=gfe,Efe=wfe,Sfe=xfe;var kfe=hr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),$fe=hr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const Afe=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return Y.jsx(W,{alignItems:"center",children:Y.jsx(Ff,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(Efe,{className:$fe({size:n}),value:s,id:e,disabled:i,children:Y.jsx(Sfe,{className:kfe({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return Y.jsx(Cfe,{disabled:n,name:i,ref:e,...l,children:Y.jsx(W,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(Afe,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function eR(t,[e,r]){return Math.min(r,Math.max(e,t))}const vU=m.forwardRef((t,e)=>m.createElement(rt.span,he({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),_fe=[" ","Enter","ArrowUp","ArrowDown"],Pfe=[" ","Enter"],ow="Select",[aw,T$,Tfe]=Z2(ow),[wh,Vqe]=Pn(ow,[Tfe,gh]),R$=gh(),[Rfe,Vf]=wh(ow),[Ife,Ofe]=wh(ow),Mfe=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=R$(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=ew(c),[A=!1,x]=Bl({prop:n,defaultProp:s,onChange:i}),[T,B]=Bl({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Kae,v,m.createElement(Rfe,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Al(),value:T,onValueChange:B,open:A,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(aw.Provider,{scope:e},m.createElement(Ife,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(mU,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},Dfe="SelectTrigger",Nfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=R$(r),o=Vf(Dfe,r),a=o.disabled||n,l=Kt(e,o.onTriggerChange),c=T$(r),[f,u,d]=pU(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=gU(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(Qae,he({asChild:!0},i),m.createElement(rt.button,he({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":o.value===void 0?"":void 0},s,{ref:l,onClick:Se(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Se(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Se(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&_fe.includes(v.key)&&(h(),v.preventDefault())})})))}),Lfe="SelectValue",jfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Vf(Lfe,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Kt(e,l.onValueNodeChange);return ni(()=>{c(f)},[c,f]),m.createElement(rt.span,he({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),Ffe=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(rt.span,he({"aria-hidden":!0},s,{ref:e}),n||"▼")}),Ld="SelectContent",Bfe=m.forwardRef((t,e)=>{const r=Vf(Ld,t.__scopeSelect),[n,s]=m.useState();if(ni(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(yU,{scope:t.__scopeSelect},m.createElement(aw.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(Ufe,he({},t,{ref:e}))}),qo=10,[yU,lw]=wh(Ld),Ufe=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Vf(Ld,r),[w,E]=m.useState(null),[k,A]=m.useState(null),x=Kt(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=T$(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return OB(w)},[w]),lB();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=pU(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=gU(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),$=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?tR:zfe,q=O===tR?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(yU,{scope:r,content:w,viewport:k,onViewportChange:A,itemRefCallback:$,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(zB,{as:Dd,allowPinchZoom:!0},m.createElement(cB,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Se(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(C$,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,he({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Se(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),zfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Vf(Ld,r),o=lw(Ld,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Kt(e,x=>f(x)),d=T$(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),nt=window.innerWidth-qo,ke=eR(Q,[qo,nt-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),nt=window.innerWidth-qo,ke=eR(Q,[qo,nt-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-qo*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),$=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-qo,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?$:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${qo}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ni(()=>w(),[w]);const[E,k]=m.useState();ni(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const A=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(Vfe,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:A},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(rt.div,he({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),tR=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=qo,...i}=t,o=R$(r);return m.createElement(Yae,he({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Vfe,qfe]=wh(Ld,{}),rR="SelectViewport",Wfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=lw(rR,r),i=qfe(rR,r),o=Kt(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(aw.Slot,{scope:r},m.createElement(rt.div,he({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Se(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-qo*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),Hfe="SelectGroup",[Gfe,qqe]=wh(Hfe),Kfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Al();return m.createElement(Gfe,{scope:r,id:s},m.createElement(rt.div,he({role:"group","aria-labelledby":s},n,{ref:e})))}),c3="SelectItem",[Qfe,Yfe]=wh(c3),Jfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Vf(c3,r),l=lw(c3,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Kt(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Al(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(Qfe,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(aw.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(rt.div,he({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Se(o.onFocus,()=>h(!0)),onBlur:Se(o.onBlur,()=>h(!1)),onPointerUp:Se(o.onPointerUp,g),onPointerMove:Se(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Se(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(Pfe.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),wm="SelectItemText",Xfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Vf(wm,r),a=lw(wm,r),l=Yfe(wm,r),c=Ofe(wm,r),[f,u]=m.useState(null),d=Kt(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ni(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(rt.span,he({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),mU=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Kt(e,s),o=G2(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(vU,{asChild:!0},m.createElement("select",he({},n,{ref:i,defaultValue:r})))});mU.displayName="BubbleSelect";function pU(t){const e=ri(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function gU(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=Zfe(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function Zfe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const eue=Mfe,tue=Nfe,rue=jfe,nue=Ffe,sue=Bfe,iue=Wfe,oue=Kfe,aue=Jfe,lue=Xfe;var cue="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",fue="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",uue="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",due=hr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const hue=m.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(aue,{className:Ns(fue,e),...r,ref:n,children:Y.jsx(lue,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(Ff,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(eue,{disabled:n,name:l,...u,children:[Y.jsxs(tue,{id:s??l,className:Ns(uue,due({borderRadius:r})),ref:e,children:[Y.jsx(rue,{placeholder:f}),Y.jsx(W,{as:nue,display:"inline-flex",children:Y.jsx(rB,{})})]}),Y.jsx(sue,{className:cue,children:Y.jsx(iue,{children:Y.jsx(oue,{children:c.map(({value:d,label:h,...v})=>Y.jsx(hue,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?Y.jsx(va,{icon:Bf,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(ac,{ref:e,name:i,leftIcon:J2,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var vue=hr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const I$=m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(W,{className:vue({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>Y.jsx(W,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const bU="Switch",[yue,Wqe]=Pn(bU),[mue,pue]=yue(bU),gue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,p=>d(p)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c});return m.createElement(mue,{scope:r,checked:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":wU(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:Se(t.onClick,p=>{b(w=>!w),y&&(v.current=p.isPropagationStopped(),v.current||p.stopPropagation())})})),y&&m.createElement(xue,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),bue="SwitchThumb",wue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=pue(bue,r);return m.createElement(rt.span,he({"data-state":wU(s.checked),"data-disabled":s.disabled?"":void 0},n,{ref:e}))}),xue=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function wU(t){return t?"checked":"unchecked"}const Cue=gue,Eue=wue;var Sue="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11qb fyvr11hw fyvr12uz",kue="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const nR=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return Y.jsx(Ff,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:Y.jsx(Cue,{className:Sue,disabled:e,...a,children:Y.jsx(W,{position:"relative",width:"full",height:"full",children:Y.jsx(Eue,{className:kue})})})})};hr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11rt fyvr12sn"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12sb"],[{active:!0,variant:"line"},"fyvr12sh"],[{active:!1,variant:"line"},"fyvr12sb"]]});const xU="Tabs",[$ue,Hqe]=Pn(xU,[bh]),CU=bh(),[Aue,O$]=$ue(xU),_ue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,f=ew(a),[u,d]=Bl({prop:n,onChange:s,defaultProp:i});return m.createElement(Aue,{scope:r,baseId:Al(),value:u,onValueChange:d,orientation:o,dir:f,activationMode:l},m.createElement(rt.div,he({dir:f,"data-orientation":o},c,{ref:e})))}),Pue="TabsList",Tue=m.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=O$(Pue,r),o=CU(r);return m.createElement(RB,he({asChild:!0},o,{orientation:i.orientation,dir:i.dir,loop:n}),m.createElement(rt.div,he({role:"tablist","aria-orientation":i.orientation},s,{ref:e})))}),Rue="TabsTrigger",Iue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=O$(Rue,r),a=CU(r),l=EU(o.baseId,n),c=SU(o.baseId,n),f=n===o.value;return m.createElement($$,he({asChild:!0},a,{focusable:!s,active:f}),m.createElement(rt.button,he({type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l},i,{ref:e,onMouseDown:Se(t.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(n):u.preventDefault()}),onKeyDown:Se(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(n)}),onFocus:Se(t.onFocus,()=>{const u=o.activationMode!=="manual";!f&&!s&&u&&o.onValueChange(n)})})))}),Oue="TabsContent",Mue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=O$(Oue,r),l=EU(a.baseId,n),c=SU(a.baseId,n),f=n===a.value,u=m.useRef(f);return m.useEffect(()=>{const d=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(d)},[]),m.createElement(ic,{present:s||f},({present:d})=>m.createElement(rt.div,he({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0}}),d&&i))});function EU(t,e){return`${t}-trigger-${e}`}function SU(t,e){return`${t}-content-${e}`}const Due=_ue,Nue=Tue,Lue=Iue;var jue="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11pt fyvr14o",Fue="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11rh fyvr12vz",Bue="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12sb";const Uue=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,s=e.findIndex(i=>i.value===r);return Y.jsxs(Nue,{className:jue,style:{outline:void 0},children:[Y.jsx(W,{display:"flex",position:"absolute",inset:"2",height:"8",children:Y.jsx("div",{className:Fue,style:{width:`${n}%`,transform:`translateX(${s*100}%)`}})}),e.map(i=>Y.jsx(Lue,{className:Bue,value:i.value,children:Y.jsx(re,{variant:"normal",fontWeight:"bold",children:i.label})},i.value))]})},zue=Due,sR=Mue;var Vue="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return Y.jsxs(W,{className:Vue,ref:e,background:"buttonGlass",...s,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(re,{children:n})]})});const que="ToastProvider",[Wue,Gqe,Hue]=Z2("Toast"),[kU,Kqe]=Pn("Toast",[Hue]),[Qqe,$U]=kU(que),iR="toast.viewportPause",oR="toast.viewportResume",cw="Toast",Gue="toast.swipeStart",Kue="toast.swipeMove",Que="toast.swipeCancel",Yue="toast.swipeEnd",[Jue,Xue]=kU(cw,{onClose(){}}),Zue=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=$U(cw,r),[g,b]=m.useState(null),p=Kt(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,A=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=ri(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),A.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-A.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(iR,R),C.addEventListener(oR,S),()=>{C.removeEventListener(iR,R),C.removeEventListener(oR,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?_U(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(ede,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(Jue,{scope:r,onClose:U},Kr.createPortal(m.createElement(Wue.ItemSlot,{scope:r},m.createElement(mae,{asChild:!0,onEscapeKeyDown:Se(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(rt.li,he({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Se(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Se(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Se(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),$=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,xm(Kue,u,G,{discrete:!1})):aR(j,y.swipeDirection,$)?(E.current=j,xm(Gue,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>$||Math.abs(R)>$)&&(w.current=null)}),onPointerUp:Se(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};aR(S,y.swipeDirection,y.swipeThreshold)?xm(Yue,h,_,{discrete:!0}):xm(Que,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});Zue.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${cw}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const ede=t=>{const{__scopeToast:e,children:r,...n}=t,s=$U(cw,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return ide(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(_B,{asChild:!0},m.createElement(vU,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},tde="ToastAction",rde=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(AU,{altText:r,asChild:!0},m.createElement(sde,he({},n,{ref:e}))):null});rde.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${tde}\``)}};const nde="ToastClose",sde=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=Xue(nde,r);return m.createElement(AU,{asChild:!0},m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,s.onClose)})))}),AU=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(rt.div,he({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function _U(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),ode(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(..._U(n))}}),e}function xm(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const aR=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function ide(t=()=>{}){const e=ri(t);ni(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function ode(t){return t.nodeType===t.ELEMENT_NODE}hr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var ade="_15pztn2",lde="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Ns(lde,d&&ade),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});const f3=["dark","light"],cde="dark",fde="data-theme",PU="@sequence.theme",ude=()=>{const t=localStorage.getItem(PU);return f3.includes(t)?t:cde},dde=m.createContext(null),fw=t=>{const[e,r]=m.useState(t.theme||ude());m.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),m.useEffect(()=>{t.theme&&f3.includes(t.theme)&&r(t.theme)},[t.theme]),m.useEffect(()=>{const s=document.querySelector(":root");s&&s.setAttribute(fde,e)},[e]);const n=m.useMemo(()=>({theme:e,setTheme:s=>{f3.includes(s)&&(localStorage.setItem(PU,s),r(s))}}),[e]);return Y.jsx(dde.Provider,{value:n,children:t.children})};var hde="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",vde="bnrrebe",yde=hr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return Y.jsx(W,{className:Ns(r,yde({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?Y.jsx(fr,{className:vde,disableAnimation:n,src:i}):Y.jsx(re,{className:hde,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[uw,Yqe]=Pn("Tooltip",[gh]);gh();const mde="TooltipProvider";uw(mde);const TU="Tooltip";uw(TU);const pde="TooltipPortal";uw(pde,{forceMount:void 0});uw(TU,{isInside:!1});const gde=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${S7.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${S7.lg}px)`);if(!t.startsWith("@media")){const l=r.get(t);if(!l||l==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=l}const n=t.replace(/^@media( ?)/m,""),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1}=e,[o,a]=m.useState(()=>s?window.matchMedia(n).matches:i);return m.useEffect(()=>{let l=!0;if(!s)return;const c=window.matchMedia(n),f=()=>{l&&a(c.matches)};return f(),c.addListener(f),()=>{l=!1,c.removeListener(f)}},[n,s]),o};function bde({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:s=JSON.parse,retry:i}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(l){return l}};return{persistClient:wde(a=>{let l=a,c=o(l),f=0;for(;c&&l;)f++,l=i==null?void 0:i({persistedClient:l,error:c,errorCount:f}),l&&(c=o(l))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return s(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:lR,restoreClient:()=>{},removeClient:lR}}function wde(t,e=100){let r=null,n;return function(...s){n=s,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function lR(){}let xh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};const sy=typeof window>"u"||"Deno"in window;function qs(){}function xde(t,e){return typeof t=="function"?t(e):t}function u3(t){return typeof t=="number"&&t>=0&&t!==1/0}function RU(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cm(t,e,r){return d0(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function IU(t,e,r){return d0(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function nl(t,e,r){return d0(t)?[{...e,queryKey:t},r]:[t||{},e]}function cR(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(d0(o)){if(n){if(e.queryHash!==M$(o,e.options))return!1}else if(!Gg(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function fR(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(d0(i)){if(!e.options.mutationKey)return!1;if(r){if(Yc(e.options.mutationKey)!==Yc(i))return!1}else if(!Gg(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function M$(t,e){return((e==null?void 0:e.queryKeyHashFn)||Yc)(t)}function Yc(t){return JSON.stringify(t,(e,r)=>d3(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Gg(t,e){return OU(t,e)}function OU(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!OU(t[r],e[r])):!1}function MU(t,e){if(t===e)return t;const r=uR(t)&&uR(e);if(r||d3(t)&&d3(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!dR(r)||!r.hasOwnProperty("isPrototypeOf"))}function dR(t){return Object.prototype.toString.call(t)==="[object Object]"}function d0(t){return Array.isArray(t)}function DU(t){return new Promise(e=>{setTimeout(e,t)})}function hR(t){DU(0).then(t)}function Cde(){if(typeof AbortController=="function")return new AbortController}function h3(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?MU(t,e):e}let Ede=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}};const Qg=new Ede,vR=["online","offline"];let Sde=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&window.addEventListener){const r=()=>e();return vR.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{vR.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}};const Yg=new Sde;function kde(t){return Math.min(1e3*2**t,3e4)}function dw(t){return(t??"online")==="online"?Yg.isOnline():!0}let NU=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $p(t){return t instanceof NU}function LU(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new NU(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!Qg.isFocused()||t.networkMode!=="always"&&!Yg.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:kde,A=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return dw(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const D$=console;function $de(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):hR(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&hR(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const gr=$de();let jU=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(sy?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}},Ade=class extends jU{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||D$,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||_de(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=h3(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(qs).catch(qs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!RU(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const o=Cde(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if($p(h)&&h.silent||this.dispatch({type:"error",error:h}),!$p(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=LU({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=e.meta)!=null?s:null,fetchStatus:dw(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return $p(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}};function _de(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}let Pde=class extends xh{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:M$(i,r);let a=this.get(o);return a||(a=new Ade({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){gr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nl(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>cR(n,s))}findAll(e,r){const[n]=nl(e,r);return Object.keys(n).length>0?this.queries.filter(s=>cR(n,s)):this.queries}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){gr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){gr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}},Tde=class extends jU{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||D$,this.observers=[],this.state=e.state||FU(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var x;return this.retryer=LU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,A;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!dw(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}};function FU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let Rde=class extends xh{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new Tde({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(s),s}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){gr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>fR(e,r))}findAll(e){return this.mutations.filter(r=>fR(e,r))}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return gr.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(qs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function Ide(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),p=(A,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...A]:[...A,T]),w=(A,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&A.length)return Promise.resolve(A);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p(A,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const A=typeof c<"u",x=A?c:yR(t.options,d);E=w(d,A,x)}else if(u){const A=typeof c<"u",x=A?c:Ode(t.options,d);E=w(d,A,x,!0)}else{v=[];const A=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],A,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=A?h[T]:yR(t.options,B);return w(B,A,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then(A=>({pages:A,pageParams:v}))}}}}function yR(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function Ode(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}let Mde=class{constructor(e={}){this.queryCache=e.queryCache||new Pde,this.mutationCache=e.mutationCache||new Rde,this.logger=e.logger||D$,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Qg.subscribe(()=>{Qg.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Yg.subscribe(()=>{Yg.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=nl(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const s=Cm(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=xde(r,i);if(typeof o>"u")return;const a=Cm(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return gr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nl(e,r),s=this.queryCache;gr.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=nl(e,r,n),o=this.queryCache,a={type:"active",...s};return gr.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=nl(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=gr.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(qs).catch(qs)}invalidateQueries(e,r,n){const[s,i]=nl(e,r,n);return gr.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=nl(e,r,n),o=gr.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(qs);return i!=null&&i.throwOnError||(a=a.catch(qs)),a}fetchQuery(e,r,n){const s=Cm(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(qs).catch(qs)}fetchInfiniteQuery(e,r,n){const s=Cm(e,r,n);return s.behavior=Ide(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(qs).catch(qs)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(s=>Yc(e)===Yc(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Gg(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>Yc(e)===Yc(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Gg(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=M$(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}},Dde=class extends xh{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),mR(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v3(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Kg(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&pR(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return Lde(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(qs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),sy||this.currentResult.isStale||!u3(this.options.staleTime))return;const r=RU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(sy||this.options.enabled===!1||!u3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Qg.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&mR(e,r),L=T&&pR(e,n,r,s);(B||L)&&(y=dw(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=h3(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=h3(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",A=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:A,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:A&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:A&&u.dataUpdatedAt!==0,isStale:N$(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Kg(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const f=c;return this.currentResult[f]!==r[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!$p(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){gr.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function Nde(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function mR(t,e){return Nde(t,e)||t.state.dataUpdatedAt>0&&v3(t,e,e.refetchOnMount)}function v3(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&N$(t,e)}return!1}function pR(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&N$(t,r)}function N$(t,e){return t.isStaleByTime(e.staleTime)}function Lde(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!Kg(t.getCurrentResult(),e)}let jde=class extends xh{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),Kg(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:FU(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){gr.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,s,i;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,l,c;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)})})}};function Fde(t){return{mutationKey:t.options.mutationKey,state:t.state}}function Bde(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function Ude(t){return t.state.isPaused}function zde(t){return t.state.status==="success"}function Vde(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const s=e.shouldDehydrateMutation||Ude;t.getMutationCache().getAll().forEach(i=>{s(i)&&r.push(Fde(i))})}if(e.dehydrateQueries!==!1){const s=e.shouldDehydrateQuery||zde;t.getQueryCache().getAll().forEach(i=>{s(i)&&n.push(Bde(i))})}return{mutations:r,queries:n}}function qde(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),s=t.getQueryCache(),i=e.mutations||[],o=e.queries||[];i.forEach(a=>{var l;n.build(t,{...r==null||(l=r.defaultOptions)==null?void 0:l.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(a=>{var l;const c=s.get(a.queryHash),f={...a.state,fetchStatus:"idle"};if(c){c.state.dataUpdatedAt"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?the:ehe;BU.useSyncExternalStore=Fd.useSyncExternalStore!==void 0?Fd.useSyncExternalStore:rhe;(function(t){t.exports=BU})(Gde);const nhe=jd.useSyncExternalStore,g9=m.createContext(void 0),UU=m.createContext(!1);function zU(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=g9),window.ReactQueryClientContext):g9)}const L$=({context:t}={})=>{const e=m.useContext(zU(t,m.useContext(UU)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},she=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=zU(r,n);return m.createElement(UU.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},VU=m.createContext(!1),ihe=()=>m.useContext(VU);VU.Provider;function ohe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ahe=m.createContext(ohe()),lhe=()=>m.useContext(ahe);function che(t,e){return typeof t=="function"?t(...e):!!t}function fhe(t,e,r){const n=IU(t,e,r),s=L$({context:n.context}),[i]=m.useState(()=>new Bde(s,n));m.useEffect(()=>{i.setOptions(n)},[i,n]);const o=nhe(m.useCallback(l=>i.subscribe(br.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=m.useCallback((l,c)=>{i.mutate(l,c).catch(uhe)},[i]);if(o.error&&che(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function uhe(){}const dhe=["added","removed","updated"];function b9(t){return dhe.includes(t)}async function hhe({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:s}){try{const i=await e.restoreClient();if(i)if(i.timestamp){const o=Date.now()-i.timestamp>r,a=i.buster!==n;o||a?e.removeClient():Hde(t,i.clientState,s)}else e.removeClient()}catch{e.removeClient()}}async function w9({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const s={buster:r,timestamp:Date.now(),clientState:Wde(t,n)};await e.persistClient(s)}function vhe(t){const e=t.queryClient.getQueryCache().subscribe(n=>{b9(n.type)&&w9(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{b9(n.type)&&w9(t)});return()=>{e(),r()}}function yhe(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},s=hhe(t).then(()=>{e||(r=vhe(t))});return[n,s]}var y3={},mhe={get exports(){return y3},set exports(t){y3=t}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new s(f,u||l,d),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)e.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,v=new Array(h);dt,hw=t=>t,bhe=()=>`viem@${phe}`;class fe extends Error{constructor(e,r={}){var i;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:bhe()});const n=r.cause instanceof fe?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof fe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://viem.sh${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` -`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return qU(this,e)}}function qU(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?qU(t.cause,e):e?null:t}class m3 extends fe{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class whe extends fe{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class xhe extends fe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class WU extends fe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function HU({chain:t,currentChainId:e}){if(!t)throw new xhe;if(e!==t.id)throw new whe({chain:t,currentChainId:e})}function GU(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:s=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:s}}function Ch({blockNumber:t,chain:e,contract:r}){var s;const n=(s=e==null?void 0:e.contracts)==null?void 0:s[r];if(!n)throw new m3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new m3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class Che extends fe{constructor({max:e,min:r,signed:n,size:s,value:i}){super(`Number "${i}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class Ehe extends fe{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class She extends fe{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function Ro(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Gr(t){return Ro(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function fd(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let s=0;sr*2)throw new QU({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function khe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new QU({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;se.toString(16).padStart(2,"0"));function Pa(t,e={}){return typeof t=="number"||typeof t=="bigint"?We(t,e):typeof t=="string"?j$(t,e):typeof t=="boolean"?YU(t,e):iy(t,e)}function YU(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(lc(r,{size:e.size}),Eh(r,{size:e.size})):r}function iy(t,e={}){let r="";for(let s=0;si||se)throw new She({givenSize:Gr(t),maxSize:e})}function vw(t,e={}){const{signed:r}=e;e.size&&lc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const s=(t.length-2)/2,i=(1n<typeof n=="string"?n:XU(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}function zi(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const Ohe={"0x0":"reverted","0x1":"success"};function Mhe(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>zi(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Vn(t.transactionIndex):null,status:t.status?Ohe[t.status]:null,type:t.type?JU[t.type]||t.type:null}}const Dhe={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function yw(t){return{...t,gas:typeof t.gas<"u"?We(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?We(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?We(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?We(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?We(t.nonce):void 0,type:typeof t.type<"u"?Dhe[t.type]:void 0,value:typeof t.value<"u"?We(t.value):void 0}}class oy extends fe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Nhe={gwei:9,wei:18},Lhe={ether:-9,wei:9};function ez(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[s,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`}function ls(t,e="wei"){return ez(t,Lhe[e])}class qu extends fe{constructor({cause:e,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(qu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(qu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Jg extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Jg,"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 p3 extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(p3,"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 g3 extends fe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(g3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class b3 extends fe{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` + */var Fd=m;function Hde(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Gde=typeof Object.is=="function"?Object.is:Hde,Kde=Fd.useState,Qde=Fd.useEffect,Yde=Fd.useLayoutEffect,Jde=Fd.useDebugValue;function Xde(t,e){var r=e(),n=Kde({inst:{value:r,getSnapshot:e}}),s=n[0].inst,i=n[1];return Yde(function(){s.value=r,s.getSnapshot=e,oE(s)&&i({inst:s})},[t,r,e]),Qde(function(){return oE(s)&&i({inst:s}),t(function(){oE(s)&&i({inst:s})})},[t]),Jde(r),r}function oE(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Gde(t,r)}catch{return!0}}function Zde(t,e){return e()}var ehe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Zde:Xde;BU.useSyncExternalStore=Fd.useSyncExternalStore!==void 0?Fd.useSyncExternalStore:ehe;(function(t){t.exports=BU})(Wde);const the=jd.useSyncExternalStore,gR=m.createContext(void 0),UU=m.createContext(!1);function zU(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=gR),window.ReactQueryClientContext):gR)}const L$=({context:t}={})=>{const e=m.useContext(zU(t,m.useContext(UU)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},rhe=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=zU(r,n);return m.createElement(UU.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},VU=m.createContext(!1),nhe=()=>m.useContext(VU);VU.Provider;function she(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ihe=m.createContext(she()),ohe=()=>m.useContext(ihe);function ahe(t,e){return typeof t=="function"?t(...e):!!t}function lhe(t,e,r){const n=IU(t,e,r),s=L$({context:n.context}),[i]=m.useState(()=>new jde(s,n));m.useEffect(()=>{i.setOptions(n)},[i,n]);const o=the(m.useCallback(l=>i.subscribe(gr.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=m.useCallback((l,c)=>{i.mutate(l,c).catch(che)},[i]);if(o.error&&ahe(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function che(){}const fhe=["added","removed","updated"];function bR(t){return fhe.includes(t)}async function uhe({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:s}){try{const i=await e.restoreClient();if(i)if(i.timestamp){const o=Date.now()-i.timestamp>r,a=i.buster!==n;o||a?e.removeClient():qde(t,i.clientState,s)}else e.removeClient()}catch{e.removeClient()}}async function wR({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const s={buster:r,timestamp:Date.now(),clientState:Vde(t,n)};await e.persistClient(s)}function dhe(t){const e=t.queryClient.getQueryCache().subscribe(n=>{bR(n.type)&&wR(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{bR(n.type)&&wR(t)});return()=>{e(),r()}}function hhe(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},s=uhe(t).then(()=>{e||(r=dhe(t))});return[n,s]}var y3={},vhe={get exports(){return y3},set exports(t){y3=t}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new s(f,u||l,d),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)e.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,v=new Array(h);dt,hw=t=>t,phe=()=>`viem@${yhe}`;class fe extends Error{constructor(e,r={}){var i;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:phe()});const n=r.cause instanceof fe?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof fe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://viem.sh${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return qU(this,e)}}function qU(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?qU(t.cause,e):e?null:t}class m3 extends fe{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class ghe extends fe{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class bhe extends fe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class WU extends fe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function HU({chain:t,currentChainId:e}){if(!t)throw new bhe;if(e!==t.id)throw new ghe({chain:t,currentChainId:e})}function GU(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:s=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:s}}function Ch({blockNumber:t,chain:e,contract:r}){var s;const n=(s=e==null?void 0:e.contracts)==null?void 0:s[r];if(!n)throw new m3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new m3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class whe extends fe{constructor({max:e,min:r,signed:n,size:s,value:i}){super(`Number "${i}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class xhe extends fe{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class Che extends fe{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function Ro(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Gr(t){return Ro(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function fd(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let s=0;sr*2)throw new QU({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Ehe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new QU({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;se.toString(16).padStart(2,"0"));function Pa(t,e={}){return typeof t=="number"||typeof t=="bigint"?We(t,e):typeof t=="string"?j$(t,e):typeof t=="boolean"?YU(t,e):iy(t,e)}function YU(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(lc(r,{size:e.size}),Eh(r,{size:e.size})):r}function iy(t,e={}){let r="";for(let s=0;si||se)throw new Che({givenSize:Gr(t),maxSize:e})}function vw(t,e={}){const{signed:r}=e;e.size&&lc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const s=(t.length-2)/2,i=(1n<typeof n=="string"?n:XU(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}function Ui(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const Rhe={"0x0":"reverted","0x1":"success"};function Ihe(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>Ui(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Vn(t.transactionIndex):null,status:t.status?Rhe[t.status]:null,type:t.type?JU[t.type]||t.type:null}}const Ohe={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function yw(t){return{...t,gas:typeof t.gas<"u"?We(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?We(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?We(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?We(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?We(t.nonce):void 0,type:typeof t.type<"u"?Ohe[t.type]:void 0,value:typeof t.value<"u"?We(t.value):void 0}}class oy extends fe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Mhe={gwei:9,wei:18},Dhe={ether:-9,wei:9};function ez(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[s,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`}function ls(t,e="wei"){return ez(t,Dhe[e])}class qu extends fe{constructor({cause:e,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(qu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(qu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Jg extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Jg,"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 p3 extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(p3,"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 g3 extends fe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(g3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class b3 extends fe{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` `),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(b3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class w3 extends fe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(w3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class x3 extends fe{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` `),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(x3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class C3 extends fe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(C3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class E3 extends fe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(E3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class S3 extends fe{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(S3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Xg extends fe{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ls(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ls(n)} gwei`:""}).`].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Xg,"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 mw extends fe{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}const jhe=/^0x[a-fA-F0-9]{40}$/;function Bd(t){return jhe.test(t)}function ya(t){return typeof t[0]=="string"?B$(t):Fhe(t)}function Fhe(t){let e=0;for(const s of t)e+=s.length;const r=new Uint8Array(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return r}function B$(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function U$(t,e="wei"){return ez(t,Nhe[e])}function h0(t){const e=Object.entries(t).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=e.reduce((n,[s])=>Math.max(n,s.length),0);return e.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(` -`)}class Bhe extends fe{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class Uhe extends fe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",h0(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class zhe extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class tz extends fe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){let o="Transaction";n&&i!==void 0&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(o=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(o=`Transaction at block number "${r}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class rz extends fe{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class Vhe extends fe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}function qhe(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Uhe({transaction:t})}const Whe=GU({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Hhe=GU({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var Ghe=Object.defineProperty,Khe=(t,e,r)=>e in t?Ghe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ar=(t,e,r)=>(Khe(t,typeof e!="symbol"?e+"":e,r),r),z$=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},er=(t,e,r)=>(z$(t,e,"read from private field"),r?r.call(t):e.get(t)),ps=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},pw=(t,e,r,n)=>(z$(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qr=(t,e,r)=>(z$(t,e,"access private method"),r),V$=class extends y3{constructor({chains:t=[Hhe,Whe],options:e}){super(),ar(this,"chains"),ar(this,"options"),ar(this,"storage"),this.chains=t,this.options=e}getBlockExplorerUrls(t){const{default:e,...r}=t.blockExplorers??{};if(e)return[e.url,...Object.values(r).map(n=>n.url)]}isChainUnsupported(t){return!this.chains.some(e=>e.id===t)}setStorage(t){this.storage=t}},Qhe=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),ar(this,"name","ChainNotConfiguredForConnectorError")}},sl=class extends Error{constructor(){super(...arguments),ar(this,"name","ConnectorNotFoundError"),ar(this,"message","Connector not found")}};function x9(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function cc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new l1e(t.type);return`${t.name}(${gw(t.inputs,{includeName:e})})`}function gw(t,{includeName:e=!1}={}){return t?t.map(r=>Yhe(r,{includeName:e})).join(e?", ":","):""}function Yhe(t,{includeName:e}){return t.type.startsWith("tuple")?`(${gw(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Jhe extends fe{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` -`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class C9 extends fe{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Xg,"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 mw extends fe{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}const Nhe=/^0x[a-fA-F0-9]{40}$/;function Bd(t){return Nhe.test(t)}function ya(t){return typeof t[0]=="string"?B$(t):Lhe(t)}function Lhe(t){let e=0;for(const s of t)e+=s.length;const r=new Uint8Array(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return r}function B$(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function U$(t,e="wei"){return ez(t,Mhe[e])}function h0(t){const e=Object.entries(t).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=e.reduce((n,[s])=>Math.max(n,s.length),0);return e.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(` +`)}class jhe extends fe{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class Fhe extends fe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",h0(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class Bhe extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class tz extends fe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){let o="Transaction";n&&i!==void 0&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(o=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(o=`Transaction at block number "${r}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class rz extends fe{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class Uhe extends fe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}function zhe(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Fhe({transaction:t})}const Vhe=GU({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),qhe=GU({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var Whe=Object.defineProperty,Hhe=(t,e,r)=>e in t?Whe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ar=(t,e,r)=>(Hhe(t,typeof e!="symbol"?e+"":e,r),r),z$=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},er=(t,e,r)=>(z$(t,e,"read from private field"),r?r.call(t):e.get(t)),ps=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},pw=(t,e,r,n)=>(z$(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qr=(t,e,r)=>(z$(t,e,"access private method"),r),V$=class extends y3{constructor({chains:t=[qhe,Vhe],options:e}){super(),ar(this,"chains"),ar(this,"options"),ar(this,"storage"),this.chains=t,this.options=e}getBlockExplorerUrls(t){const{default:e,...r}=t.blockExplorers??{};if(e)return[e.url,...Object.values(r).map(n=>n.url)]}isChainUnsupported(t){return!this.chains.some(e=>e.id===t)}setStorage(t){this.storage=t}},Ghe=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),ar(this,"name","ChainNotConfiguredForConnectorError")}},sl=class extends Error{constructor(){super(...arguments),ar(this,"name","ConnectorNotFoundError"),ar(this,"message","Connector not found")}};function xR(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function cc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new o1e(t.type);return`${t.name}(${gw(t.inputs,{includeName:e})})`}function gw(t,{includeName:e=!1}={}){return t?t.map(r=>Khe(r,{includeName:e})).join(e?", ":","):""}function Khe(t,{includeName:e}){return t.type.startsWith("tuple")?`(${gw(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Qhe extends fe{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class CR extends fe{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class q$ extends fe{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` -`),{metaMessages:[`Params: (${gw(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class bw extends fe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class Xhe extends fe{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class Zhe extends fe{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Gr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class e1e extends fe{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` +`),{metaMessages:[`Params: (${gw(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class bw extends fe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class Yhe extends fe{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class Jhe extends fe{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Gr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class Xhe extends fe{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class nz extends fe{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class t1e extends fe{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class r1e extends fe{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class E9 extends fe{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class Zhe extends fe{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class e1e extends fe{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class ER extends fe{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` `),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class Zg extends fe{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class n1e extends fe{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class s1e extends fe{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class wf extends fe{constructor({abiItem:e,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class t1e extends fe{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class r1e extends fe{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class wf extends fe{constructor({abiItem:e,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(` `),{metaMessages:[`Params: (${gw(n,{includeName:!0})})`,`Data: ${r} (${s} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=s}}class Sh extends fe{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${cc(e,{includeName:!0})}".`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class i1e extends fe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class o1e extends fe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class a1e extends fe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class l1e extends fe{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class c1e extends fe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const f1e=/((function|event)\s)?(.*)(\((.*)\))/;function sz(t){const e=t.match(f1e),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],s=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:s}}function u1e(t){return sz(t).name}function d1e(t){const e=sz(t).params,r=e==null?void 0:e.split(",").map(n=>n.trim().split(" "));return r==null?void 0:r.map(n=>({type:n[0],name:n[1]==="indexed"?n[2]:n[1],...n[1]==="indexed"?{indexed:!0}:{}}))}function S9(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function iz(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function k9(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function h1e(t,e){iz(t);const r=e.outputLen;if(t.length>$9&Em)}:{h:Number(t>>$9&Em)|0,l:Number(t&Em)|0}}function y1e(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;st<>>32-r,p1e=(t,e,r)=>e<>>32-r,g1e=(t,e,r)=>e<>>64-r,b1e=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const w1e=t=>t instanceof Uint8Array,x1e=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),C1e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!C1e)throw new Error("Non little-endian hardware is not supported");function E1e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function oz(t){if(typeof t=="string"&&(t=E1e(t)),!w1e(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class S1e{clone(){return this._cloneInto()}}function k1e(t){const e=n=>t().update(oz(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[az,lz,cz]=[[],[],[]],$1e=BigInt(0),u1=BigInt(1),A1e=BigInt(2),_1e=BigInt(7),P1e=BigInt(256),T1e=BigInt(113);for(let t=0,e=u1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],az.push(2*(5*n+r)),lz.push((t+1)*(t+2)/2%64);let s=$1e;for(let i=0;i<7;i++)e=(e<>_1e)*T1e)%P1e,e&A1e&&(s^=u1<<(u1<r>32?g1e(t,e,r):m1e(t,e,r),_9=(t,e,r)=>r>32?b1e(t,e,r):p1e(t,e,r);function O1e(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,c=r[l],f=r[l+1],u=A9(c,f,1)^r[a],d=_9(c,f,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=u,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=lz[o],l=A9(s,i,a),c=_9(s,i,a),f=az[o];s=t[f],i=t[f+1],t[f]=l,t[f+1]=c}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=R1e[n],t[1]^=I1e[n]}r.fill(0)}class W$ extends S1e{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,S9(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=x1e(this.state)}keccak(){O1e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){k9(this);const{blockLen:r,state:n}=this;e=oz(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return S9(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(h1e(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new W$(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const M1e=(t,e,r)=>k1e(()=>new W$(e,t,r)),D1e=M1e(1,136,256/8);function ns(t,e){const r=e||"hex",n=D1e(Ro(t,{strict:!1})?bf(t):t);return r==="bytes"?n:Pa(n)}const fz=t=>ns(bf(t));function uz(t){const e=u1e(t),r=d1e(t)||[];return fz(`${e}(${r.map(({type:n})=>n).join(",")})`)}function dz(t){return fz(cc(t))}const H$=t=>typeof t=="string"?uz(t):dz(t);function $r(t,e,r,{strict:n}={}){return Ro(t,{strict:!1})?L1e(t,e,r,{strict:n}):N1e(t,e,r,{strict:n})}function hz(t,e){if(typeof e=="number"&&e>0&&e>Gr(t)-1)throw new KU({offset:e,position:"start",size:Gr(t)})}function vz(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Gr(t)!==r-e)throw new KU({offset:r,position:"end",size:Gr(t)})}function N1e(t,e,r,{strict:n}={}){hz(t,e);const s=t.slice(e,r);return n&&vz(s,e,r),s}function L1e(t,e,r,{strict:n}={}){hz(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&vz(s,e,r),s}function v0(t,e){if(t.length!==e.length)throw new e1e({expectedLength:t.length,givenLength:e.length});const r=j1e({params:t,values:e}),n=K$(r);return n.length===0?"0x":n}function j1e({params:t,values:e}){const r=[];for(let n=0;n0?ya([a,o]):a}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:ya(i.map(({encoded:o})=>o))}}function U1e(t,{param:e}){const[,r]=e.type.split("bytes"),n=Gr(t);if(!r){let s=t;return n%32!==0&&(s=Pl(s,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:ya([Pl(We(n,{size:32})),s])}}if(n!==parseInt(r))throw new Zhe({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:Pl(t,{dir:"right"})}}function z1e(t){return{dynamic:!1,encoded:Pl(YU(t))}}function V1e(t,{signed:e}){return{dynamic:!1,encoded:We(t,{size:32,signed:e})}}function q1e(t){const e=j$(t),r=Math.ceil(Gr(e)/32),n=[];for(let s=0;ss))}}function ww(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const Q$=t=>$r(typeof t=="string"?uz(t):dz(t),0,4);function y0({abi:t,args:e=[],name:r}){const n=Ro(r,{strict:!1}),s=t.filter(i=>n?i.type==="function"?Q$(i)===r:i.type==="event"?H$(i)===r:!1:"name"in i&&i.name===r);if(s.length!==0){if(s.length===1)return s[0];for(const i of s){if(!("inputs"in i))continue;if(!e||e.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==e.length)continue;if(e.every((a,l)=>{const c="inputs"in i&&i.inputs[l];return c?k3(a,c):!1}))return i}return s[0]}}function k3(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Bd(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>k3(Object.values(t)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(s=>k3(s,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function m0({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=y0({abi:t,args:r,name:e}),!n))throw new E9(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new E9(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const s=cc(n),i=H$(s);let o=[];if(r&&"inputs"in n){const l=(a=n.inputs)==null?void 0:a.filter(f=>"indexed"in f&&f.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];c.length>0&&(o=(l==null?void 0:l.map((f,u)=>Array.isArray(c[u])?c[u].map((d,h)=>P9({param:f,value:c[u][h]})):c[u]?P9({param:f,value:c[u]}):null))??[])}return[i,...o]}function P9({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return ns(bf(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new c1e(t.type);return v0([t],[e])}function xw(t,{method:e}){var n,s;const r={};return t.transport.type==="fallback"&&((s=(n=t.transport).onResponse)==null||s.call(n,({method:i,response:o,status:a,transport:l})=>{a==="success"&&e===i&&(r[o]=l.request)})),i=>r[i]||t.request}async function yz(t,{address:e,abi:r,args:n,eventName:s,fromBlock:i,strict:o,toBlock:a}){const l=xw(t,{method:"eth_newFilter"}),c=s?m0({abi:r,args:n,eventName:s}):void 0,f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,topics:c}]});return{abi:r,args:n,eventName:s,id:f,request:l(f),strict:o,type:"event"}}function ci(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function fc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=y0({abi:t,args:e,name:r}),!n))throw new Zg(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new Zg(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const s=cc(n),i=Q$(s),o="inputs"in n&&n.inputs?v0(n.inputs,e??[]):void 0;return B$([i,o??"0x"])}const mz={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},H1e={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},G1e={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Y$(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=ns(oa(r),"bytes"),s=(e?r.substring(`${e}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(n[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());return`0x${s.join("")}`}function Tl(t,e){if(!Bd(t))throw new oy({address:t});return Y$(t,e)}function Cw(t,e){if(e==="0x"&&t.length>0)throw new bw;if(Gr(e)&&Gr(e)<32)throw new q$({data:e,params:t,size:Gr(e)});return K1e({data:e,params:t})}function K1e({data:t,params:e}){const r=[];let n=0;for(let s=0;s=Gr(t))throw new q$({data:t,params:e,size:Gr(t)});const i=e[s],{consumed:o,value:a}=ud({data:t,param:i,position:n});r.push(a),n+=o}return r}function ud({data:t,param:e,position:r}){const n=ww(e.type);if(n){const[i,o]=n;return Y1e(t,{length:i,param:{...e,type:o},position:r})}if(e.type==="tuple")return tve(t,{param:e,position:r});if(e.type==="string")return eve(t,{position:r});if(e.type.startsWith("bytes"))return X1e(t,{param:e,position:r});const s=$r(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Z1e(s,{param:e});if(e.type==="address")return Q1e(s);if(e.type==="bool")return J1e(s);throw new o1e(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function Q1e(t){return{consumed:32,value:Y$($r(t,-20))}}function Y1e(t,{param:e,length:r,position:n}){if(!r){const o=Vn($r(t,n,n+32,{strict:!0})),a=Vn($r(t,o,o+32,{strict:!0}));let l=0;const c=[];for(let f=0;f48?vw(t,{signed:r}):Vn(t,{signed:r})}}function eve(t,{position:e}){const r=Vn($r(t,e,e+32,{strict:!0})),n=Vn($r(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:Ihe(fd($r(t,r+32,r+32+n,{strict:!0})))}}function tve(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),s=n?[]:{};let i=0;if(eb(e)){const o=Vn($r(t,r,r+32,{strict:!0}));for(let a=0;ai.type==="error"&&r===Q$(cc(i)));if(!s)throw new nz(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Cw(s.inputs,$r(e,4)):void 0,errorName:s.name}}const qn=(t,e,r)=>JSON.stringify(t,(n,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof e=="function"?e(n,i):i},r);function pz({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((s,i)=>`${n&&s.name?`${s.name}: `:""}${typeof e[i]=="object"?qn(e[i]):e[i]}`).join(", ")})`}class gz extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=r?ci(r):void 0,v=h0({from:h==null?void 0:h.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class nve extends fe{constructor(e,{abi:r,args:n,contractAddress:s,docsPath:i,functionName:o,sender:a}){const l=y0({abi:r,args:n,name:o}),c=l?pz({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?cc(l,{includeName:!0}):void 0,u=h0({address:s&&ghe(s),function:f,args:c&&c!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${c}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=s,this.functionName=o,this.sender=a}}class $3 extends fe{constructor({abi:e,data:r,functionName:n,message:s}){let i,o,a,l;if(r&&r!=="0x")try{o=rve({abi:e,data:r});const{abiItem:f,errorName:u,args:d}=o;if(u==="Error")l=d[0];else if(u==="Panic"){const[h]=d;l=mz[h]}else{const h=f?cc(f,{includeName:!0}):void 0,v=f&&d?pz({abiItem:f,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",v&&v!=="()"?` ${[...Array((u==null?void 0:u.length)??0).keys()].map(()=>" ").join("")}${v}`:""]}}catch(f){i=f}else s&&(l=s);let c;i instanceof nz&&(c=i.signature,a=[`Unable to decode signature "${c}" 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=${c}.`]),super(l&&l!=="execution reverted"||c?[`The contract function "${n}" reverted with the following ${c?"signature":"reason"}:`,l||c].join(` -`):`The contract function "${n}" reverted.`,{cause:i,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=l,this.signature=c}}class sve extends fe{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class J$ extends fe{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class nv extends fe{constructor({body:e,details:r,headers:n,status:s,url:i}){super("HTTP request failed.",{details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${hw(i)}`,e&&`Request body: ${qn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=s,this.url=i}}class ive extends fe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class X$ extends fe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class A3 extends fe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hw(r)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const ove=-1;class vs extends fe{constructor(e,{code:r,docsPath:n,metaMessages:s,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:s||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof X$?e.code:r??ove}}class kh extends vs{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class ay extends vs{constructor(e){super(e,{code:ay.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(ay,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class ly extends vs{constructor(e){super(e,{code:ly.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(ly,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class cy extends vs{constructor(e){super(e,{code:cy.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(cy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class fy extends vs{constructor(e){super(e,{code:fy.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class n1e extends fe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class s1e extends fe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class i1e extends fe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class o1e extends fe{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class a1e extends fe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const l1e=/((function|event)\s)?(.*)(\((.*)\))/;function sz(t){const e=t.match(l1e),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],s=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:s}}function c1e(t){return sz(t).name}function f1e(t){const e=sz(t).params,r=e==null?void 0:e.split(",").map(n=>n.trim().split(" "));return r==null?void 0:r.map(n=>({type:n[0],name:n[1]==="indexed"?n[2]:n[1],...n[1]==="indexed"?{indexed:!0}:{}}))}function SR(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function iz(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function kR(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function u1e(t,e){iz(t);const r=e.outputLen;if(t.length>$R&Em)}:{h:Number(t>>$R&Em)|0,l:Number(t&Em)|0}}function h1e(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;st<>>32-r,y1e=(t,e,r)=>e<>>32-r,m1e=(t,e,r)=>e<>>64-r,p1e=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const g1e=t=>t instanceof Uint8Array,b1e=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),w1e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!w1e)throw new Error("Non little-endian hardware is not supported");function x1e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function oz(t){if(typeof t=="string"&&(t=x1e(t)),!g1e(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class C1e{clone(){return this._cloneInto()}}function E1e(t){const e=n=>t().update(oz(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[az,lz,cz]=[[],[],[]],S1e=BigInt(0),u1=BigInt(1),k1e=BigInt(2),$1e=BigInt(7),A1e=BigInt(256),_1e=BigInt(113);for(let t=0,e=u1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],az.push(2*(5*n+r)),lz.push((t+1)*(t+2)/2%64);let s=S1e;for(let i=0;i<7;i++)e=(e<>$1e)*_1e)%A1e,e&k1e&&(s^=u1<<(u1<r>32?m1e(t,e,r):v1e(t,e,r),_R=(t,e,r)=>r>32?p1e(t,e,r):y1e(t,e,r);function R1e(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,c=r[l],f=r[l+1],u=AR(c,f,1)^r[a],d=_R(c,f,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=u,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=lz[o],l=AR(s,i,a),c=_R(s,i,a),f=az[o];s=t[f],i=t[f+1],t[f]=l,t[f+1]=c}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=P1e[n],t[1]^=T1e[n]}r.fill(0)}class W$ extends C1e{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,SR(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=b1e(this.state)}keccak(){R1e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){kR(this);const{blockLen:r,state:n}=this;e=oz(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return SR(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(u1e(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new W$(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const I1e=(t,e,r)=>E1e(()=>new W$(e,t,r)),O1e=I1e(1,136,256/8);function ns(t,e){const r=e||"hex",n=O1e(Ro(t,{strict:!1})?bf(t):t);return r==="bytes"?n:Pa(n)}const fz=t=>ns(bf(t));function uz(t){const e=c1e(t),r=f1e(t)||[];return fz(`${e}(${r.map(({type:n})=>n).join(",")})`)}function dz(t){return fz(cc(t))}const H$=t=>typeof t=="string"?uz(t):dz(t);function $r(t,e,r,{strict:n}={}){return Ro(t,{strict:!1})?D1e(t,e,r,{strict:n}):M1e(t,e,r,{strict:n})}function hz(t,e){if(typeof e=="number"&&e>0&&e>Gr(t)-1)throw new KU({offset:e,position:"start",size:Gr(t)})}function vz(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Gr(t)!==r-e)throw new KU({offset:r,position:"end",size:Gr(t)})}function M1e(t,e,r,{strict:n}={}){hz(t,e);const s=t.slice(e,r);return n&&vz(s,e,r),s}function D1e(t,e,r,{strict:n}={}){hz(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&vz(s,e,r),s}function v0(t,e){if(t.length!==e.length)throw new Xhe({expectedLength:t.length,givenLength:e.length});const r=N1e({params:t,values:e}),n=K$(r);return n.length===0?"0x":n}function N1e({params:t,values:e}){const r=[];for(let n=0;n0?ya([a,o]):a}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:ya(i.map(({encoded:o})=>o))}}function F1e(t,{param:e}){const[,r]=e.type.split("bytes"),n=Gr(t);if(!r){let s=t;return n%32!==0&&(s=Pl(s,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:ya([Pl(We(n,{size:32})),s])}}if(n!==parseInt(r))throw new Jhe({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:Pl(t,{dir:"right"})}}function B1e(t){return{dynamic:!1,encoded:Pl(YU(t))}}function U1e(t,{signed:e}){return{dynamic:!1,encoded:We(t,{size:32,signed:e})}}function z1e(t){const e=j$(t),r=Math.ceil(Gr(e)/32),n=[];for(let s=0;ss))}}function ww(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const Q$=t=>$r(typeof t=="string"?uz(t):dz(t),0,4);function y0({abi:t,args:e=[],name:r}){const n=Ro(r,{strict:!1}),s=t.filter(i=>n?i.type==="function"?Q$(i)===r:i.type==="event"?H$(i)===r:!1:"name"in i&&i.name===r);if(s.length!==0){if(s.length===1)return s[0];for(const i of s){if(!("inputs"in i))continue;if(!e||e.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==e.length)continue;if(e.every((a,l)=>{const c="inputs"in i&&i.inputs[l];return c?k3(a,c):!1}))return i}return s[0]}}function k3(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Bd(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>k3(Object.values(t)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(s=>k3(s,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function m0({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=y0({abi:t,args:r,name:e}),!n))throw new ER(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new ER(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const s=cc(n),i=H$(s);let o=[];if(r&&"inputs"in n){const l=(a=n.inputs)==null?void 0:a.filter(f=>"indexed"in f&&f.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];c.length>0&&(o=(l==null?void 0:l.map((f,u)=>Array.isArray(c[u])?c[u].map((d,h)=>PR({param:f,value:c[u][h]})):c[u]?PR({param:f,value:c[u]}):null))??[])}return[i,...o]}function PR({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return ns(bf(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new a1e(t.type);return v0([t],[e])}function xw(t,{method:e}){var n,s;const r={};return t.transport.type==="fallback"&&((s=(n=t.transport).onResponse)==null||s.call(n,({method:i,response:o,status:a,transport:l})=>{a==="success"&&e===i&&(r[o]=l.request)})),i=>r[i]||t.request}async function yz(t,{address:e,abi:r,args:n,eventName:s,fromBlock:i,strict:o,toBlock:a}){const l=xw(t,{method:"eth_newFilter"}),c=s?m0({abi:r,args:n,eventName:s}):void 0,f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,topics:c}]});return{abi:r,args:n,eventName:s,id:f,request:l(f),strict:o,type:"event"}}function ci(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function fc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=y0({abi:t,args:e,name:r}),!n))throw new Zg(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new Zg(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const s=cc(n),i=Q$(s),o="inputs"in n&&n.inputs?v0(n.inputs,e??[]):void 0;return B$([i,o??"0x"])}const mz={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},q1e={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},W1e={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Y$(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=ns(oa(r),"bytes"),s=(e?r.substring(`${e}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(n[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());return`0x${s.join("")}`}function Tl(t,e){if(!Bd(t))throw new oy({address:t});return Y$(t,e)}function Cw(t,e){if(e==="0x"&&t.length>0)throw new bw;if(Gr(e)&&Gr(e)<32)throw new q$({data:e,params:t,size:Gr(e)});return H1e({data:e,params:t})}function H1e({data:t,params:e}){const r=[];let n=0;for(let s=0;s=Gr(t))throw new q$({data:t,params:e,size:Gr(t)});const i=e[s],{consumed:o,value:a}=ud({data:t,param:i,position:n});r.push(a),n+=o}return r}function ud({data:t,param:e,position:r}){const n=ww(e.type);if(n){const[i,o]=n;return K1e(t,{length:i,param:{...e,type:o},position:r})}if(e.type==="tuple")return Z1e(t,{param:e,position:r});if(e.type==="string")return X1e(t,{position:r});if(e.type.startsWith("bytes"))return Y1e(t,{param:e,position:r});const s=$r(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return J1e(s,{param:e});if(e.type==="address")return G1e(s);if(e.type==="bool")return Q1e(s);throw new s1e(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function G1e(t){return{consumed:32,value:Y$($r(t,-20))}}function K1e(t,{param:e,length:r,position:n}){if(!r){const o=Vn($r(t,n,n+32,{strict:!0})),a=Vn($r(t,o,o+32,{strict:!0}));let l=0;const c=[];for(let f=0;f48?vw(t,{signed:r}):Vn(t,{signed:r})}}function X1e(t,{position:e}){const r=Vn($r(t,e,e+32,{strict:!0})),n=Vn($r(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:The(fd($r(t,r+32,r+32+n,{strict:!0})))}}function Z1e(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),s=n?[]:{};let i=0;if(eb(e)){const o=Vn($r(t,r,r+32,{strict:!0}));for(let a=0;ai.type==="error"&&r===Q$(cc(i)));if(!s)throw new nz(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Cw(s.inputs,$r(e,4)):void 0,errorName:s.name}}const qn=(t,e,r)=>JSON.stringify(t,(n,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof e=="function"?e(n,i):i},r);function pz({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((s,i)=>`${n&&s.name?`${s.name}: `:""}${typeof e[i]=="object"?qn(e[i]):e[i]}`).join(", ")})`}class gz extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=r?ci(r):void 0,v=h0({from:h==null?void 0:h.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class tve extends fe{constructor(e,{abi:r,args:n,contractAddress:s,docsPath:i,functionName:o,sender:a}){const l=y0({abi:r,args:n,name:o}),c=l?pz({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?cc(l,{includeName:!0}):void 0,u=h0({address:s&&mhe(s),function:f,args:c&&c!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${c}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=s,this.functionName=o,this.sender=a}}class $3 extends fe{constructor({abi:e,data:r,functionName:n,message:s}){let i,o,a,l;if(r&&r!=="0x")try{o=eve({abi:e,data:r});const{abiItem:f,errorName:u,args:d}=o;if(u==="Error")l=d[0];else if(u==="Panic"){const[h]=d;l=mz[h]}else{const h=f?cc(f,{includeName:!0}):void 0,v=f&&d?pz({abiItem:f,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",v&&v!=="()"?` ${[...Array((u==null?void 0:u.length)??0).keys()].map(()=>" ").join("")}${v}`:""]}}catch(f){i=f}else s&&(l=s);let c;i instanceof nz&&(c=i.signature,a=[`Unable to decode signature "${c}" 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=${c}.`]),super(l&&l!=="execution reverted"||c?[`The contract function "${n}" reverted with the following ${c?"signature":"reason"}:`,l||c].join(` +`):`The contract function "${n}" reverted.`,{cause:i,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=l,this.signature=c}}class rve extends fe{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class J$ extends fe{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class nv extends fe{constructor({body:e,details:r,headers:n,status:s,url:i}){super("HTTP request failed.",{details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${hw(i)}`,e&&`Request body: ${qn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=s,this.url=i}}class nve extends fe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class X$ extends fe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class A3 extends fe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hw(r)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const sve=-1;class vs extends fe{constructor(e,{code:r,docsPath:n,metaMessages:s,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:s||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof X$?e.code:r??sve}}class kh extends vs{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class ay extends vs{constructor(e){super(e,{code:ay.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(ay,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class ly extends vs{constructor(e){super(e,{code:ly.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(ly,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class cy extends vs{constructor(e){super(e,{code:cy.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(cy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class fy extends vs{constructor(e){super(e,{code:fy.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(fy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ud extends vs{constructor(e){super(e,{code:Ud.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(Ud,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class xf extends vs{constructor(e){super(e,{code:xf.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class uy extends vs{constructor(e){super(e,{code:uy.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(uy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class zl extends vs{constructor(e){super(e,{code:zl.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class dy extends vs{constructor(e){super(e,{code:dy.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(dy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class hy extends vs{constructor(e){super(e,{code:hy.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(hy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class vy extends vs{constructor(e){super(e,{code:vy.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(vy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class yy extends vs{constructor(e){super(e,{code:yy.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(yy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Sn extends kh{constructor(e){super(e,{code:Sn.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Sn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class my extends kh{constructor(e){super(e,{code:my.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(my,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class py extends kh{constructor(e){super(e,{code:py.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(py,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class gy extends kh{constructor(e){super(e,{code:gy.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(gy,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class by extends kh{constructor(e){super(e,{code:by.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(by,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Vl extends kh{constructor(e){super(e,{code:Vl.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(Vl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ave extends vs{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const lve=3;function wy(t,{abi:e,address:r,args:n,docsPath:s,functionName:i,sender:o}){const{code:a,data:l,message:c,shortMessage:f}=t instanceof J$?t:t instanceof fe?t.walk(d=>"data"in d)||t.walk():{};let u=t;return t instanceof bw?u=new sve({functionName:i}):[lve,Ud.code].includes(a)&&(l||c||f)&&(u=new $3({abi:e,data:typeof l=="object"?l.data:l,functionName:i,message:f??c})),new nve(u,{abi:e,args:n,contractAddress:r,docsPath:s,functionName:i,sender:o})}class $h extends fe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` -`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class cve extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function Z$(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(s=>s.code===qu.code);return n instanceof fe?new qu({cause:t,message:n.details}):qu.nodeMessage.test(r)?new qu({cause:t,message:t.details}):Jg.nodeMessage.test(r)?new Jg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):p3.nodeMessage.test(r)?new p3({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):g3.nodeMessage.test(r)?new g3({cause:t,nonce:e==null?void 0:e.nonce}):b3.nodeMessage.test(r)?new b3({cause:t,nonce:e==null?void 0:e.nonce}):w3.nodeMessage.test(r)?new w3({cause:t,nonce:e==null?void 0:e.nonce}):x3.nodeMessage.test(r)?new x3({cause:t}):C3.nodeMessage.test(r)?new C3({cause:t,gas:e==null?void 0:e.gas}):E3.nodeMessage.test(r)?new E3({cause:t,gas:e==null?void 0:e.gas}):S3.nodeMessage.test(r)?new S3({cause:t}):Xg.nodeMessage.test(r)?new Xg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new mw({cause:t})}function fve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new cve(n,{docsPath:e,...r})}function e4(t,{format:e}){return e?Object.keys(e({})).reduce((n,s)=>(t!=null&&t.hasOwnProperty(s)&&(n[s]=t[s]),n),{}):{}}function p0(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:s,to:i}=t,o=e?ci(e):void 0;if(o&&!Bd(o.address))throw new oy({address:o.address});if(i&&!Bd(i))throw new oy({address:i});if(typeof r<"u"&&(typeof n<"u"||typeof s<"u"))throw new Bhe;if(n&&n>2n**256n-1n)throw new Jg({maxFeePerGas:n});if(s&&n&&s>n)throw new Xg({maxFeePerGas:n,maxPriorityFeePerGas:s})}class uve extends fe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class t4 extends fe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class dve extends fe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ls(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class hve extends fe{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function ql(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:s}={}){var f,u,d;const i=n??"latest",o=s??!1,a=r!==void 0?We(r):void 0;let l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,o]}):l=await t.request({method:"eth_getBlockByNumber",params:[a||i,o]}),!l)throw new hve({blockHash:e,blockNumber:r});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.block)==null?void 0:d.format)||ZU)(l)}async function r4(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function vve(t,e){return bz(t,e)}async function bz(t,e){var i,o,a;const{block:r,chain:n=t.chain,request:s}=e||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const l=r||await ql(t);return n.fees.defaultPriorityFee({block:l,client:t,request:s})}else if((o=n==null?void 0:n.fees)!=null&&o.defaultPriorityFee)return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const l=await t.request({method:"eth_maxPriorityFeePerGas"});return vw(l)}catch{const[l,c]=await Promise.all([r?Promise.resolve(r):ql(t),r4(t)]);if(typeof l.baseFeePerGas!="bigint")throw new t4;const f=c-l.baseFeePerGas;return f<0n?0n:f}}async function yve(t,e){return _3(t,e)}async function _3(t,e){var d;const{block:r,chain:n=t.chain,request:s,type:i="eip1559"}=e||{},o=await(async()=>{var h,v;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:s}):((v=n==null?void 0:n.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(o<1)throw new uve;const l=10**o.toString().split(".")[1].length,c=h=>h*BigInt(o*l)/BigInt(l),f=r||await ql(t);if(typeof((d=n==null?void 0:n.fees)==null?void 0:d.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:c,request:s,type:i});if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new t4;const h=s!=null&&s.maxPriorityFeePerGas?s.maxPriorityFeePerGas:await bz(t,{block:f,chain:n,request:s}),v=c(f.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??v+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??c(await r4(t))}}async function wz(t,{address:e,blockTag:r="latest",blockNumber:n}){const s=await t.request({method:"eth_getTransactionCount",params:[e,n?We(n):r]});return Vn(s)}async function Ew(t,e){const{account:r=t.account,chain:n,gas:s,nonce:i,type:o}=e;if(!r)throw new $h;const a=ci(r),l=await ql(t,{blockTag:"latest"}),c={...e,from:a.address};if(typeof i>"u"&&(c.nonce=await wz(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{c.type=qhe(c)}catch{c.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(c.type==="eip1559"){const{maxFeePerGas:f,maxPriorityFeePerGas:u}=await _3(t,{block:l,chain:n,request:c});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(c.gas=await n4(t,{...c,account:{address:a.address,type:"json-rpc"}})),p0(c),c}async function n4(t,e){var s,i,o;const r=e.account??t.account;if(!r)throw new $h({docsPath:"/docs/actions/public/estimateGas"});const n=ci(r);try{const{accessList:a,blockNumber:l,blockTag:c,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b,...p}=n.type==="local"?await Ew(t,e):e,E=(l?We(l):void 0)||c;p0(e);const k=((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionRequest)==null?void 0:o.format)||yw,$=k({...e4(p,{format:k}),from:n.address,accessList:a,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b}),x=await t.request({method:"eth_estimateGas",params:E?[$,E]:[$]});return BigInt(x)}catch(a){throw fve(a,{...e,account:n,chain:t.chain})}}async function mve(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{return await n4(t,{data:o,to:r,...i})}catch(a){const l=i.account?ci(i.account):void 0;throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}const aE="/docs/contract/decodeFunctionResult";function Ah({abi:t,args:e,functionName:r,data:n}){let s=t[0];if(r&&(s=y0({abi:t,args:e,name:r}),!s))throw new Zg(r,{docsPath:aE});if(s.type!=="function")throw new Zg(void 0,{docsPath:aE});if(!s.outputs)throw new n1e(s.name,{docsPath:aE});const i=Cw(s.outputs,n);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const pve="modulepreload",gve=function(t,e){return new URL(t,e).href},T9={},xz=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=gve(i,n),i in T9)return;T9[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let f=s.length-1;f>=0;f--){const u=s[f];if(u.href===i&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":pve,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,u)=>{c.addEventListener("load",f),c.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},P3=[{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"}],Cz=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],Ez=[...Cz,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],bve=[...Cz,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],R9=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],I9=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],wve=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],xve="0x82ad56cb";function Cve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new gz(n,{docsPath:e,...r})}const lE=new Map;function s4({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const s=async()=>{const c=a();i();const f=c.map(({args:u})=>u);f.length!==0&&t(f).then(u=>{c.forEach(({pendingPromise:d},h)=>{var v;return(v=d.resolve)==null?void 0:v.call(d,[u[h],u])})}).catch(u=>{c.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,u)})})},i=()=>lE.delete(e),o=()=>a().map(({args:c})=>c),a=()=>lE.get(e)||[],l=c=>lE.set(e,[...a(),c]);return{flush:i,async schedule(c){const f={},u=new Promise((v,y)=>{f.resolve=v,f.reject=y});return(r==null?void 0:r([...o(),c]))&&s(),a().length>0?(l({args:c,pendingPromise:f}),u):(l({args:c,pendingPromise:f}),setTimeout(s,n),u)}}}async function Sw(t,e){var b,p,w,E;const{account:r=t.account,batch:n=Boolean((b=t.batch)==null?void 0:b.multicall),blockNumber:s,blockTag:i="latest",accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v,...y}=e,g=r?ci(r):void 0;try{p0(e);const $=(s?We(s):void 0)||i,x=((E=(w=(p=t.chain)==null?void 0:p.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format)||yw,T=x({...e4(y,{format:x}),from:g==null?void 0:g.address,accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v});if(n&&Eve({request:T}))try{return await Sve(t,{...T,blockNumber:s,blockTag:i})}catch(L){if(!(L instanceof WU)&&!(L instanceof m3))throw L}const B=await t.request({method:"eth_call",params:$?[T,$]:[T]});return B==="0x"?{data:void 0}:{data:B}}catch(k){const $=kve(k),{offchainLookup:x,offchainLookupSignature:T}=await xz(()=>import("./ccip-f0ac5289.js"),[],import.meta.url);if(($==null?void 0:$.slice(0,10))===T&&h)return{data:await x(t,{data:$,to:h})};throw Cve(k,{...e,account:g,chain:t.chain})}}function Eve({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(xve)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function Sve(t,e){var y;const{batchSize:r=1024,wait:n=0}=typeof((y=t.batch)==null?void 0:y.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:i="latest",data:o,multicallAddress:a,to:l}=e;let c=a;if(!c){if(!t.chain)throw new WU;c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=(s?We(s):void 0)||i,{schedule:d}=s4({id:`${t.uid}.${u}`,wait:n,shouldSplitBatch(g){return g.reduce((p,{data:w})=>p+(w.length-2),0)>r*2},fn:async g=>{const b=g.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),p=fc({abi:P3,args:[b],functionName:"aggregate3"}),w=await t.request({method:"eth_call",params:[{data:p,to:c},u]});return Ah({abi:P3,args:[b],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:h,success:v}]=await d({data:o,to:l});if(!v)throw new J$({data:h});return h==="0x"?{data:void 0}:{data:h}}function kve(t){if(!(t instanceof fe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Wl(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{const{data:a}=await Sw(t,{data:o,to:r,...i});return Ah({abi:e,args:n,functionName:s,data:a||"0x"})}catch(a){throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:s})}}async function $ve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=o.account?ci(o.account):void 0,l=fc({abi:e,args:n,functionName:i});try{const{data:c}=await Sw(t,{batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:r,...o});return{result:Ah({abi:e,args:n,functionName:i,data:c||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}}}catch(c){throw wy(c,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:a==null?void 0:a.address})}}const cE=new Map,O9=new Map;let Ave=0;function _h(t,e,r){const n=++Ave,s=()=>cE.get(t)||[],i=()=>{const f=s();cE.set(t,f.filter(u=>u.id!==n))},o=()=>{const f=O9.get(t);s().length===1&&f&&f(),i()},a=s();if(cE.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const l={};for(const f in e)l[f]=(...u)=>{const d=s();d.length!==0&&d.forEach(h=>{var v,y;return(y=(v=h.fns)[f])==null?void 0:y.call(v,...u)})};const c=r(l);return typeof c=="function"&&O9.set(t,c),o}async function tb(t){return new Promise(e=>setTimeout(e,t))}function g0(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let s=!0;const i=()=>s=!1;return(async()=>{let a;e&&(a=await t({unpoll:i}));const l=await(r==null?void 0:r(a))??n;await tb(l);const c=async()=>{s&&(await t({unpoll:i}),await tb(n),c())};c()})(),i}const M9="/docs/contract/decodeEventLog";function b0({abi:t,data:e,strict:r,topics:n}){const s=r??!0,[i,...o]=n;if(!i)throw new t1e({docsPath:M9});const a=t.find(v=>v.type==="event"&&i===H$(cc(v)));if(!(a&&"name"in a)||a.type!=="event")throw new r1e(i,{docsPath:M9});const{name:l,inputs:c}=a,f=c==null?void 0:c.some(v=>!("name"in v&&v.name));let u=f?[]:{};const d=c.filter(v=>"indexed"in v&&v.indexed);if(o.length>0)for(let v=0;v!("indexed"in v&&v.indexed));if(h.length>0){if(e&&e!=="0x")try{const v=Cw(h,e);if(v)if(f)u=[...u,...v];else for(let y=0;y0?u:void 0}}function _ve({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Cw([t],e)||[])[0]}const Pve=new Map,Tve=new Map;function Rve(t){const e=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:o=>i.set(s,o)}),r=e(t,Pve),n=e(t,Tve);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Ive(t,{cacheKey:e,cacheTime:r=1/0}){const n=Rve(e),s=n.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()`blockNumber.${t}`;async function w0(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Ive(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Ove(t.uid),cacheTime:r??e});return BigInt(n)}async function kw(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(s=>{var i;if(typeof s=="string")return s;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function i4(t,{address:e,blockHash:r,fromBlock:n,toBlock:s,event:i,events:o,args:a,strict:l}={}){const c=l??!1,f=o??(i?[i]:void 0);let u=[];f&&(u=[f.flatMap(h=>m0({abi:[h],eventName:h.name,args:a}))],i&&(u=u[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,fromBlock:typeof n=="bigint"?We(n):n,toBlock:typeof s=="bigint"?We(s):s}]}),d.map(h=>{var v;try{const{eventName:y,args:g}=f?b0({abi:f,data:h.data,topics:h.topics,strict:c}):{eventName:void 0,args:void 0};return zi(h,{args:g,eventName:y})}catch(y){let g,b;if(y instanceof wf||y instanceof Sh){if(c)return;g=y.abiItem.name,b=(v=y.abiItem.inputs)==null?void 0:v.some(p=>!("name"in p&&p.name))}return zi(h,{args:b?[]:{},eventName:g})}}).filter(Boolean)}async function $w(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function Mve(t,{abi:e,address:r,args:n,batch:s=!0,eventName:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const v=qn(["watchContractEvent",r,n,s,t.uid,i,c]),y=f??!1;return _h(v,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await yz(t,{abi:e,address:r,args:n,eventName:i,strict:y})}catch{}w=!0;return}try{let $;if(p)$=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?$=await i4(t,{address:r,args:n,fromBlock:b+1n,toBlock:x,event:y0({abi:e,name:i})}):$=[],b=x}if($.length===0)return;s?g.onLogs($):$.forEach(x=>g.onLogs([x]))}catch($){p&&$ instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,$)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const g=i?m0({abi:e,eventName:i,args:n}):[],{unsubscribe:b}=await t.transport.subscribe({params:["logs",{address:r,topics:g}],onData(p){var E;if(!v)return;const w=p.result;try{const{eventName:k,args:$}=b0({abi:e,data:w.data,topics:w.topics,strict:f}),x=zi(w,{args:$,eventName:k});a([x])}catch(k){let $,x;if(k instanceof wf||k instanceof Sh){if(f)return;$=k.abiItem.name,x=(E=k.abiItem.inputs)==null?void 0:E.some(B=>!("name"in B&&B.name))}const T=zi(w,{args:x?[]:{},eventName:$});a([T])}},onError(p){o==null||o(p)}});y=b,v||y()}catch(g){o==null||o(g)}})(),y})()}function Dve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new zhe(n,{docsPath:e,...r})}async function xy(t){const e=await t.request({method:"eth_chainId"});return Vn(e)}async function o4(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function a4(t,e){var y,g,b;const{account:r=t.account,chain:n=t.chain,accessList:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/sendTransaction"});const v=ci(r);try{p0(e);let p;if(n!==null&&(p=await xy(t),HU({currentChainId:p,chain:n})),v.type==="local"){const k=await Ew(t,{account:v,accessList:s,chain:n,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h});p||(p=await xy(t));const $=(y=n==null?void 0:n.serializers)==null?void 0:y.transaction,x=await v.signTransaction({...k,chainId:p},{serializer:$});return await o4(t,{serializedTransaction:x})}const w=((b=(g=n==null?void 0:n.formatters)==null?void 0:g.transactionRequest)==null?void 0:b.format)||yw,E=w({...e4(h,{format:w}),accessList:s,data:i,from:v.address,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d});return await t.request({method:"eth_sendTransaction",params:[E]})}catch(p){throw Dve(p,{...e,account:v,chain:e.chain||void 0})}}async function Nve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=fc({abi:e,args:n,functionName:i});return await a4(t,{data:`${a}${s?s.replace("0x",""):""}`,to:r,...o})}async function Lve(t,{chain:e}){const{id:r,name:n,nativeCurrency:s,rpcUrls:i,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:We(r),chainName:n,nativeCurrency:s,rpcUrls:i.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const T3=256;let Sm=T3,km;function jve(t=11){if(!km||Sm+t>T3*2){km="",Sm=0;for(let e=0;e{const b=g(y);for(const w in h)delete b[w];const p={...y,...b};return Object.assign(p,{extend:v(p)})}}return Object.assign(h,{extend:v(h)})}function kz(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,i)=>{const o=async({count:a=0}={})=>{const l=async({error:c})=>{const f=typeof e=="function"?e({count:a,error:c}):e;f&&await tb(f),o({count:a+1})};try{const c=await t();s(c)}catch(c){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof nv&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function Fve(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>kz(async()=>{try{return await t(n)}catch(s){const i=s;switch(i.code){case ay.code:throw new ay(i);case ly.code:throw new ly(i);case cy.code:throw new cy(i);case fy.code:throw new fy(i);case Ud.code:throw new Ud(i);case xf.code:throw new xf(i);case uy.code:throw new uy(i);case zl.code:throw new zl(i);case dy.code:throw new dy(i);case hy.code:throw new hy(i);case vy.code:throw new vy(i);case yy.code:throw new yy(i);case Sn.code:throw new Sn(i);case my.code:throw new my(i);case py.code:throw new py(i);case gy.code:throw new gy(i);case by.code:throw new by(i);case Vl.code:throw new Vl(i);case 5e3:throw new Sn(i);default:throw s instanceof fe?s:new ave(i)}}},{delay:({count:s,error:i})=>{var o;if(i&&i instanceof nv){const a=(o=i==null?void 0:i.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!$z(s)})}function Aw({key:t,name:e,request:r,retryCount:n=3,retryDelay:s=150,timeout:i,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:s,timeout:i,type:o},request:Fve(r,{retryCount:n,retryDelay:s}),value:a}}function l4(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:s}=e;return({retryCount:i})=>Aw({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??i,retryDelay:s,type:"custom"})}function D9(t,e={}){const{key:r="fallback",name:n="Fallback",rank:s=!1,retryCount:i,retryDelay:o}=e;return({chain:a,pollingInterval:l=4e3,timeout:c})=>{let f=t,u=()=>{};const d=Aw({key:r,name:n,async request({method:h,params:v}){const y=async(g=0)=>{const b=f[g]({chain:a,retryCount:0,timeout:c});try{const p=await b.request({method:h,params:v});return u({method:h,params:v,response:p,transport:b,status:"success"}),p}catch(p){if(u({error:p,method:h,params:v,transport:b,status:"error"}),$z(p)||g===f.length-1)throw p;return y(g+1)}};return y()},retryCount:i,retryDelay:o,type:"fallback"},{onResponse:h=>u=h,transports:f.map(h=>h({chain:a,retryCount:0}))});if(s){const h=typeof s=="object"?s:{};Bve({chain:a,interval:h.interval??l,onTransports:v=>f=v,sampleCount:h.sampleCount,timeout:h.timeout,transports:f,weights:h.weights})}return d}}function Bve({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:s=1e3,transports:i,weights:o={}}){const{stability:a=.7,latency:l=.3}=o,c=[],f=async()=>{const u=await Promise.all(i.map(async v=>{const y=v({chain:t,retryCount:0,timeout:s}),g=Date.now();let b,p;try{await y.request({method:"net_listening"}),p=1}catch{p=0}finally{b=Date.now()}return{latency:b-g,success:p}}));c.push(u),c.length>n&&c.shift();const d=Math.max(...c.map(v=>Math.max(...v.map(({latency:y})=>y)))),h=i.map((v,y)=>{const g=c.map(k=>k[y].latency),p=1-g.reduce((k,$)=>k+$,0)/g.length/d,w=c.map(k=>k[y].success),E=w.reduce((k,$)=>k+$,0)/w.length;return E===0?[0,y]:[l*p+a*E,y]}).sort((v,y)=>y[0]-v[0]);r(h.map(([,v])=>i[v])),await tb(e),f()};f()}class Az extends fe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Eu=null;typeof WebSocket<"u"?Eu=WebSocket:typeof MozWebSocket<"u"?Eu=MozWebSocket:typeof global<"u"?Eu=global.WebSocket||global.MozWebSocket:typeof window<"u"?Eu=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Eu=self.WebSocket||self.MozWebSocket);const N9=Eu;function _z(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((s,i)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():i(e)},r)),s(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&i(e),i(a)}finally{clearTimeout(o)}})()})}let R3=0;async function Uve(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:s,method:i,signal:o}=r;try{const l=await _z(async({signal:f})=>await fetch(t,{...r,body:Array.isArray(e)?qn(e.map(d=>({jsonrpc:"2.0",id:d.id??R3++,...d}))):qn({jsonrpc:"2.0",id:e.id??R3++,...e}),headers:{...s,"Content-Type":"application/json"},method:i||"POST",signal:o||(n>0?f:void 0)}),{errorInstance:new A3({body:e,url:t}),timeout:n,signal:!0});let c;if((a=l.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?c=await l.json():c=await l.text(),!l.ok)throw new nv({body:e,details:qn(c.error)||l.statusText,headers:l.headers,status:l.status,url:t});return c}catch(l){throw l instanceof nv||l instanceof A3?l:new nv({body:e,details:l.message,url:t})}}const fE=new Map;async function uE(t){let e=fE.get(t);if(e)return e;const{schedule:r}=s4({id:t,fn:async()=>{const i=new N9(t),o=new Map,a=new Map,l=({data:f})=>{const u=JSON.parse(f),d=u.method==="eth_subscription",h=d?u.params.subscription:u.id,v=d?a:o,y=v.get(h);y&&y({data:f}),d||v.delete(h)},c=()=>{fE.delete(t),i.removeEventListener("close",c),i.removeEventListener("message",l)};return i.addEventListener("close",c),i.addEventListener("message",l),i.readyState===N9.CONNECTING&&await new Promise((f,u)=>{i&&(i.onopen=f,i.onerror=u)}),e=Object.assign(i,{requests:o,subscriptions:a}),fE.set(t,e),[e]}}),[n,[s]]=await r();return s}function zve(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new ive({body:e,url:t.url,details:"Socket is closed."});const n=R3++,s=({data:i})=>{var a;const o=JSON.parse(i);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,s),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,s),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Vve(t,{body:e,timeout:r=1e4}){return _z(()=>new Promise(n=>dd.webSocket(t,{body:e,onResponse:n})),{errorInstance:new A3({body:e,url:t.url}),timeout:r})}const dd={http:Uve,webSocket:zve,webSocketAsync:Vve};function qve(t,e={}){const{batch:r,fetchOptions:n,key:s="http",name:i="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:l,timeout:c})=>{const{batchSize:f=1e3,wait:u=0}=typeof r=="object"?r:{},d=e.retryCount??l,h=c??e.timeout??1e4,v=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!v)throw new Az;return Aw({key:s,name:i,async request({method:y,params:g}){const b={method:y,params:g},{schedule:p}=s4({id:`${t}`,wait:u,shouldSplitBatch($){return $.length>f},fn:$=>dd.http(v,{body:$,fetchOptions:n,timeout:h})}),w=async $=>r?p($):[await dd.http(v,{body:$,fetchOptions:n,timeout:h})],[{error:E,result:k}]=await w(b);if(E)throw new X$({body:b,error:E,url:v});return k},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function c4(t,e){var n,s,i;if(!(t instanceof fe))return!1;const r=t.walk(o=>o instanceof $3);return r instanceof $3?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ResolverWildcardNotSupported"||(i=r.reason)!=null&&i.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===mz[50]):!1}function Pz(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Ro(e)?e:null}function Ap(t){let e=new Uint8Array(32).fill(0);if(!t)return iy(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const s=Pz(r[n]),i=s?bf(s):ns(oa(r[n]),"bytes");e=ns(ya([e,i]),"bytes")}return iy(e)}function Wve(t){return`[${t.slice(2)}]`}function Hve(t){const e=new Uint8Array(32).fill(0);return t?Pz(t)||ns(oa(t)):iy(e)}function _w(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(oa(e).byteLength+2);let n=0;const s=e.split(".");for(let i=0;i255&&(o=oa(Wve(Hve(s[i])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Gve(t,{blockNumber:e,blockTag:r,coinType:n,name:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=fc({abi:I9,functionName:"addr",...n!=null?{args:[Ap(s),BigInt(n)]}:{args:[Ap(s)]}}),l=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(s)),a],blockNumber:e,blockTag:r});if(l[0]==="0x")return null;const c=Ah({abi:I9,args:n!=null?[Ap(s),BigInt(n)]:void 0,functionName:"addr",data:l[0]});return c==="0x"||fd(c)==="0x00"?null:c}catch(a){if(c4(a,"resolve"))return null;throw a}}class Kve extends fe{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class d1 extends fe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class f4 extends fe{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class Qve extends fe{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Yve=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Jve=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Xve=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Zve=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function eye(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function L9(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function Tz({uri:t,gatewayUrls:e}){const r=Xve.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=L9(e==null?void 0:e.ipfs,"https://ipfs.io"),s=L9(e==null?void 0:e.arweave,"https://arweave.net"),i=t.match(Yve),{protocol:o,subpath:a,target:l,subtarget:c=""}=(i==null?void 0:i.groups)||{},f=o==="ipns:/"||a==="ipns/",u=o==="ipfs:/"||a==="ipfs/"||Jve.test(t);if(t.startsWith("http")&&!f&&!u){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((f||u)&&l)return{uri:`${n}/${f?"ipns":"ipfs"}/${l}${c}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&l)return{uri:`${s}/${l}${c||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(Zve,"");if(d.startsWith("s.json());return await u4({gatewayUrls:t,uri:Rz(r)})}catch{throw new f4({uri:e})}}async function u4({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=Tz({uri:e,gatewayUrls:t});if(n||await eye(r))return r;throw new f4({uri:e})}function rye(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[i,o]=r.split(":"),[a,l]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new d1({reason:"Only EIP-155 supported"});if(!o)throw new d1({reason:"Chain ID not found"});if(!l)throw new d1({reason:"Contract address not found"});if(!s)throw new d1({reason:"Token ID not found"});if(!a)throw new d1({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:l,tokenID:s}}async function nye(t,{nft:e}){if(e.namespace==="erc721")return Wl(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return Wl(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new Qve({namespace:e.namespace})}async function sye(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?iye(t,{gatewayUrls:e,record:r}):u4({uri:r,gatewayUrls:e})}async function iye(t,{gatewayUrls:e,record:r}){const n=rye(r),s=await nye(t,{nft:n}),{uri:i,isOnChain:o,isEncoded:a}=Tz({uri:s,gatewayUrls:e});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const c=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(c);return u4({uri:Rz(f),gatewayUrls:e})}let l=n.tokenID;return n.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),tye({gatewayUrls:e,uri:i.replace(/(?:0x)?{id}/,l)})}async function Iz(t,{blockNumber:e,blockTag:r,name:n,key:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(n)),fc({abi:R9,functionName:"text",args:[Ap(n),s]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const l=Ah({abi:R9,functionName:"text",data:a[0]});return l===""?null:l}catch(a){if(c4(a,"resolve"))return null;throw a}}async function oye(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:s,universalResolverAddress:i}){const o=await Iz(t,{blockNumber:e,blockTag:r,key:"avatar",name:s,universalResolverAddress:i});if(!o)return null;try{return await sye(t,{record:o,gatewayUrls:n})}catch{return null}}async function aye(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await Wl(t,{address:i,abi:bve,functionName:"reverse",args:[Pa(_w(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(c4(a,"reverse"))return null;throw a}}async function lye(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await Wl(t,{address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Pa(_w(n))],blockNumber:e,blockTag:r});return o}async function cye(t){const e=xw(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function Oz(t,{address:e,args:r,event:n,events:s,fromBlock:i,strict:o,toBlock:a}={}){const l=s??(n?[n]:void 0),c=xw(t,{method:"eth_newFilter"});let f=[];l&&(f=[l.flatMap(d=>m0({abi:[d],eventName:d.name,args:r}))],n&&(f=f[0]));const u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,...f.length?{topics:f}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:i,id:u,request:c(u),strict:o,toBlock:a,type:"event"}}async function Mz(t){const e=xw(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function fye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r?We(r):void 0,i=await t.request({method:"eth_getBalance",params:[e,s||n]});return BigInt(i)}async function uye(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?We(r):void 0;let i;return e?i=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):i=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]}),Vn(i)}async function dye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?We(r):void 0,i=await t.request({method:"eth_getCode",params:[e,s||n]});if(i!=="0x")return i}function hye(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function vye(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const i=r?We(r):void 0,o=await t.request({method:"eth_feeHistory",params:[We(e),i||n,s]});return hye(o)}async function yye(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>{var i;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function mye(t,{address:e,blockNumber:r,blockTag:n="latest",slot:s}){const i=r!==void 0?We(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,s,i||n]})}async function d4(t,{blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){var f,u,d;const o=n||"latest",a=r!==void 0?We(r):void 0;let l=null;if(s?l=await t.request({method:"eth_getTransactionByHash",params:[s]}):e?l=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,We(i)]}):(a||o)&&(l=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,We(i)]})),!l)throw new tz({blockHash:e,blockNumber:r,blockTag:o,hash:s,index:i});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.transaction)==null?void 0:d.format)||XU)(l)}async function pye(t,{hash:e,transactionReceipt:r}){const[n,s]=await Promise.all([w0(t),e?d4(t,{hash:e}):void 0]),i=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return i?n-i+1n:0n}async function I3(t,{hash:e}){var s,i,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new rz({hash:e});return(((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:o.format)||Mhe)(r)}async function gye(t,e){var y;const{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:i,contracts:o,multicallAddress:a}=e,l=n??(typeof((y=t.batch)==null?void 0:y.multicall)=="object"&&t.batch.multicall.batchSize||1024);let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const f=[[]];let u=0,d=0;for(let g=0;g0&&d>l&&f[u].length>0&&(u++,d=(k.length-2)/2,f[u]=[]),f[u]=[...f[u],{allowFailure:!0,callData:k,target:p}]}catch(k){const $=wy(k,{abi:b,address:p,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!r)throw $;f[u]=[...f[u],{allowFailure:!0,callData:"0x",target:p}]}}const h=await Promise.allSettled(f.map(g=>Wl(t,{abi:P3,address:c,args:[g],blockNumber:s,blockTag:i,functionName:"aggregate3"}))),v=[];for(let g=0;g"u"?{}:t,i={EIP712Domain:Bz({domain:s}),...n};Fz({domain:s,message:e,primaryType:r,types:i});const o=["0x1901"];return s&&o.push(Cye({domain:s,types:i})),r!=="EIP712Domain"&&o.push(Dz({data:e,primaryType:r,types:i})),ns(ya(o))}function Cye({domain:t,types:e}){return Dz({data:t,primaryType:"EIP712Domain",types:e})}function Dz({data:t,primaryType:e,types:r}){const n=Nz({data:t,primaryType:e,types:r});return ns(n)}function Nz({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],s=[Eye({primaryType:e,types:r})];for(const i of r[e]){const[o,a]=jz({types:r,name:i.name,type:i.type,value:t[i.name]});n.push(o),s.push(a)}return v0(n,s)}function Eye({primaryType:t,types:e}){const r=Pa(Sye({primaryType:t,types:e}));return ns(r)}function Sye({primaryType:t,types:e}){let r="";const n=Lz({primaryType:t,types:e});n.delete(t);const s=[t,...Array.from(n).sort()];for(const i of s)r+=`${i}(${e[i].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function Lz({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||e[s]===void 0)return r;r.add(s);for(const i of e[s])Lz({primaryType:i.type,types:e},r);return r}function jz({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},ns(Nz({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ns(n)];if(r==="string")return[{type:"bytes32"},ns(Pa(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),i=n.map(o=>jz({name:e,type:s,types:t,value:o}));return[{type:"bytes32"},ns(v0(i.map(([o])=>o),i.map(([,o])=>o)))]}return[{type:r},n]}function Fz({domain:t,message:e,primaryType:r,types:n}){const s=n,i=(o,a)=>{for(const l of o){const{name:c,type:f}=l,u=f,d=a[c],h=u.match(wye);if(h&&(typeof d=="number"||typeof d=="bigint")){const[g,b,p]=h;We(d,{signed:b==="int",size:parseInt(p)/8})}if(u==="address"&&typeof d=="string"&&!Bd(d))throw new oy({address:d});const v=u.match(bye);if(v){const[g,b]=v;if(b&&Gr(d)!==parseInt(b))throw new s1e({expectedSize:parseInt(b),givenSize:Gr(d)})}const y=s[u];y&&i(y,d)}};if(s.EIP712Domain&&t&&i(s.EIP712Domain,t),r!=="EIP712Domain"){const o=s[r];i(o,e)}}function Bz({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const dE="/docs/contract/encodeDeployData";function Uz({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new Jhe({docsPath:dE});if(!("inputs"in n))throw new C9({docsPath:dE});if(!n.inputs||n.inputs.length===0)throw new C9({docsPath:dE});const s=v0(n.inputs,e);return B$([r,s])}function kye(t,e){const r=(()=>typeof t=="string"?oa(t):t.raw instanceof Uint8Array?t.raw:bf(t.raw))(),n=oa(`Ethereum Signed Message: -${r.length}`);return ns(ya([n,r]),e)}const $ye="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function Aye(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const u=qn(["watchBlockNumber",t.uid,e,r,o]);return _h(u,{onBlockNumber:n,onError:s},d=>g0(async()=>{var h;try{const v=await w0(t,{cacheTime:0});if(l){if(v===l)return;if(v-l>1&&r)for(let y=l+1n;yl)&&(d.onBlockNumber(v,l),l=v)}catch(v){(h=d.onError)==null||h.call(d,v)}},{emitOnBegin:e,interval:o}))})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(v){var g;if(!u)return;const y=vw((g=v.result)==null?void 0:g.number);n(y,l),l=y},onError(v){s==null||s(v)}});d=h,u||d()}catch(h){s==null||s(h)}})(),d})()}async function Rye(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:s=t.pollingInterval,timeout:i}){const o=qn(["waitForTransactionReceipt",t.uid,r]);let a,l,c,f=!1;return new Promise((u,d)=>{i&&setTimeout(()=>d(new Vhe({hash:r})),i);const h=_h(o,{onReplaced:n,resolve:u,reject:d},v=>{const y=Vz(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:s,async onBlockNumber(g){if(f)return;let b=g;const p=w=>{y(),w(),h()};try{if(c){if(b-c.blockNumber+1nv.resolve(c));return}if(a||(f=!0,await kz(async()=>{a=await d4(t,{hash:r}),a.blockNumber&&(b=a.blockNumber)},{delay:({count:w})=>~~(1<0&&b-c.blockNumber+1nv.resolve(c))}catch(w){if(a&&(w instanceof tz||w instanceof rz))try{l=a;const k=(await ql(t,{blockNumber:b,includeTransactions:!0})).transactions.find(({from:x,nonce:T})=>x===l.from&&T===l.nonce);if(!k||(c=await I3(t,{hash:k.hash}),b-c.blockNumber+1n{var x;(x=v.onReplaced)==null||x.call(v,{reason:$,replacedTransaction:l,transaction:k,transactionReceipt:c}),v.resolve(c)})}catch(E){p(()=>v.reject(E))}else p(()=>v.reject(w))}}})})})}function Iye(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:i,includeTransactions:o,poll:a,pollingInterval:l=t.pollingInterval}){const c=typeof a<"u"?a:t.transport.type!=="webSocket",f=o??!1;let u;return c?(()=>{const v=qn(["watchBlocks",t.uid,r,n,f,l]);return _h(v,{onBlock:s,onError:i},y=>g0(async()=>{var g;try{const b=await ql(t,{blockTag:e,includeTransactions:f});if(b.number&&(u!=null&&u.number)){if(b.number===u.number)return;if(b.number-u.number>1&&r)for(let p=(u==null?void 0:u.number)+1n;pu.number)&&(y.onBlock(b,u),u=b)}catch(b){(g=y.onError)==null||g.call(y,b)}},{emitOnBegin:n,interval:l}))})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const{unsubscribe:g}=await t.transport.subscribe({params:["newHeads"],onData(b){var E,k,$;if(!v)return;const w=((($=(k=(E=t.chain)==null?void 0:E.formatters)==null?void 0:k.block)==null?void 0:$.format)||ZU)(b.result);s(w,u),u=w},onError(b){i==null||i(b)}});y=g,v||y()}catch(g){i==null||i(g)}})(),y})()}function Oye(t,{address:e,args:r,batch:n=!0,event:s,events:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){const u=typeof l<"u"?l:t.transport.type!=="webSocket",d=f??!1;return u?(()=>{const y=qn(["watchEvent",e,r,n,t.uid,s,c]);return _h(y,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await Oz(t,{address:e,args:r,event:s,events:i,strict:d})}catch{}w=!0;return}try{let $;if(p)$=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?$=await i4(t,{address:e,args:r,event:s,events:i,fromBlock:b+1n,toBlock:x}):$=[],b=x}if($.length===0)return;n?g.onLogs($):$.forEach(x=>g.onLogs([x]))}catch($){p&&$ instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,$)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=i??(s?[s]:void 0);let p=[];b&&(p=[b.flatMap(E=>m0({abi:[E],eventName:E.name,args:r}))],s&&(p=p[0]));const{unsubscribe:w}=await t.transport.subscribe({params:["logs",{address:e,topics:p}],onData(E){var $;if(!y)return;const k=E.result;try{const{eventName:x,args:T}=b0({abi:b,data:k.data,topics:k.topics,strict:d}),B=zi(k,{args:T,eventName:x});a([B])}catch(x){let T,B;if(x instanceof wf||x instanceof Sh){if(f)return;T=x.abiItem.name,B=($=x.abiItem.inputs)==null?void 0:$.some(U=>!("name"in U&&U.name))}const L=zi(k,{args:B?[]:{},eventName:T});a([L])}},onError(E){o==null||o(E)}});g=w,y||g()}catch(b){o==null||o(b)}})(),g})()}function Mye(t,{batch:e=!0,onError:r,onTransactions:n,poll:s,pollingInterval:i=t.pollingInterval}){return(typeof s<"u"?s:t.transport.type!=="webSocket")?(()=>{const c=qn(["watchPendingTransactions",t.uid,e,i]);return _h(c,{onTransactions:n,onError:r},f=>{let u;const d=g0(async()=>{var h;try{if(!u)try{u=await Mz(t);return}catch(y){throw d(),y}const v=await kw(t,{filter:u});if(v.length===0)return;e?f.onTransactions(v):v.forEach(y=>f.onTransactions([y]))}catch(v){(h=f.onError)==null||h.call(f,v)}},{emitOnBegin:!0,interval:i});return async()=>{u&&await $w(t,{filter:u}),d()}})})():(()=>{let c=!0,f=()=>c=!1;return(async()=>{try{const{unsubscribe:u}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!c)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});f=u,c||f()}catch(u){r==null||r(u)}})(),f})()}function Dye(t){return{call:e=>Sw(t,e),createBlockFilter:()=>cye(t),createContractEventFilter:e=>yz(t,e),createEventFilter:e=>Oz(t,e),createPendingTransactionFilter:()=>Mz(t),estimateContractGas:e=>mve(t,e),estimateGas:e=>n4(t,e),getBalance:e=>fye(t,e),getBlock:e=>ql(t,e),getBlockNumber:e=>w0(t,e),getBlockTransactionCount:e=>uye(t,e),getBytecode:e=>dye(t,e),getChainId:()=>xy(t),getEnsAddress:e=>Gve(t,e),getEnsAvatar:e=>oye(t,e),getEnsName:e=>aye(t,e),getEnsResolver:e=>lye(t,e),getEnsText:e=>Iz(t,e),getFeeHistory:e=>vye(t,e),estimateFeesPerGas:e=>yve(t,e),getFilterChanges:e=>kw(t,e),getFilterLogs:e=>yye(t,e),getGasPrice:()=>r4(t),getLogs:e=>i4(t,e),estimateMaxPriorityFeePerGas:e=>vve(t,e),getStorageAt:e=>mye(t,e),getTransaction:e=>d4(t,e),getTransactionConfirmations:e=>pye(t,e),getTransactionCount:e=>wz(t,e),getTransactionReceipt:e=>I3(t,e),multicall:e=>gye(t,e),prepareTransactionRequest:e=>Ew(t,e),readContract:e=>Wl(t,e),sendRawTransaction:e=>o4(t,e),simulateContract:e=>$ve(t,e),verifyMessage:e=>Pye(t,e),verifyTypedData:e=>Tye(t,e),uninstallFilter:e=>$w(t,e),waitForTransactionReceipt:e=>Rye(t,e),watchBlocks:e=>Iye(t,e),watchBlockNumber:e=>Vz(t,e),watchContractEvent:e=>Mve(t,e),watchEvent:e=>Oye(t,e),watchPendingTransactions:e=>Mye(t,e)}}function j9(t){const{key:e="public",name:r="Public Client"}=t;return Sz({...t,key:e,name:r,type:"publicClient"}).extend(Dye)}function Nye(t,{abi:e,args:r,bytecode:n,...s}){const i=Uz({abi:e,args:r,bytecode:n});return a4(t,{...s,data:i})}async function Lye(t){return(await t.request({method:"eth_accounts"})).map(r=>Y$(r))}async function jye(t){return await t.request({method:"wallet_getPermissions"})}async function Fye(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Tl(r))}async function Bye(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function Uye(t,{account:e=t.account,message:r}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signMessage"});const n=ci(e);if(n.type==="local")return n.signMessage({message:r});const s=(()=>typeof r=="string"?j$(r):r.raw instanceof Uint8Array?Pa(r.raw):r.raw)();return t.request({method:"personal_sign",params:[s,n.address]})}async function zye(t,e){var c,f,u,d;const{account:r=t.account,chain:n=t.chain,...s}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/signTransaction"});const i=ci(r);p0({account:i,...e});const o=await xy(t);n!==null&&HU({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((c=t.chain)==null?void 0:c.formatters),l=((f=a==null?void 0:a.transactionRequest)==null?void 0:f.format)||yw;return i.type==="local"?i.signTransaction({chainId:o,...s},{serializer:(d=(u=t.chain)==null?void 0:u.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...l(s),chainId:We(o),from:i.address}]})}async function Vye(t,{account:e=t.account,domain:r,message:n,primaryType:s,types:i}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signTypedData"});const o=ci(e),a={EIP712Domain:Bz({domain:r}),...i};if(Fz({domain:r,message:n,primaryType:s,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:s,types:a,message:n});const l=qn({domain:r??{},primaryType:s,types:a,message:n},(c,f)=>Ro(f)?f.toLowerCase():f);return t.request({method:"eth_signTypedData_v4",params:[o.address,l]})}async function qye(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:We(e)}]})}async function Wye(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function Hye(t){return{addChain:e=>Lve(t,e),deployContract:e=>Nye(t,e),getAddresses:()=>Lye(t),getChainId:()=>xy(t),getPermissions:()=>jye(t),prepareTransactionRequest:e=>Ew(t,e),requestAddresses:()=>Fye(t),requestPermissions:e=>Bye(t,e),sendRawTransaction:e=>o4(t,e),sendTransaction:e=>a4(t,e),signMessage:e=>Uye(t,e),signTransaction:e=>zye(t,e),signTypedData:e=>Vye(t,e),switchChain:e=>qye(t,e),watchAsset:e=>Wye(t,e),writeContract:e=>Nve(t,e)}}function h4(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return Sz({...t,key:e,name:r,transport:i=>n({...i,retryCount:0}),type:"walletClient"}).extend(Hye)}function Gye(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:s}=e;return({chain:i,retryCount:o,timeout:a})=>{var u;const l=e.retryCount??o,c=a??e.timeout??1e4,f=t||((u=i==null?void 0:i.rpcUrls.default.webSocket)==null?void 0:u[0]);if(!f)throw new Az;return Aw({key:r,name:n,async request({method:d,params:h}){const v={method:d,params:h},y=await uE(f),{error:g,result:b}=await dd.webSocketAsync(y,{body:v,timeout:c});if(g)throw new X$({body:v,error:g,url:f});return b},retryCount:l,retryDelay:s,timeout:c,type:"webSocket"},{getSocket(){return uE(f)},async subscribe({params:d,onData:h,onError:v}){const y=await uE(f),{result:g}=await new Promise((b,p)=>dd.webSocket(y,{body:{method:"eth_subscribe",params:d},onResponse(w){if(w.error){p(w.error),v==null||v(w.error);return}if(typeof w.id=="number"){b(w);return}w.method==="eth_subscription"&&h(w.params)}}));return{subscriptionId:g,async unsubscribe(){return new Promise(b=>dd.webSocket(y,{body:{method:"eth_unsubscribe",params:[g]},onResponse:b}))}}}})}}function Kye(t){var r;if(!t)return"Injected";const e=n=>{if(n.isApexWallet)return"Apex Wallet";if(n.isAvalanche)return"Core Wallet";if(n.isBackpack)return"Backpack";if(n.isBifrost)return"Bifrost Wallet";if(n.isBitKeep)return"BitKeep";if(n.isBitski)return"Bitski";if(n.isBlockWallet)return"BlockWallet";if(n.isBraveWallet)return"Brave Wallet";if(n.isCoinbaseWallet)return"Coinbase Wallet";if(n.isDawn)return"Dawn Wallet";if(n.isDefiant)return"Defiant";if(n.isEnkrypt)return"Enkrypt";if(n.isExodus)return"Exodus";if(n.isFrame)return"Frame";if(n.isFrontier)return"Frontier Wallet";if(n.isGamestop)return"GameStop Wallet";if(n.isHaqqWallet)return"HAQQ Wallet";if(n.isHyperPay)return"HyperPay Wallet";if(n.isImToken)return"ImToken";if(n.isHaloWallet)return"Halo Wallet";if(n.isKuCoinWallet)return"KuCoin Wallet";if(n.isMathWallet)return"MathWallet";if(n.isNovaWallet)return"Nova Wallet";if(n.isOkxWallet||n.isOKExWallet)return"OKX Wallet";if(n.isOneInchIOSWallet||n.isOneInchAndroidWallet)return"1inch Wallet";if(n.isOpera)return"Opera";if(n.isPhantom)return"Phantom";if(n.isPortal)return"Ripio Portal";if(n.isRabby)return"Rabby Wallet";if(n.isRainbow)return"Rainbow";if(n.isStatus)return"Status";if(n.isTalisman)return"Talisman";if(n.isTally)return"Taho";if(n.isTokenPocket)return"TokenPocket";if(n.isTokenary)return"Tokenary";if(n.isTrust||n.isTrustWallet)return"Trust Wallet";if(n.isTTWallet)return"TTWallet";if(n.isXDEFI)return"XDEFI Wallet";if(n.isZerion)return"Zerion";if(n.isMetaMask)return"MetaMask"};if((r=t.providers)!=null&&r.length){const n=new Set;let s=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${s}`,s+=1),n.add(a)}const i=[...n];return i.length?i:i[0]??"Injected"}return e(t)??"Injected"}var _p,qz=class extends V${constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers[0]:s},...e};super({chains:t,options:r}),ar(this,"id","injected"),ar(this,"name"),ar(this,"ready"),ps(this,_p,void 0),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ar(this,"onAccountsChanged",s=>{s.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(s[0])})}),ar(this,"onChainChanged",s=>{const i=x9(s),o=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:o}})}),ar(this,"onDisconnect",async s=>{var i;s.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((i=this.storage)==null||i.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const s=Kye(n);r.name?this.name=r.name(s):typeof s=="string"?this.name=s:this.name=s[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new sl;r.on&&(r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await r.request({method:"eth_requestAccounts"}),s=Tl(n[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return t&&i!==t&&(i=(await this.switchChain(t)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:s,chain:{id:i,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new Sn(r):r.code===-32002?new zl(r):r}}async disconnect(){var e;const t=await this.getProvider();t!=null&&t.removeListener&&(t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((e=this.storage)==null||e.removeItem(this.shimDisconnectKey)))}async getAccount(){const t=await this.getProvider();if(!t)throw new sl;const e=await t.request({method:"eth_accounts"});return Tl(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new sl;return t.request({method:"eth_chainId"}).then(x9)}async getProvider(){const t=this.options.getProvider();return t&&pw(this,_p,t),er(this,_p)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(e)})}async isAuthorized(){var t;try{if(this.options.shimDisconnect&&!((t=this.storage)!=null&&t.getItem(this.shimDisconnectKey)))return!1;if(!await this.getProvider())throw new sl;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,s,i;const e=await this.getProvider();if(!e)throw new sl;const r=We(t);try{return await Promise.all([e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise(o=>this.on("change",({chain:a})=>{(a==null?void 0:a.id)===t&&o()}))]),this.chains.find(o=>o.id===t)??{id:t,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(o){const a=this.chains.find(l=>l.id===t);if(!a)throw new Qhe({chainId:t,connectorId:this.id});if(o.code===4902||((s=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:s.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((i=a.rpcUrls.public)==null?void 0:i.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new Sn(new Error("User rejected switch after adding network."));return a}catch(l){throw new Sn(l)}throw this.isUserRejectedRequestError(o)?new Sn(o):new Vl(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const s=await this.getProvider();if(!s)throw new sl;return s.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};_p=new WeakMap;var v4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},hE=(t,e,r)=>(v4(t,e,"read from private field"),r?r.call(t):e.get(t)),vE=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$m=(t,e,r,n)=>(v4(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qye=(t,e,r)=>(v4(t,e,"access private method"),r);const Yye=t=>(e,r,n)=>{const s=n.subscribe;return n.subscribe=(o,a,l)=>{let c=o;if(a){const f=(l==null?void 0:l.equalityFn)||Object.is;let u=o(n.getState());c=d=>{const h=o(d);if(!f(u,h)){const v=u;a(u=h,v)}},l!=null&&l.fireImmediately&&a(u,u)}return s(c)},t(e,r,n)},Jye=Yye;function Xye(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,e==null?void 0:e.reviver),a=(i=r.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,e==null?void 0:e.replacer)),removeItem:s=>r.removeItem(s)}}const Cy=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Cy(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Cy(n)(r)}}}},Zye=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...g)},n,s);const f=Cy(i.serialize),u=()=>{const g=i.partialize({...n()});let b;const p=f({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{b=w});if(b)throw b;return p},d=s.setState;s.setState=(g,b)=>{d(g,b),u()};const h=t((...g)=>{r(...g),u()},n,s);let v;const y=()=>{var g;if(!c)return;o=!1,a.forEach(p=>p(n()));const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,n()))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)return i.deserialize(p)}).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return v=i.merge(p,(w=n())!=null?w:h),r(v,!0),u()}).then(()=>{b==null||b(v,void 0),o=!0,l.forEach(p=>p(v))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},y(),v||h},e0e=(t,e)=>(r,n,s)=>{let i={storage:Xye(()=>localStorage),partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...e},o=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const f=()=>{const y=i.partialize({...n()});return c.setItem(i.name,{state:y,version:i.version})},u=s.setState;s.setState=(y,g)=>{u(y,g),f()};const d=t((...y)=>{r(...y),f()},n,s);let h;const v=()=>{var y,g;if(!c)return;o=!1,a.forEach(p=>{var w;return p((w=n())!=null?w:d)});const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(y=n())!=null?y:d))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return h=i.merge(p,(w=n())!=null?w:d),r(h,!0),f()}).then(()=>{b==null||b(h,void 0),h=n(),o=!0,l.forEach(p=>p(h))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},i.skipHydration||v(),h||d},t0e=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?Zye(t,e):e0e(t,e),r0e=t0e,F9=t=>{let e;const r=new Set,n=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const u=e;e=c??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,u))}},s=()=>e,a={setState:n,getState:s,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{r.clear()}};return e=t(n,s,a),a},n0e=t=>t?F9(t):F9;function y4(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,s]of t)if(!Object.is(s,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let n=0;ny===u.id)||(l=[...l,v.chain]),c[u.id]=[...c[u.id]||[],...v.rpcUrls.http],v.rpcUrls.webSocket&&(f[u.id]=[...f[u.id]||[],...v.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${u.name}". +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class uy extends vs{constructor(e){super(e,{code:uy.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(uy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class zl extends vs{constructor(e){super(e,{code:zl.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class dy extends vs{constructor(e){super(e,{code:dy.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(dy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class hy extends vs{constructor(e){super(e,{code:hy.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(hy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class vy extends vs{constructor(e){super(e,{code:vy.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(vy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class yy extends vs{constructor(e){super(e,{code:yy.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(yy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Sn extends kh{constructor(e){super(e,{code:Sn.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Sn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class my extends kh{constructor(e){super(e,{code:my.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(my,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class py extends kh{constructor(e){super(e,{code:py.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(py,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class gy extends kh{constructor(e){super(e,{code:gy.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(gy,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class by extends kh{constructor(e){super(e,{code:by.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(by,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Vl extends kh{constructor(e){super(e,{code:Vl.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(Vl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ive extends vs{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const ove=3;function wy(t,{abi:e,address:r,args:n,docsPath:s,functionName:i,sender:o}){const{code:a,data:l,message:c,shortMessage:f}=t instanceof J$?t:t instanceof fe?t.walk(d=>"data"in d)||t.walk():{};let u=t;return t instanceof bw?u=new rve({functionName:i}):[ove,Ud.code].includes(a)&&(l||c||f)&&(u=new $3({abi:e,data:typeof l=="object"?l.data:l,functionName:i,message:f??c})),new tve(u,{abi:e,args:n,contractAddress:r,docsPath:s,functionName:i,sender:o})}class $h extends fe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class ave extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function Z$(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(s=>s.code===qu.code);return n instanceof fe?new qu({cause:t,message:n.details}):qu.nodeMessage.test(r)?new qu({cause:t,message:t.details}):Jg.nodeMessage.test(r)?new Jg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):p3.nodeMessage.test(r)?new p3({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):g3.nodeMessage.test(r)?new g3({cause:t,nonce:e==null?void 0:e.nonce}):b3.nodeMessage.test(r)?new b3({cause:t,nonce:e==null?void 0:e.nonce}):w3.nodeMessage.test(r)?new w3({cause:t,nonce:e==null?void 0:e.nonce}):x3.nodeMessage.test(r)?new x3({cause:t}):C3.nodeMessage.test(r)?new C3({cause:t,gas:e==null?void 0:e.gas}):E3.nodeMessage.test(r)?new E3({cause:t,gas:e==null?void 0:e.gas}):S3.nodeMessage.test(r)?new S3({cause:t}):Xg.nodeMessage.test(r)?new Xg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new mw({cause:t})}function lve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new ave(n,{docsPath:e,...r})}function e4(t,{format:e}){return e?Object.keys(e({})).reduce((n,s)=>(t!=null&&t.hasOwnProperty(s)&&(n[s]=t[s]),n),{}):{}}function p0(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:s,to:i}=t,o=e?ci(e):void 0;if(o&&!Bd(o.address))throw new oy({address:o.address});if(i&&!Bd(i))throw new oy({address:i});if(typeof r<"u"&&(typeof n<"u"||typeof s<"u"))throw new jhe;if(n&&n>2n**256n-1n)throw new Jg({maxFeePerGas:n});if(s&&n&&s>n)throw new Xg({maxFeePerGas:n,maxPriorityFeePerGas:s})}class cve extends fe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class t4 extends fe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class fve extends fe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ls(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class uve extends fe{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function ql(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:s}={}){var f,u,d;const i=n??"latest",o=s??!1,a=r!==void 0?We(r):void 0;let l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,o]}):l=await t.request({method:"eth_getBlockByNumber",params:[a||i,o]}),!l)throw new uve({blockHash:e,blockNumber:r});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.block)==null?void 0:d.format)||ZU)(l)}async function r4(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function dve(t,e){return bz(t,e)}async function bz(t,e){var i,o,a;const{block:r,chain:n=t.chain,request:s}=e||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const l=r||await ql(t);return n.fees.defaultPriorityFee({block:l,client:t,request:s})}else if((o=n==null?void 0:n.fees)!=null&&o.defaultPriorityFee)return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const l=await t.request({method:"eth_maxPriorityFeePerGas"});return vw(l)}catch{const[l,c]=await Promise.all([r?Promise.resolve(r):ql(t),r4(t)]);if(typeof l.baseFeePerGas!="bigint")throw new t4;const f=c-l.baseFeePerGas;return f<0n?0n:f}}async function hve(t,e){return _3(t,e)}async function _3(t,e){var d;const{block:r,chain:n=t.chain,request:s,type:i="eip1559"}=e||{},o=await(async()=>{var h,v;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:s}):((v=n==null?void 0:n.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(o<1)throw new cve;const l=10**o.toString().split(".")[1].length,c=h=>h*BigInt(o*l)/BigInt(l),f=r||await ql(t);if(typeof((d=n==null?void 0:n.fees)==null?void 0:d.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:c,request:s,type:i});if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new t4;const h=s!=null&&s.maxPriorityFeePerGas?s.maxPriorityFeePerGas:await bz(t,{block:f,chain:n,request:s}),v=c(f.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??v+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??c(await r4(t))}}async function wz(t,{address:e,blockTag:r="latest",blockNumber:n}){const s=await t.request({method:"eth_getTransactionCount",params:[e,n?We(n):r]});return Vn(s)}async function Ew(t,e){const{account:r=t.account,chain:n,gas:s,nonce:i,type:o}=e;if(!r)throw new $h;const a=ci(r),l=await ql(t,{blockTag:"latest"}),c={...e,from:a.address};if(typeof i>"u"&&(c.nonce=await wz(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{c.type=zhe(c)}catch{c.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(c.type==="eip1559"){const{maxFeePerGas:f,maxPriorityFeePerGas:u}=await _3(t,{block:l,chain:n,request:c});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(c.gas=await n4(t,{...c,account:{address:a.address,type:"json-rpc"}})),p0(c),c}async function n4(t,e){var s,i,o;const r=e.account??t.account;if(!r)throw new $h({docsPath:"/docs/actions/public/estimateGas"});const n=ci(r);try{const{accessList:a,blockNumber:l,blockTag:c,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b,...p}=n.type==="local"?await Ew(t,e):e,E=(l?We(l):void 0)||c;p0(e);const k=((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionRequest)==null?void 0:o.format)||yw,A=k({...e4(p,{format:k}),from:n.address,accessList:a,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b}),x=await t.request({method:"eth_estimateGas",params:E?[A,E]:[A]});return BigInt(x)}catch(a){throw lve(a,{...e,account:n,chain:t.chain})}}async function vve(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{return await n4(t,{data:o,to:r,...i})}catch(a){const l=i.account?ci(i.account):void 0;throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}const aE="/docs/contract/decodeFunctionResult";function Ah({abi:t,args:e,functionName:r,data:n}){let s=t[0];if(r&&(s=y0({abi:t,args:e,name:r}),!s))throw new Zg(r,{docsPath:aE});if(s.type!=="function")throw new Zg(void 0,{docsPath:aE});if(!s.outputs)throw new t1e(s.name,{docsPath:aE});const i=Cw(s.outputs,n);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const yve="modulepreload",mve=function(t,e){return new URL(t,e).href},TR={},xz=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=mve(i,n),i in TR)return;TR[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let f=s.length-1;f>=0;f--){const u=s[f];if(u.href===i&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":yve,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,u)=>{c.addEventListener("load",f),c.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},P3=[{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"}],Cz=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],Ez=[...Cz,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],pve=[...Cz,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],RR=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],IR=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],gve=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],bve="0x82ad56cb";function wve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new gz(n,{docsPath:e,...r})}const lE=new Map;function s4({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const s=async()=>{const c=a();i();const f=c.map(({args:u})=>u);f.length!==0&&t(f).then(u=>{c.forEach(({pendingPromise:d},h)=>{var v;return(v=d.resolve)==null?void 0:v.call(d,[u[h],u])})}).catch(u=>{c.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,u)})})},i=()=>lE.delete(e),o=()=>a().map(({args:c})=>c),a=()=>lE.get(e)||[],l=c=>lE.set(e,[...a(),c]);return{flush:i,async schedule(c){const f={},u=new Promise((v,y)=>{f.resolve=v,f.reject=y});return(r==null?void 0:r([...o(),c]))&&s(),a().length>0?(l({args:c,pendingPromise:f}),u):(l({args:c,pendingPromise:f}),setTimeout(s,n),u)}}}async function Sw(t,e){var b,p,w,E;const{account:r=t.account,batch:n=Boolean((b=t.batch)==null?void 0:b.multicall),blockNumber:s,blockTag:i="latest",accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v,...y}=e,g=r?ci(r):void 0;try{p0(e);const A=(s?We(s):void 0)||i,x=((E=(w=(p=t.chain)==null?void 0:p.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format)||yw,T=x({...e4(y,{format:x}),from:g==null?void 0:g.address,accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v});if(n&&xve({request:T}))try{return await Cve(t,{...T,blockNumber:s,blockTag:i})}catch(L){if(!(L instanceof WU)&&!(L instanceof m3))throw L}const B=await t.request({method:"eth_call",params:A?[T,A]:[T]});return B==="0x"?{data:void 0}:{data:B}}catch(k){const A=Eve(k),{offchainLookup:x,offchainLookupSignature:T}=await xz(()=>import("./ccip-685adec5.js"),[],import.meta.url);if((A==null?void 0:A.slice(0,10))===T&&h)return{data:await x(t,{data:A,to:h})};throw wve(k,{...e,account:g,chain:t.chain})}}function xve({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(bve)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function Cve(t,e){var y;const{batchSize:r=1024,wait:n=0}=typeof((y=t.batch)==null?void 0:y.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:i="latest",data:o,multicallAddress:a,to:l}=e;let c=a;if(!c){if(!t.chain)throw new WU;c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=(s?We(s):void 0)||i,{schedule:d}=s4({id:`${t.uid}.${u}`,wait:n,shouldSplitBatch(g){return g.reduce((p,{data:w})=>p+(w.length-2),0)>r*2},fn:async g=>{const b=g.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),p=fc({abi:P3,args:[b],functionName:"aggregate3"}),w=await t.request({method:"eth_call",params:[{data:p,to:c},u]});return Ah({abi:P3,args:[b],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:h,success:v}]=await d({data:o,to:l});if(!v)throw new J$({data:h});return h==="0x"?{data:void 0}:{data:h}}function Eve(t){if(!(t instanceof fe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Wl(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{const{data:a}=await Sw(t,{data:o,to:r,...i});return Ah({abi:e,args:n,functionName:s,data:a||"0x"})}catch(a){throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:s})}}async function Sve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=o.account?ci(o.account):void 0,l=fc({abi:e,args:n,functionName:i});try{const{data:c}=await Sw(t,{batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:r,...o});return{result:Ah({abi:e,args:n,functionName:i,data:c||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}}}catch(c){throw wy(c,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:a==null?void 0:a.address})}}const cE=new Map,OR=new Map;let kve=0;function _h(t,e,r){const n=++kve,s=()=>cE.get(t)||[],i=()=>{const f=s();cE.set(t,f.filter(u=>u.id!==n))},o=()=>{const f=OR.get(t);s().length===1&&f&&f(),i()},a=s();if(cE.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const l={};for(const f in e)l[f]=(...u)=>{const d=s();d.length!==0&&d.forEach(h=>{var v,y;return(y=(v=h.fns)[f])==null?void 0:y.call(v,...u)})};const c=r(l);return typeof c=="function"&&OR.set(t,c),o}async function tb(t){return new Promise(e=>setTimeout(e,t))}function g0(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let s=!0;const i=()=>s=!1;return(async()=>{let a;e&&(a=await t({unpoll:i}));const l=await(r==null?void 0:r(a))??n;await tb(l);const c=async()=>{s&&(await t({unpoll:i}),await tb(n),c())};c()})(),i}const MR="/docs/contract/decodeEventLog";function b0({abi:t,data:e,strict:r,topics:n}){const s=r??!0,[i,...o]=n;if(!i)throw new Zhe({docsPath:MR});const a=t.find(v=>v.type==="event"&&i===H$(cc(v)));if(!(a&&"name"in a)||a.type!=="event")throw new e1e(i,{docsPath:MR});const{name:l,inputs:c}=a,f=c==null?void 0:c.some(v=>!("name"in v&&v.name));let u=f?[]:{};const d=c.filter(v=>"indexed"in v&&v.indexed);if(o.length>0)for(let v=0;v!("indexed"in v&&v.indexed));if(h.length>0){if(e&&e!=="0x")try{const v=Cw(h,e);if(v)if(f)u=[...u,...v];else for(let y=0;y0?u:void 0}}function $ve({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Cw([t],e)||[])[0]}const Ave=new Map,_ve=new Map;function Pve(t){const e=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:o=>i.set(s,o)}),r=e(t,Ave),n=e(t,_ve);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Tve(t,{cacheKey:e,cacheTime:r=1/0}){const n=Pve(e),s=n.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()`blockNumber.${t}`;async function w0(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Tve(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Rve(t.uid),cacheTime:r??e});return BigInt(n)}async function kw(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(s=>{var i;if(typeof s=="string")return s;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return Ui(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return Ui(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function i4(t,{address:e,blockHash:r,fromBlock:n,toBlock:s,event:i,events:o,args:a,strict:l}={}){const c=l??!1,f=o??(i?[i]:void 0);let u=[];f&&(u=[f.flatMap(h=>m0({abi:[h],eventName:h.name,args:a}))],i&&(u=u[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,fromBlock:typeof n=="bigint"?We(n):n,toBlock:typeof s=="bigint"?We(s):s}]}),d.map(h=>{var v;try{const{eventName:y,args:g}=f?b0({abi:f,data:h.data,topics:h.topics,strict:c}):{eventName:void 0,args:void 0};return Ui(h,{args:g,eventName:y})}catch(y){let g,b;if(y instanceof wf||y instanceof Sh){if(c)return;g=y.abiItem.name,b=(v=y.abiItem.inputs)==null?void 0:v.some(p=>!("name"in p&&p.name))}return Ui(h,{args:b?[]:{},eventName:g})}}).filter(Boolean)}async function $w(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function Ive(t,{abi:e,address:r,args:n,batch:s=!0,eventName:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const v=qn(["watchContractEvent",r,n,s,t.uid,i,c]),y=f??!1;return _h(v,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await yz(t,{abi:e,address:r,args:n,eventName:i,strict:y})}catch{}w=!0;return}try{let A;if(p)A=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?A=await i4(t,{address:r,args:n,fromBlock:b+1n,toBlock:x,event:y0({abi:e,name:i})}):A=[],b=x}if(A.length===0)return;s?g.onLogs(A):A.forEach(x=>g.onLogs([x]))}catch(A){p&&A instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,A)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const g=i?m0({abi:e,eventName:i,args:n}):[],{unsubscribe:b}=await t.transport.subscribe({params:["logs",{address:r,topics:g}],onData(p){var E;if(!v)return;const w=p.result;try{const{eventName:k,args:A}=b0({abi:e,data:w.data,topics:w.topics,strict:f}),x=Ui(w,{args:A,eventName:k});a([x])}catch(k){let A,x;if(k instanceof wf||k instanceof Sh){if(f)return;A=k.abiItem.name,x=(E=k.abiItem.inputs)==null?void 0:E.some(B=>!("name"in B&&B.name))}const T=Ui(w,{args:x?[]:{},eventName:A});a([T])}},onError(p){o==null||o(p)}});y=b,v||y()}catch(g){o==null||o(g)}})(),y})()}function Ove(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new Bhe(n,{docsPath:e,...r})}async function xy(t){const e=await t.request({method:"eth_chainId"});return Vn(e)}async function o4(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function a4(t,e){var y,g,b;const{account:r=t.account,chain:n=t.chain,accessList:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/sendTransaction"});const v=ci(r);try{p0(e);let p;if(n!==null&&(p=await xy(t),HU({currentChainId:p,chain:n})),v.type==="local"){const k=await Ew(t,{account:v,accessList:s,chain:n,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h});p||(p=await xy(t));const A=(y=n==null?void 0:n.serializers)==null?void 0:y.transaction,x=await v.signTransaction({...k,chainId:p},{serializer:A});return await o4(t,{serializedTransaction:x})}const w=((b=(g=n==null?void 0:n.formatters)==null?void 0:g.transactionRequest)==null?void 0:b.format)||yw,E=w({...e4(h,{format:w}),accessList:s,data:i,from:v.address,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d});return await t.request({method:"eth_sendTransaction",params:[E]})}catch(p){throw Ove(p,{...e,account:v,chain:e.chain||void 0})}}async function Mve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=fc({abi:e,args:n,functionName:i});return await a4(t,{data:`${a}${s?s.replace("0x",""):""}`,to:r,...o})}async function Dve(t,{chain:e}){const{id:r,name:n,nativeCurrency:s,rpcUrls:i,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:We(r),chainName:n,nativeCurrency:s,rpcUrls:i.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const T3=256;let Sm=T3,km;function Nve(t=11){if(!km||Sm+t>T3*2){km="",Sm=0;for(let e=0;e{const b=g(y);for(const w in h)delete b[w];const p={...y,...b};return Object.assign(p,{extend:v(p)})}}return Object.assign(h,{extend:v(h)})}function kz(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,i)=>{const o=async({count:a=0}={})=>{const l=async({error:c})=>{const f=typeof e=="function"?e({count:a,error:c}):e;f&&await tb(f),o({count:a+1})};try{const c=await t();s(c)}catch(c){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof nv&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function Lve(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>kz(async()=>{try{return await t(n)}catch(s){const i=s;switch(i.code){case ay.code:throw new ay(i);case ly.code:throw new ly(i);case cy.code:throw new cy(i);case fy.code:throw new fy(i);case Ud.code:throw new Ud(i);case xf.code:throw new xf(i);case uy.code:throw new uy(i);case zl.code:throw new zl(i);case dy.code:throw new dy(i);case hy.code:throw new hy(i);case vy.code:throw new vy(i);case yy.code:throw new yy(i);case Sn.code:throw new Sn(i);case my.code:throw new my(i);case py.code:throw new py(i);case gy.code:throw new gy(i);case by.code:throw new by(i);case Vl.code:throw new Vl(i);case 5e3:throw new Sn(i);default:throw s instanceof fe?s:new ive(i)}}},{delay:({count:s,error:i})=>{var o;if(i&&i instanceof nv){const a=(o=i==null?void 0:i.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!$z(s)})}function Aw({key:t,name:e,request:r,retryCount:n=3,retryDelay:s=150,timeout:i,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:s,timeout:i,type:o},request:Lve(r,{retryCount:n,retryDelay:s}),value:a}}function l4(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:s}=e;return({retryCount:i})=>Aw({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??i,retryDelay:s,type:"custom"})}function DR(t,e={}){const{key:r="fallback",name:n="Fallback",rank:s=!1,retryCount:i,retryDelay:o}=e;return({chain:a,pollingInterval:l=4e3,timeout:c})=>{let f=t,u=()=>{};const d=Aw({key:r,name:n,async request({method:h,params:v}){const y=async(g=0)=>{const b=f[g]({chain:a,retryCount:0,timeout:c});try{const p=await b.request({method:h,params:v});return u({method:h,params:v,response:p,transport:b,status:"success"}),p}catch(p){if(u({error:p,method:h,params:v,transport:b,status:"error"}),$z(p)||g===f.length-1)throw p;return y(g+1)}};return y()},retryCount:i,retryDelay:o,type:"fallback"},{onResponse:h=>u=h,transports:f.map(h=>h({chain:a,retryCount:0}))});if(s){const h=typeof s=="object"?s:{};jve({chain:a,interval:h.interval??l,onTransports:v=>f=v,sampleCount:h.sampleCount,timeout:h.timeout,transports:f,weights:h.weights})}return d}}function jve({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:s=1e3,transports:i,weights:o={}}){const{stability:a=.7,latency:l=.3}=o,c=[],f=async()=>{const u=await Promise.all(i.map(async v=>{const y=v({chain:t,retryCount:0,timeout:s}),g=Date.now();let b,p;try{await y.request({method:"net_listening"}),p=1}catch{p=0}finally{b=Date.now()}return{latency:b-g,success:p}}));c.push(u),c.length>n&&c.shift();const d=Math.max(...c.map(v=>Math.max(...v.map(({latency:y})=>y)))),h=i.map((v,y)=>{const g=c.map(k=>k[y].latency),p=1-g.reduce((k,A)=>k+A,0)/g.length/d,w=c.map(k=>k[y].success),E=w.reduce((k,A)=>k+A,0)/w.length;return E===0?[0,y]:[l*p+a*E,y]}).sort((v,y)=>y[0]-v[0]);r(h.map(([,v])=>i[v])),await tb(e),f()};f()}class Az extends fe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Eu=null;typeof WebSocket<"u"?Eu=WebSocket:typeof MozWebSocket<"u"?Eu=MozWebSocket:typeof global<"u"?Eu=global.WebSocket||global.MozWebSocket:typeof window<"u"?Eu=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Eu=self.WebSocket||self.MozWebSocket);const NR=Eu;function _z(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((s,i)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():i(e)},r)),s(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&i(e),i(a)}finally{clearTimeout(o)}})()})}let R3=0;async function Fve(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:s,method:i,signal:o}=r;try{const l=await _z(async({signal:f})=>await fetch(t,{...r,body:Array.isArray(e)?qn(e.map(d=>({jsonrpc:"2.0",id:d.id??R3++,...d}))):qn({jsonrpc:"2.0",id:e.id??R3++,...e}),headers:{...s,"Content-Type":"application/json"},method:i||"POST",signal:o||(n>0?f:void 0)}),{errorInstance:new A3({body:e,url:t}),timeout:n,signal:!0});let c;if((a=l.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?c=await l.json():c=await l.text(),!l.ok)throw new nv({body:e,details:qn(c.error)||l.statusText,headers:l.headers,status:l.status,url:t});return c}catch(l){throw l instanceof nv||l instanceof A3?l:new nv({body:e,details:l.message,url:t})}}const fE=new Map;async function uE(t){let e=fE.get(t);if(e)return e;const{schedule:r}=s4({id:t,fn:async()=>{const i=new NR(t),o=new Map,a=new Map,l=({data:f})=>{const u=JSON.parse(f),d=u.method==="eth_subscription",h=d?u.params.subscription:u.id,v=d?a:o,y=v.get(h);y&&y({data:f}),d||v.delete(h)},c=()=>{fE.delete(t),i.removeEventListener("close",c),i.removeEventListener("message",l)};return i.addEventListener("close",c),i.addEventListener("message",l),i.readyState===NR.CONNECTING&&await new Promise((f,u)=>{i&&(i.onopen=f,i.onerror=u)}),e=Object.assign(i,{requests:o,subscriptions:a}),fE.set(t,e),[e]}}),[n,[s]]=await r();return s}function Bve(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new nve({body:e,url:t.url,details:"Socket is closed."});const n=R3++,s=({data:i})=>{var a;const o=JSON.parse(i);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,s),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,s),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Uve(t,{body:e,timeout:r=1e4}){return _z(()=>new Promise(n=>dd.webSocket(t,{body:e,onResponse:n})),{errorInstance:new A3({body:e,url:t.url}),timeout:r})}const dd={http:Fve,webSocket:Bve,webSocketAsync:Uve};function zve(t,e={}){const{batch:r,fetchOptions:n,key:s="http",name:i="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:l,timeout:c})=>{const{batchSize:f=1e3,wait:u=0}=typeof r=="object"?r:{},d=e.retryCount??l,h=c??e.timeout??1e4,v=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!v)throw new Az;return Aw({key:s,name:i,async request({method:y,params:g}){const b={method:y,params:g},{schedule:p}=s4({id:`${t}`,wait:u,shouldSplitBatch(A){return A.length>f},fn:A=>dd.http(v,{body:A,fetchOptions:n,timeout:h})}),w=async A=>r?p(A):[await dd.http(v,{body:A,fetchOptions:n,timeout:h})],[{error:E,result:k}]=await w(b);if(E)throw new X$({body:b,error:E,url:v});return k},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function c4(t,e){var n,s,i;if(!(t instanceof fe))return!1;const r=t.walk(o=>o instanceof $3);return r instanceof $3?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ResolverWildcardNotSupported"||(i=r.reason)!=null&&i.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===mz[50]):!1}function Pz(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Ro(e)?e:null}function Ap(t){let e=new Uint8Array(32).fill(0);if(!t)return iy(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const s=Pz(r[n]),i=s?bf(s):ns(oa(r[n]),"bytes");e=ns(ya([e,i]),"bytes")}return iy(e)}function Vve(t){return`[${t.slice(2)}]`}function qve(t){const e=new Uint8Array(32).fill(0);return t?Pz(t)||ns(oa(t)):iy(e)}function _w(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(oa(e).byteLength+2);let n=0;const s=e.split(".");for(let i=0;i255&&(o=oa(Vve(qve(s[i])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Wve(t,{blockNumber:e,blockTag:r,coinType:n,name:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=fc({abi:IR,functionName:"addr",...n!=null?{args:[Ap(s),BigInt(n)]}:{args:[Ap(s)]}}),l=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(s)),a],blockNumber:e,blockTag:r});if(l[0]==="0x")return null;const c=Ah({abi:IR,args:n!=null?[Ap(s),BigInt(n)]:void 0,functionName:"addr",data:l[0]});return c==="0x"||fd(c)==="0x00"?null:c}catch(a){if(c4(a,"resolve"))return null;throw a}}class Hve extends fe{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class d1 extends fe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class f4 extends fe{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class Gve extends fe{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Kve=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Qve=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Yve=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Jve=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Xve(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function LR(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function Tz({uri:t,gatewayUrls:e}){const r=Yve.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=LR(e==null?void 0:e.ipfs,"https://ipfs.io"),s=LR(e==null?void 0:e.arweave,"https://arweave.net"),i=t.match(Kve),{protocol:o,subpath:a,target:l,subtarget:c=""}=(i==null?void 0:i.groups)||{},f=o==="ipns:/"||a==="ipns/",u=o==="ipfs:/"||a==="ipfs/"||Qve.test(t);if(t.startsWith("http")&&!f&&!u){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((f||u)&&l)return{uri:`${n}/${f?"ipns":"ipfs"}/${l}${c}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&l)return{uri:`${s}/${l}${c||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(Jve,"");if(d.startsWith("s.json());return await u4({gatewayUrls:t,uri:Rz(r)})}catch{throw new f4({uri:e})}}async function u4({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=Tz({uri:e,gatewayUrls:t});if(n||await Xve(r))return r;throw new f4({uri:e})}function eye(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[i,o]=r.split(":"),[a,l]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new d1({reason:"Only EIP-155 supported"});if(!o)throw new d1({reason:"Chain ID not found"});if(!l)throw new d1({reason:"Contract address not found"});if(!s)throw new d1({reason:"Token ID not found"});if(!a)throw new d1({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:l,tokenID:s}}async function tye(t,{nft:e}){if(e.namespace==="erc721")return Wl(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return Wl(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new Gve({namespace:e.namespace})}async function rye(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?nye(t,{gatewayUrls:e,record:r}):u4({uri:r,gatewayUrls:e})}async function nye(t,{gatewayUrls:e,record:r}){const n=eye(r),s=await tye(t,{nft:n}),{uri:i,isOnChain:o,isEncoded:a}=Tz({uri:s,gatewayUrls:e});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const c=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(c);return u4({uri:Rz(f),gatewayUrls:e})}let l=n.tokenID;return n.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),Zve({gatewayUrls:e,uri:i.replace(/(?:0x)?{id}/,l)})}async function Iz(t,{blockNumber:e,blockTag:r,name:n,key:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(n)),fc({abi:RR,functionName:"text",args:[Ap(n),s]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const l=Ah({abi:RR,functionName:"text",data:a[0]});return l===""?null:l}catch(a){if(c4(a,"resolve"))return null;throw a}}async function sye(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:s,universalResolverAddress:i}){const o=await Iz(t,{blockNumber:e,blockTag:r,key:"avatar",name:s,universalResolverAddress:i});if(!o)return null;try{return await rye(t,{record:o,gatewayUrls:n})}catch{return null}}async function iye(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await Wl(t,{address:i,abi:pve,functionName:"reverse",args:[Pa(_w(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(c4(a,"reverse"))return null;throw a}}async function oye(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await Wl(t,{address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Pa(_w(n))],blockNumber:e,blockTag:r});return o}async function aye(t){const e=xw(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function Oz(t,{address:e,args:r,event:n,events:s,fromBlock:i,strict:o,toBlock:a}={}){const l=s??(n?[n]:void 0),c=xw(t,{method:"eth_newFilter"});let f=[];l&&(f=[l.flatMap(d=>m0({abi:[d],eventName:d.name,args:r}))],n&&(f=f[0]));const u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,...f.length?{topics:f}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:i,id:u,request:c(u),strict:o,toBlock:a,type:"event"}}async function Mz(t){const e=xw(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function lye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r?We(r):void 0,i=await t.request({method:"eth_getBalance",params:[e,s||n]});return BigInt(i)}async function cye(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?We(r):void 0;let i;return e?i=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):i=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]}),Vn(i)}async function fye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?We(r):void 0,i=await t.request({method:"eth_getCode",params:[e,s||n]});if(i!=="0x")return i}function uye(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function dye(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const i=r?We(r):void 0,o=await t.request({method:"eth_feeHistory",params:[We(e),i||n,s]});return uye(o)}async function hye(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>{var i;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return Ui(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return Ui(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function vye(t,{address:e,blockNumber:r,blockTag:n="latest",slot:s}){const i=r!==void 0?We(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,s,i||n]})}async function d4(t,{blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){var f,u,d;const o=n||"latest",a=r!==void 0?We(r):void 0;let l=null;if(s?l=await t.request({method:"eth_getTransactionByHash",params:[s]}):e?l=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,We(i)]}):(a||o)&&(l=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,We(i)]})),!l)throw new tz({blockHash:e,blockNumber:r,blockTag:o,hash:s,index:i});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.transaction)==null?void 0:d.format)||XU)(l)}async function yye(t,{hash:e,transactionReceipt:r}){const[n,s]=await Promise.all([w0(t),e?d4(t,{hash:e}):void 0]),i=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return i?n-i+1n:0n}async function I3(t,{hash:e}){var s,i,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new rz({hash:e});return(((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:o.format)||Ihe)(r)}async function mye(t,e){var y;const{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:i,contracts:o,multicallAddress:a}=e,l=n??(typeof((y=t.batch)==null?void 0:y.multicall)=="object"&&t.batch.multicall.batchSize||1024);let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const f=[[]];let u=0,d=0;for(let g=0;g0&&d>l&&f[u].length>0&&(u++,d=(k.length-2)/2,f[u]=[]),f[u]=[...f[u],{allowFailure:!0,callData:k,target:p}]}catch(k){const A=wy(k,{abi:b,address:p,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!r)throw A;f[u]=[...f[u],{allowFailure:!0,callData:"0x",target:p}]}}const h=await Promise.allSettled(f.map(g=>Wl(t,{abi:P3,address:c,args:[g],blockNumber:s,blockTag:i,functionName:"aggregate3"}))),v=[];for(let g=0;g"u"?{}:t,i={EIP712Domain:Bz({domain:s}),...n};Fz({domain:s,message:e,primaryType:r,types:i});const o=["0x1901"];return s&&o.push(wye({domain:s,types:i})),r!=="EIP712Domain"&&o.push(Dz({data:e,primaryType:r,types:i})),ns(ya(o))}function wye({domain:t,types:e}){return Dz({data:t,primaryType:"EIP712Domain",types:e})}function Dz({data:t,primaryType:e,types:r}){const n=Nz({data:t,primaryType:e,types:r});return ns(n)}function Nz({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],s=[xye({primaryType:e,types:r})];for(const i of r[e]){const[o,a]=jz({types:r,name:i.name,type:i.type,value:t[i.name]});n.push(o),s.push(a)}return v0(n,s)}function xye({primaryType:t,types:e}){const r=Pa(Cye({primaryType:t,types:e}));return ns(r)}function Cye({primaryType:t,types:e}){let r="";const n=Lz({primaryType:t,types:e});n.delete(t);const s=[t,...Array.from(n).sort()];for(const i of s)r+=`${i}(${e[i].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function Lz({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||e[s]===void 0)return r;r.add(s);for(const i of e[s])Lz({primaryType:i.type,types:e},r);return r}function jz({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},ns(Nz({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ns(n)];if(r==="string")return[{type:"bytes32"},ns(Pa(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),i=n.map(o=>jz({name:e,type:s,types:t,value:o}));return[{type:"bytes32"},ns(v0(i.map(([o])=>o),i.map(([,o])=>o)))]}return[{type:r},n]}function Fz({domain:t,message:e,primaryType:r,types:n}){const s=n,i=(o,a)=>{for(const l of o){const{name:c,type:f}=l,u=f,d=a[c],h=u.match(gye);if(h&&(typeof d=="number"||typeof d=="bigint")){const[g,b,p]=h;We(d,{signed:b==="int",size:parseInt(p)/8})}if(u==="address"&&typeof d=="string"&&!Bd(d))throw new oy({address:d});const v=u.match(pye);if(v){const[g,b]=v;if(b&&Gr(d)!==parseInt(b))throw new r1e({expectedSize:parseInt(b),givenSize:Gr(d)})}const y=s[u];y&&i(y,d)}};if(s.EIP712Domain&&t&&i(s.EIP712Domain,t),r!=="EIP712Domain"){const o=s[r];i(o,e)}}function Bz({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const dE="/docs/contract/encodeDeployData";function Uz({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new Qhe({docsPath:dE});if(!("inputs"in n))throw new CR({docsPath:dE});if(!n.inputs||n.inputs.length===0)throw new CR({docsPath:dE});const s=v0(n.inputs,e);return B$([r,s])}function Eye(t,e){const r=(()=>typeof t=="string"?oa(t):t.raw instanceof Uint8Array?t.raw:bf(t.raw))(),n=oa(`Ethereum Signed Message: +${r.length}`);return ns(ya([n,r]),e)}const Sye="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function kye(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const u=qn(["watchBlockNumber",t.uid,e,r,o]);return _h(u,{onBlockNumber:n,onError:s},d=>g0(async()=>{var h;try{const v=await w0(t,{cacheTime:0});if(l){if(v===l)return;if(v-l>1&&r)for(let y=l+1n;yl)&&(d.onBlockNumber(v,l),l=v)}catch(v){(h=d.onError)==null||h.call(d,v)}},{emitOnBegin:e,interval:o}))})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(v){var g;if(!u)return;const y=vw((g=v.result)==null?void 0:g.number);n(y,l),l=y},onError(v){s==null||s(v)}});d=h,u||d()}catch(h){s==null||s(h)}})(),d})()}async function Pye(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:s=t.pollingInterval,timeout:i}){const o=qn(["waitForTransactionReceipt",t.uid,r]);let a,l,c,f=!1;return new Promise((u,d)=>{i&&setTimeout(()=>d(new Uhe({hash:r})),i);const h=_h(o,{onReplaced:n,resolve:u,reject:d},v=>{const y=Vz(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:s,async onBlockNumber(g){if(f)return;let b=g;const p=w=>{y(),w(),h()};try{if(c){if(b-c.blockNumber+1nv.resolve(c));return}if(a||(f=!0,await kz(async()=>{a=await d4(t,{hash:r}),a.blockNumber&&(b=a.blockNumber)},{delay:({count:w})=>~~(1<0&&b-c.blockNumber+1nv.resolve(c))}catch(w){if(a&&(w instanceof tz||w instanceof rz))try{l=a;const k=(await ql(t,{blockNumber:b,includeTransactions:!0})).transactions.find(({from:x,nonce:T})=>x===l.from&&T===l.nonce);if(!k||(c=await I3(t,{hash:k.hash}),b-c.blockNumber+1n{var x;(x=v.onReplaced)==null||x.call(v,{reason:A,replacedTransaction:l,transaction:k,transactionReceipt:c}),v.resolve(c)})}catch(E){p(()=>v.reject(E))}else p(()=>v.reject(w))}}})})})}function Tye(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:i,includeTransactions:o,poll:a,pollingInterval:l=t.pollingInterval}){const c=typeof a<"u"?a:t.transport.type!=="webSocket",f=o??!1;let u;return c?(()=>{const v=qn(["watchBlocks",t.uid,r,n,f,l]);return _h(v,{onBlock:s,onError:i},y=>g0(async()=>{var g;try{const b=await ql(t,{blockTag:e,includeTransactions:f});if(b.number&&(u!=null&&u.number)){if(b.number===u.number)return;if(b.number-u.number>1&&r)for(let p=(u==null?void 0:u.number)+1n;pu.number)&&(y.onBlock(b,u),u=b)}catch(b){(g=y.onError)==null||g.call(y,b)}},{emitOnBegin:n,interval:l}))})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const{unsubscribe:g}=await t.transport.subscribe({params:["newHeads"],onData(b){var E,k,A;if(!v)return;const w=(((A=(k=(E=t.chain)==null?void 0:E.formatters)==null?void 0:k.block)==null?void 0:A.format)||ZU)(b.result);s(w,u),u=w},onError(b){i==null||i(b)}});y=g,v||y()}catch(g){i==null||i(g)}})(),y})()}function Rye(t,{address:e,args:r,batch:n=!0,event:s,events:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){const u=typeof l<"u"?l:t.transport.type!=="webSocket",d=f??!1;return u?(()=>{const y=qn(["watchEvent",e,r,n,t.uid,s,c]);return _h(y,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await Oz(t,{address:e,args:r,event:s,events:i,strict:d})}catch{}w=!0;return}try{let A;if(p)A=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?A=await i4(t,{address:e,args:r,event:s,events:i,fromBlock:b+1n,toBlock:x}):A=[],b=x}if(A.length===0)return;n?g.onLogs(A):A.forEach(x=>g.onLogs([x]))}catch(A){p&&A instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,A)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=i??(s?[s]:void 0);let p=[];b&&(p=[b.flatMap(E=>m0({abi:[E],eventName:E.name,args:r}))],s&&(p=p[0]));const{unsubscribe:w}=await t.transport.subscribe({params:["logs",{address:e,topics:p}],onData(E){var A;if(!y)return;const k=E.result;try{const{eventName:x,args:T}=b0({abi:b,data:k.data,topics:k.topics,strict:d}),B=Ui(k,{args:T,eventName:x});a([B])}catch(x){let T,B;if(x instanceof wf||x instanceof Sh){if(f)return;T=x.abiItem.name,B=(A=x.abiItem.inputs)==null?void 0:A.some(U=>!("name"in U&&U.name))}const L=Ui(k,{args:B?[]:{},eventName:T});a([L])}},onError(E){o==null||o(E)}});g=w,y||g()}catch(b){o==null||o(b)}})(),g})()}function Iye(t,{batch:e=!0,onError:r,onTransactions:n,poll:s,pollingInterval:i=t.pollingInterval}){return(typeof s<"u"?s:t.transport.type!=="webSocket")?(()=>{const c=qn(["watchPendingTransactions",t.uid,e,i]);return _h(c,{onTransactions:n,onError:r},f=>{let u;const d=g0(async()=>{var h;try{if(!u)try{u=await Mz(t);return}catch(y){throw d(),y}const v=await kw(t,{filter:u});if(v.length===0)return;e?f.onTransactions(v):v.forEach(y=>f.onTransactions([y]))}catch(v){(h=f.onError)==null||h.call(f,v)}},{emitOnBegin:!0,interval:i});return async()=>{u&&await $w(t,{filter:u}),d()}})})():(()=>{let c=!0,f=()=>c=!1;return(async()=>{try{const{unsubscribe:u}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!c)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});f=u,c||f()}catch(u){r==null||r(u)}})(),f})()}function Oye(t){return{call:e=>Sw(t,e),createBlockFilter:()=>aye(t),createContractEventFilter:e=>yz(t,e),createEventFilter:e=>Oz(t,e),createPendingTransactionFilter:()=>Mz(t),estimateContractGas:e=>vve(t,e),estimateGas:e=>n4(t,e),getBalance:e=>lye(t,e),getBlock:e=>ql(t,e),getBlockNumber:e=>w0(t,e),getBlockTransactionCount:e=>cye(t,e),getBytecode:e=>fye(t,e),getChainId:()=>xy(t),getEnsAddress:e=>Wve(t,e),getEnsAvatar:e=>sye(t,e),getEnsName:e=>iye(t,e),getEnsResolver:e=>oye(t,e),getEnsText:e=>Iz(t,e),getFeeHistory:e=>dye(t,e),estimateFeesPerGas:e=>hve(t,e),getFilterChanges:e=>kw(t,e),getFilterLogs:e=>hye(t,e),getGasPrice:()=>r4(t),getLogs:e=>i4(t,e),estimateMaxPriorityFeePerGas:e=>dve(t,e),getStorageAt:e=>vye(t,e),getTransaction:e=>d4(t,e),getTransactionConfirmations:e=>yye(t,e),getTransactionCount:e=>wz(t,e),getTransactionReceipt:e=>I3(t,e),multicall:e=>mye(t,e),prepareTransactionRequest:e=>Ew(t,e),readContract:e=>Wl(t,e),sendRawTransaction:e=>o4(t,e),simulateContract:e=>Sve(t,e),verifyMessage:e=>Aye(t,e),verifyTypedData:e=>_ye(t,e),uninstallFilter:e=>$w(t,e),waitForTransactionReceipt:e=>Pye(t,e),watchBlocks:e=>Tye(t,e),watchBlockNumber:e=>Vz(t,e),watchContractEvent:e=>Ive(t,e),watchEvent:e=>Rye(t,e),watchPendingTransactions:e=>Iye(t,e)}}function jR(t){const{key:e="public",name:r="Public Client"}=t;return Sz({...t,key:e,name:r,type:"publicClient"}).extend(Oye)}function Mye(t,{abi:e,args:r,bytecode:n,...s}){const i=Uz({abi:e,args:r,bytecode:n});return a4(t,{...s,data:i})}async function Dye(t){return(await t.request({method:"eth_accounts"})).map(r=>Y$(r))}async function Nye(t){return await t.request({method:"wallet_getPermissions"})}async function Lye(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Tl(r))}async function jye(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function Fye(t,{account:e=t.account,message:r}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signMessage"});const n=ci(e);if(n.type==="local")return n.signMessage({message:r});const s=(()=>typeof r=="string"?j$(r):r.raw instanceof Uint8Array?Pa(r.raw):r.raw)();return t.request({method:"personal_sign",params:[s,n.address]})}async function Bye(t,e){var c,f,u,d;const{account:r=t.account,chain:n=t.chain,...s}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/signTransaction"});const i=ci(r);p0({account:i,...e});const o=await xy(t);n!==null&&HU({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((c=t.chain)==null?void 0:c.formatters),l=((f=a==null?void 0:a.transactionRequest)==null?void 0:f.format)||yw;return i.type==="local"?i.signTransaction({chainId:o,...s},{serializer:(d=(u=t.chain)==null?void 0:u.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...l(s),chainId:We(o),from:i.address}]})}async function Uye(t,{account:e=t.account,domain:r,message:n,primaryType:s,types:i}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signTypedData"});const o=ci(e),a={EIP712Domain:Bz({domain:r}),...i};if(Fz({domain:r,message:n,primaryType:s,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:s,types:a,message:n});const l=qn({domain:r??{},primaryType:s,types:a,message:n},(c,f)=>Ro(f)?f.toLowerCase():f);return t.request({method:"eth_signTypedData_v4",params:[o.address,l]})}async function zye(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:We(e)}]})}async function Vye(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function qye(t){return{addChain:e=>Dve(t,e),deployContract:e=>Mye(t,e),getAddresses:()=>Dye(t),getChainId:()=>xy(t),getPermissions:()=>Nye(t),prepareTransactionRequest:e=>Ew(t,e),requestAddresses:()=>Lye(t),requestPermissions:e=>jye(t,e),sendRawTransaction:e=>o4(t,e),sendTransaction:e=>a4(t,e),signMessage:e=>Fye(t,e),signTransaction:e=>Bye(t,e),signTypedData:e=>Uye(t,e),switchChain:e=>zye(t,e),watchAsset:e=>Vye(t,e),writeContract:e=>Mve(t,e)}}function h4(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return Sz({...t,key:e,name:r,transport:i=>n({...i,retryCount:0}),type:"walletClient"}).extend(qye)}function Wye(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:s}=e;return({chain:i,retryCount:o,timeout:a})=>{var u;const l=e.retryCount??o,c=a??e.timeout??1e4,f=t||((u=i==null?void 0:i.rpcUrls.default.webSocket)==null?void 0:u[0]);if(!f)throw new Az;return Aw({key:r,name:n,async request({method:d,params:h}){const v={method:d,params:h},y=await uE(f),{error:g,result:b}=await dd.webSocketAsync(y,{body:v,timeout:c});if(g)throw new X$({body:v,error:g,url:f});return b},retryCount:l,retryDelay:s,timeout:c,type:"webSocket"},{getSocket(){return uE(f)},async subscribe({params:d,onData:h,onError:v}){const y=await uE(f),{result:g}=await new Promise((b,p)=>dd.webSocket(y,{body:{method:"eth_subscribe",params:d},onResponse(w){if(w.error){p(w.error),v==null||v(w.error);return}if(typeof w.id=="number"){b(w);return}w.method==="eth_subscription"&&h(w.params)}}));return{subscriptionId:g,async unsubscribe(){return new Promise(b=>dd.webSocket(y,{body:{method:"eth_unsubscribe",params:[g]},onResponse:b}))}}}})}}function Hye(t){var r;if(!t)return"Injected";const e=n=>{if(n.isApexWallet)return"Apex Wallet";if(n.isAvalanche)return"Core Wallet";if(n.isBackpack)return"Backpack";if(n.isBifrost)return"Bifrost Wallet";if(n.isBitKeep)return"BitKeep";if(n.isBitski)return"Bitski";if(n.isBlockWallet)return"BlockWallet";if(n.isBraveWallet)return"Brave Wallet";if(n.isCoinbaseWallet)return"Coinbase Wallet";if(n.isDawn)return"Dawn Wallet";if(n.isDefiant)return"Defiant";if(n.isEnkrypt)return"Enkrypt";if(n.isExodus)return"Exodus";if(n.isFrame)return"Frame";if(n.isFrontier)return"Frontier Wallet";if(n.isGamestop)return"GameStop Wallet";if(n.isHaqqWallet)return"HAQQ Wallet";if(n.isHyperPay)return"HyperPay Wallet";if(n.isImToken)return"ImToken";if(n.isHaloWallet)return"Halo Wallet";if(n.isKuCoinWallet)return"KuCoin Wallet";if(n.isMathWallet)return"MathWallet";if(n.isNovaWallet)return"Nova Wallet";if(n.isOkxWallet||n.isOKExWallet)return"OKX Wallet";if(n.isOneInchIOSWallet||n.isOneInchAndroidWallet)return"1inch Wallet";if(n.isOpera)return"Opera";if(n.isPhantom)return"Phantom";if(n.isPortal)return"Ripio Portal";if(n.isRabby)return"Rabby Wallet";if(n.isRainbow)return"Rainbow";if(n.isStatus)return"Status";if(n.isTalisman)return"Talisman";if(n.isTally)return"Taho";if(n.isTokenPocket)return"TokenPocket";if(n.isTokenary)return"Tokenary";if(n.isTrust||n.isTrustWallet)return"Trust Wallet";if(n.isTTWallet)return"TTWallet";if(n.isXDEFI)return"XDEFI Wallet";if(n.isZerion)return"Zerion";if(n.isMetaMask)return"MetaMask"};if((r=t.providers)!=null&&r.length){const n=new Set;let s=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${s}`,s+=1),n.add(a)}const i=[...n];return i.length?i:i[0]??"Injected"}return e(t)??"Injected"}var _p,qz=class extends V${constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers[0]:s},...e};super({chains:t,options:r}),ar(this,"id","injected"),ar(this,"name"),ar(this,"ready"),ps(this,_p,void 0),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ar(this,"onAccountsChanged",s=>{s.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(s[0])})}),ar(this,"onChainChanged",s=>{const i=xR(s),o=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:o}})}),ar(this,"onDisconnect",async s=>{var i;s.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((i=this.storage)==null||i.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const s=Hye(n);r.name?this.name=r.name(s):typeof s=="string"?this.name=s:this.name=s[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new sl;r.on&&(r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await r.request({method:"eth_requestAccounts"}),s=Tl(n[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return t&&i!==t&&(i=(await this.switchChain(t)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:s,chain:{id:i,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new Sn(r):r.code===-32002?new zl(r):r}}async disconnect(){var e;const t=await this.getProvider();t!=null&&t.removeListener&&(t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((e=this.storage)==null||e.removeItem(this.shimDisconnectKey)))}async getAccount(){const t=await this.getProvider();if(!t)throw new sl;const e=await t.request({method:"eth_accounts"});return Tl(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new sl;return t.request({method:"eth_chainId"}).then(xR)}async getProvider(){const t=this.options.getProvider();return t&&pw(this,_p,t),er(this,_p)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(e)})}async isAuthorized(){var t;try{if(this.options.shimDisconnect&&!((t=this.storage)!=null&&t.getItem(this.shimDisconnectKey)))return!1;if(!await this.getProvider())throw new sl;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,s,i;const e=await this.getProvider();if(!e)throw new sl;const r=We(t);try{return await Promise.all([e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise(o=>this.on("change",({chain:a})=>{(a==null?void 0:a.id)===t&&o()}))]),this.chains.find(o=>o.id===t)??{id:t,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(o){const a=this.chains.find(l=>l.id===t);if(!a)throw new Ghe({chainId:t,connectorId:this.id});if(o.code===4902||((s=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:s.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((i=a.rpcUrls.public)==null?void 0:i.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new Sn(new Error("User rejected switch after adding network."));return a}catch(l){throw new Sn(l)}throw this.isUserRejectedRequestError(o)?new Sn(o):new Vl(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const s=await this.getProvider();if(!s)throw new sl;return s.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};_p=new WeakMap;var v4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},hE=(t,e,r)=>(v4(t,e,"read from private field"),r?r.call(t):e.get(t)),vE=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$m=(t,e,r,n)=>(v4(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Gye=(t,e,r)=>(v4(t,e,"access private method"),r);const Kye=t=>(e,r,n)=>{const s=n.subscribe;return n.subscribe=(o,a,l)=>{let c=o;if(a){const f=(l==null?void 0:l.equalityFn)||Object.is;let u=o(n.getState());c=d=>{const h=o(d);if(!f(u,h)){const v=u;a(u=h,v)}},l!=null&&l.fireImmediately&&a(u,u)}return s(c)},t(e,r,n)},Qye=Kye;function Yye(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,e==null?void 0:e.reviver),a=(i=r.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,e==null?void 0:e.replacer)),removeItem:s=>r.removeItem(s)}}const Cy=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Cy(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Cy(n)(r)}}}},Jye=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...g)},n,s);const f=Cy(i.serialize),u=()=>{const g=i.partialize({...n()});let b;const p=f({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{b=w});if(b)throw b;return p},d=s.setState;s.setState=(g,b)=>{d(g,b),u()};const h=t((...g)=>{r(...g),u()},n,s);let v;const y=()=>{var g;if(!c)return;o=!1,a.forEach(p=>p(n()));const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,n()))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)return i.deserialize(p)}).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return v=i.merge(p,(w=n())!=null?w:h),r(v,!0),u()}).then(()=>{b==null||b(v,void 0),o=!0,l.forEach(p=>p(v))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},y(),v||h},Xye=(t,e)=>(r,n,s)=>{let i={storage:Yye(()=>localStorage),partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...e},o=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const f=()=>{const y=i.partialize({...n()});return c.setItem(i.name,{state:y,version:i.version})},u=s.setState;s.setState=(y,g)=>{u(y,g),f()};const d=t((...y)=>{r(...y),f()},n,s);let h;const v=()=>{var y,g;if(!c)return;o=!1,a.forEach(p=>{var w;return p((w=n())!=null?w:d)});const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(y=n())!=null?y:d))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return h=i.merge(p,(w=n())!=null?w:d),r(h,!0),f()}).then(()=>{b==null||b(h,void 0),h=n(),o=!0,l.forEach(p=>p(h))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},i.skipHydration||v(),h||d},Zye=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?Jye(t,e):Xye(t,e),e0e=Zye,FR=t=>{let e;const r=new Set,n=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const u=e;e=c??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,u))}},s=()=>e,a={setState:n,getState:s,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{r.clear()}};return e=t(n,s,a),a},t0e=t=>t?FR(t):FR;function y4(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,s]of t)if(!Object.is(s,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let n=0;ny===u.id)||(l=[...l,v.chain]),c[u.id]=[...c[u.id]||[],...v.rpcUrls.http],v.rpcUrls.webSocket&&(f[u.id]=[...f[u.id]||[],...v.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${u.name}". `,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join(` -`))}return{chains:l,publicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=c[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const v=j9({batch:r,chain:d,transport:D9(h.map(y=>qve(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})},webSocketPublicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=f[d.id];if(!h||!h[0])return;const v=j9({batch:r,chain:d,transport:D9(h.map(y=>Gye(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})}}}var i0e=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},o0e=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function O3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!O3(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const s=Object.keys(t);if(r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(i&&!O3(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}var M3=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>M3(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[s,i])=>({...n,[s]:M3(i,{find:e,replace:r})}),{}):t;function a0e(t){const e=JSON.parse(t);return M3(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function B9(t,e){return t.slice(0,e).join(".")||"."}function U9(t,e){const{length:r}=t;for(let n=0;n{const o=typeof i=="bigint"?`#bigint.${i.toString()}`:i;return(e==null?void 0:e(s,o))||o},n),r??void 0)}var Wz={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function Hz({deserialize:t=a0e,key:e="wagmi",serialize:r=c0e,storage:n}){return{...n,getItem:(s,i=null)=>{const o=n.getItem(`${e}.${s}`);try{return o?t(o):i}catch(a){return console.warn(a),i}},setItem:(s,i)=>{if(i===null)n.removeItem(`${e}.${s}`);else try{n.setItem(`${e}.${s}`,r(i))}catch(o){console.error(o)}},removeItem:s=>n.removeItem(`${e}.${s}`)}}var z9="store",Su,D1,D3,Gz,f0e=class{constructor({autoConnect:e=!1,connectors:r=[new qz],publicClient:n,storage:s=Hz({storage:typeof window<"u"?window.localStorage:Wz}),logger:i={warn:console.warn},webSocketPublicClient:o}){var f,u;vE(this,D3),this.publicClients=new Map,this.webSocketPublicClients=new Map,vE(this,Su,void 0),vE(this,D1,void 0),this.args={autoConnect:e,connectors:r,logger:i,publicClient:n,storage:s,webSocketPublicClient:o};let a="disconnected",l;if(e)try{const d=s.getItem(z9),h=(f=d==null?void 0:d.state)==null?void 0:f.data;a=h!=null&&h.account?"reconnecting":"connecting",l=(u=h==null?void 0:h.chain)==null?void 0:u.id}catch{}const c=typeof r=="function"?r():r;c.forEach(d=>d.setStorage(s)),this.store=n0e(Jye(r0e(()=>({connectors:c,publicClient:this.getPublicClient({chainId:l}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})}),{name:z9,storage:s,partialize:d=>{var h,v;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(v=d==null?void 0:d.data)==null?void 0:v.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=s,$m(this,D1,s==null?void 0:s.getItem("wallet")),Qye(this,D3,Gz).call(this),e&&typeof window<"u"&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){var e,r;return(r=(e=this.data)==null?void 0:e.chain)==null?void 0:r.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const r=typeof e=="function"?e(this.store.getState()):e;this.store.setState(r,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){var e,r;this.connector&&await((r=(e=this.connector).disconnect)==null?void 0:r.call(e)),$m(this,Su,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(hE(this,Su))return;$m(this,Su,!0),this.setState(n=>{var s;return{...n,status:(s=n.data)!=null&&s.account?"reconnecting":"connecting"}});const e=hE(this,D1)?[...this.connectors].sort(n=>n.id===hE(this,D1)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const i=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:i,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),$m(this,Su,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const r=typeof e=="function"?e():e;r.forEach(n=>n.setStorage(this.args.storage)),this.setState(n=>({...n,connectors:r}))}getPublicClient({chainId:e}={}){let r=this.publicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.publicClients.get(e??-1),r))return r;const{publicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,this.publicClients.set(e??-1,r),r}setPublicClient(e){var n,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(i=>({...i,publicClient:this.getPublicClient({chainId:r})}))}getWebSocketPublicClient({chainId:e}={}){let r=this.webSocketPublicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.webSocketPublicClients.get(e??-1),r))return r;const{webSocketPublicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,r&&this.webSocketPublicClients.set(e??-1,r),r}setWebSocketPublicClient(e){var n,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(i=>({...i,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};Su=new WeakMap;D1=new WeakMap;D3=new WeakSet;Gz=function(){const t=a=>{this.setState(l=>({...l,data:{...l.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(l=>({...l,error:a}))};this.store.subscribe(({connector:a})=>a,(a,l)=>{var c,f,u,d,h,v;(c=l==null?void 0:l.off)==null||c.call(l,"change",t),(f=l==null?void 0:l.off)==null||f.call(l,"disconnect",e),(u=l==null?void 0:l.off)==null||u.call(l,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(v=a.on)==null||v.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:s}=this.args;(typeof n=="function"||typeof s=="function")&&this.store.subscribe(({data:a})=>{var l;return(l=a==null?void 0:a.chain)==null?void 0:l.id},a=>{this.setState(l=>({...l,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var N3;function u0e(t){const e=new f0e(t);return N3=e,e}function si(){if(!N3)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return N3}async function d0e({chainId:t,connector:e}){const r=si(),n=r.connector;if(n&&e.id===n.id)throw new i0e;try{r.setState(i=>({...i,status:"connecting"}));const s=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(i=>({...i,connector:e,chains:e==null?void 0:e.chains,data:s,status:"connected"})),r.storage.setItem("connected",!0),{...s,connector:e}}catch(s){throw r.setState(i=>({...i,status:i.connector?"connected":"disconnected"})),s}}async function h0e(){const t=si();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function L3({chainId:t}={}){const e=si();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function Kz({chainId:t}={}){var n,s;return await((s=(n=si().connector)==null?void 0:n.getWalletClient)==null?void 0:s.call(n,{chainId:t}))||null}function v0e(t,e){const r=si(),n=async()=>e(L3(t));return r.subscribe(({publicClient:i})=>i,n)}function y0e({chainId:t},e){const r=si(),n=async({chainId:i})=>{if(t&&i&&t!==i)return;const o=await Kz({chainId:t});return si().connector?e(o):e(null)};return r.subscribe(({data:i,connector:o})=>{var a;return{account:i==null?void 0:i.account,chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:y4})}function Qz(){const{data:t,connector:e,status:r}=si();switch(r){case"connected":return{address:t==null?void 0:t.account,connector:e,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!!(t!=null&&t.account),isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function Yz(){var s,i,o,a;const t=si(),e=(i=(s=t.data)==null?void 0:s.chain)==null?void 0:i.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(l=>l.id===e)??{id:e,name:`Chain ${e}`,network:`${e}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:e?{...n,...(a=t.data)==null?void 0:a.chain,id:e}:void 0,chains:r}}async function m0e({chainId:t}){const{connector:e}=si();if(!e)throw new sl;if(!e.switchChain)throw new o0e({connector:e});return e.switchChain(t)}function p0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Qz());return r.subscribe(({data:i,connector:o,status:a})=>e({address:i==null?void 0:i.account,connector:o,status:a}),n,{equalityFn:y4})}function g0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Yz());return r.subscribe(({data:i,chains:o})=>{var a;return e({chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:y4})}var b0e={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},w0e={id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},rb={},x0e={get exports(){return rb},set exports(t){rb=t}},Jz={};/** +`))}return{chains:l,publicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=c[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const v=jR({batch:r,chain:d,transport:DR(h.map(y=>zve(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})},webSocketPublicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=f[d.id];if(!h||!h[0])return;const v=jR({batch:r,chain:d,transport:DR(h.map(y=>Wye(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})}}}var n0e=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},s0e=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function O3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!O3(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const s=Object.keys(t);if(r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(i&&!O3(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}var M3=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>M3(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[s,i])=>({...n,[s]:M3(i,{find:e,replace:r})}),{}):t;function i0e(t){const e=JSON.parse(t);return M3(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function BR(t,e){return t.slice(0,e).join(".")||"."}function UR(t,e){const{length:r}=t;for(let n=0;n{const o=typeof i=="bigint"?`#bigint.${i.toString()}`:i;return(e==null?void 0:e(s,o))||o},n),r??void 0)}var Wz={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function Hz({deserialize:t=i0e,key:e="wagmi",serialize:r=a0e,storage:n}){return{...n,getItem:(s,i=null)=>{const o=n.getItem(`${e}.${s}`);try{return o?t(o):i}catch(a){return console.warn(a),i}},setItem:(s,i)=>{if(i===null)n.removeItem(`${e}.${s}`);else try{n.setItem(`${e}.${s}`,r(i))}catch(o){console.error(o)}},removeItem:s=>n.removeItem(`${e}.${s}`)}}var zR="store",Su,D1,D3,Gz,l0e=class{constructor({autoConnect:e=!1,connectors:r=[new qz],publicClient:n,storage:s=Hz({storage:typeof window<"u"?window.localStorage:Wz}),logger:i={warn:console.warn},webSocketPublicClient:o}){var f,u;vE(this,D3),this.publicClients=new Map,this.webSocketPublicClients=new Map,vE(this,Su,void 0),vE(this,D1,void 0),this.args={autoConnect:e,connectors:r,logger:i,publicClient:n,storage:s,webSocketPublicClient:o};let a="disconnected",l;if(e)try{const d=s.getItem(zR),h=(f=d==null?void 0:d.state)==null?void 0:f.data;a=h!=null&&h.account?"reconnecting":"connecting",l=(u=h==null?void 0:h.chain)==null?void 0:u.id}catch{}const c=typeof r=="function"?r():r;c.forEach(d=>d.setStorage(s)),this.store=t0e(Qye(e0e(()=>({connectors:c,publicClient:this.getPublicClient({chainId:l}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})}),{name:zR,storage:s,partialize:d=>{var h,v;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(v=d==null?void 0:d.data)==null?void 0:v.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=s,$m(this,D1,s==null?void 0:s.getItem("wallet")),Gye(this,D3,Gz).call(this),e&&typeof window<"u"&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){var e,r;return(r=(e=this.data)==null?void 0:e.chain)==null?void 0:r.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const r=typeof e=="function"?e(this.store.getState()):e;this.store.setState(r,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){var e,r;this.connector&&await((r=(e=this.connector).disconnect)==null?void 0:r.call(e)),$m(this,Su,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(hE(this,Su))return;$m(this,Su,!0),this.setState(n=>{var s;return{...n,status:(s=n.data)!=null&&s.account?"reconnecting":"connecting"}});const e=hE(this,D1)?[...this.connectors].sort(n=>n.id===hE(this,D1)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const i=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:i,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),$m(this,Su,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const r=typeof e=="function"?e():e;r.forEach(n=>n.setStorage(this.args.storage)),this.setState(n=>({...n,connectors:r}))}getPublicClient({chainId:e}={}){let r=this.publicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.publicClients.get(e??-1),r))return r;const{publicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,this.publicClients.set(e??-1,r),r}setPublicClient(e){var n,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(i=>({...i,publicClient:this.getPublicClient({chainId:r})}))}getWebSocketPublicClient({chainId:e}={}){let r=this.webSocketPublicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.webSocketPublicClients.get(e??-1),r))return r;const{webSocketPublicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,r&&this.webSocketPublicClients.set(e??-1,r),r}setWebSocketPublicClient(e){var n,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(i=>({...i,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};Su=new WeakMap;D1=new WeakMap;D3=new WeakSet;Gz=function(){const t=a=>{this.setState(l=>({...l,data:{...l.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(l=>({...l,error:a}))};this.store.subscribe(({connector:a})=>a,(a,l)=>{var c,f,u,d,h,v;(c=l==null?void 0:l.off)==null||c.call(l,"change",t),(f=l==null?void 0:l.off)==null||f.call(l,"disconnect",e),(u=l==null?void 0:l.off)==null||u.call(l,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(v=a.on)==null||v.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:s}=this.args;(typeof n=="function"||typeof s=="function")&&this.store.subscribe(({data:a})=>{var l;return(l=a==null?void 0:a.chain)==null?void 0:l.id},a=>{this.setState(l=>({...l,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var N3;function c0e(t){const e=new l0e(t);return N3=e,e}function si(){if(!N3)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return N3}async function f0e({chainId:t,connector:e}){const r=si(),n=r.connector;if(n&&e.id===n.id)throw new n0e;try{r.setState(i=>({...i,status:"connecting"}));const s=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(i=>({...i,connector:e,chains:e==null?void 0:e.chains,data:s,status:"connected"})),r.storage.setItem("connected",!0),{...s,connector:e}}catch(s){throw r.setState(i=>({...i,status:i.connector?"connected":"disconnected"})),s}}async function u0e(){const t=si();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function L3({chainId:t}={}){const e=si();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function Kz({chainId:t}={}){var n,s;return await((s=(n=si().connector)==null?void 0:n.getWalletClient)==null?void 0:s.call(n,{chainId:t}))||null}function d0e(t,e){const r=si(),n=async()=>e(L3(t));return r.subscribe(({publicClient:i})=>i,n)}function h0e({chainId:t},e){const r=si(),n=async({chainId:i})=>{if(t&&i&&t!==i)return;const o=await Kz({chainId:t});return si().connector?e(o):e(null)};return r.subscribe(({data:i,connector:o})=>{var a;return{account:i==null?void 0:i.account,chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:y4})}function Qz(){const{data:t,connector:e,status:r}=si();switch(r){case"connected":return{address:t==null?void 0:t.account,connector:e,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!!(t!=null&&t.account),isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function Yz(){var s,i,o,a;const t=si(),e=(i=(s=t.data)==null?void 0:s.chain)==null?void 0:i.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(l=>l.id===e)??{id:e,name:`Chain ${e}`,network:`${e}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:e?{...n,...(a=t.data)==null?void 0:a.chain,id:e}:void 0,chains:r}}async function v0e({chainId:t}){const{connector:e}=si();if(!e)throw new sl;if(!e.switchChain)throw new s0e({connector:e});return e.switchChain(t)}function y0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Qz());return r.subscribe(({data:i,connector:o,status:a})=>e({address:i==null?void 0:i.account,connector:o,status:a}),n,{equalityFn:y4})}function m0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Yz());return r.subscribe(({data:i,chains:o})=>{var a;return e({chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:y4})}var p0e={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},g0e={id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},rb={},b0e={get exports(){return rb},set exports(t){rb=t}},Jz={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -144,42 +144,42 @@ ${r.length}`);return ns(ya([n,r]),e)}const $ye="0x608060405234801562000011576000 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Pw=m,C0e=jd;function E0e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var S0e=typeof Object.is=="function"?Object.is:E0e,k0e=C0e.useSyncExternalStore,$0e=Pw.useRef,A0e=Pw.useEffect,_0e=Pw.useMemo,P0e=Pw.useDebugValue;Jz.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=$0e(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=_0e(function(){function l(h){if(!c){if(c=!0,f=h,h=n(h),s!==void 0&&o.hasValue){var v=o.value;if(s(v,h))return u=v}return u=h}if(v=u,S0e(f,h))return v;var y=n(h);return s!==void 0&&s(v,y)?v:(f=h,u=y)}var c=!1,f,u,d=r===void 0?null:r;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,r,n,s]);var a=k0e(t,i[0],i[1]);return A0e(function(){o.hasValue=!0,o.value=a},[a]),P0e(a),a};(function(t){t.exports=Jz})(x0e);function T0e({queryClient:t=new Nde({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=Hz({storage:typeof window<"u"&&window.localStorage?window.localStorage:Wz}),persister:r=typeof window<"u"?xde({key:"cache",storage:e,serialize:s=>s,deserialize:s=>s}):void 0,...n}){const s=u0e({...n,storage:e});return r&&yhe({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:i=>i.cacheTime!==0&&i.queryKey[0].persist!==!1}}),Object.assign(s,{queryClient:t})}var Xz=m.createContext(void 0),Tw=m.createContext(void 0);function R0e({children:t,config:e}){return m.createElement(Xz.Provider,{children:m.createElement(she,{children:t,client:e.queryClient,context:Tw}),value:e})}function Rw(){const t=m.useContext(Xz);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` -`));return t}var I0e=jd.useSyncExternalStore;function O0e(t){return Array.isArray(t)}function M0e(t){if(!V9(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!V9(r)||!r.hasOwnProperty("isPrototypeOf"))}function V9(t){return Object.prototype.toString.call(t)==="[object Object]"}function D0e(t,e,r){return O0e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function N0e(t){return JSON.stringify(t,(e,r)=>M0e(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):typeof r=="bigint"?r.toString():r)}function L0e(t,e){return typeof t=="function"?t(...e):!!t}function j0e(t,e){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(e.trackedProps.add(n),t[n])})}),r}function F0e(t,e){const r=L$({context:t.context}),n=ihe(),s=lhe(),i=r.defaultQueryOptions({...t,queryKeyHashFn:N0e});i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=br.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=br.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=br.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(s.isReset()||(i.retryOnMount=!1));const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(I0e(m.useCallback(u=>n?()=>{}:o.subscribe(br.batchCalls(u)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{s.clearReset()},[s]),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),i.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(i).then(({data:u})=>{var d,h;(d=i.onSuccess)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,u,null)}).catch(u=>{var d,h;s.clearReset(),(d=i.onError)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,void 0,u)});if(a.isError&&!s.isReset()&&!a.isFetching&&L0e(i.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const l=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,c=l==="idle",f=l==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:i,isIdle:c,isLoading:f,observer:o,status:l}}function m4(t,e,r){const n=IU(t,e,r);return fhe({context:Tw,...n})}function B0e(t,e,r){const n=D0e(t,e,r),s=F0e({context:Tw,...n},Lde),i={data:s.data,error:s.error,fetchStatus:s.fetchStatus,isError:s.isError,isFetched:s.isFetched,isFetchedAfterMount:s.isFetchedAfterMount,isFetching:s.isFetching,isIdle:s.isIdle,isLoading:s.isLoading,isRefetching:s.isRefetching,isSuccess:s.isSuccess,refetch:s.refetch,status:s.status,internal:{dataUpdatedAt:s.dataUpdatedAt,errorUpdatedAt:s.errorUpdatedAt,failureCount:s.failureCount,isFetchedAfterMount:s.isFetchedAfterMount,isLoadingError:s.isLoadingError,isPaused:s.isPaused,isPlaceholderData:s.isPlaceholderData,isPreviousData:s.isPreviousData,isRefetchError:s.isRefetchError,isStale:s.isStale,remove:s.remove}};return s.defaultedOptions.notifyOnChangeProps?i:j0e(i,s.observer)}var U0e=()=>L$({context:Tw});function Zz({chainId:t}={}){return rb.useSyncExternalStoreWithSelector(e=>v0e({chainId:t},e),()=>L3({chainId:t}),()=>L3({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function yE({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function z0e({queryKey:[{chainId:t}]}){return Kz({chainId:t})}function p4({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:s}={}){const{connector:i}=Tn(),o=g4({chainId:t}),a=B0e(yE({chainId:o}),z0e,{cacheTime:0,enabled:Boolean(i),staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:s}),l=U0e();return m.useEffect(()=>y0e({chainId:o},f=>{f?l.invalidateQueries(yE({chainId:o})):l.removeQueries(yE({chainId:o}))}),[l,o]),a}function g4({chainId:t}={}){return Zz({chainId:t}).chain.id}function V0e(){const[,t]=m.useReducer(e=>e+1,0);return t}var mE=t=>typeof t=="object"&&!Array.isArray(t);function eV(t,e,r=e,n=O3){const s=m.useRef([]),i=rb.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(mE(o)&&mE(a)&&s.current.length){for(const l of s.current)if(!n(o[l],a[l]))return!1;return!0}return n(o,a)});if(mE(i)){const o={...i};return Object.defineProperties(o,Object.entries(o).reduce((a,[l,c])=>({...a,[l]:{configurable:!1,enumerable:!0,get:()=>(s.current.includes(l)||s.current.push(l),c)}}),{})),o}return i}function Tn({onConnect:t,onDisconnect:e}={}){const r=Rw(),n=m.useCallback(a=>p0e(a),[r]),s=eV(n,Qz),i=m.useRef(),o=i.current;return m.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&s.status==="connected"&&(t==null||t({address:s.address,connector:s.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&s.status==="disconnected"&&(e==null||e()),i.current=s},[t,e,o,s]),s}var q0e=t=>[{entity:"connect",...t}],W0e=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return d0e({connector:e,chainId:r})};function tV({chainId:t,connector:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){const o=Rw(),{data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,mutate:h,mutateAsync:v,reset:y,status:g,variables:b}=m4(q0e({connector:e,chainId:t}),W0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),p=m.useCallback(E=>h({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,h]),w=m.useCallback(E=>v({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,v]);return{connect:p,connectAsync:w,connectors:o.connectors,data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,pendingConnector:b==null?void 0:b.connector,reset:y,status:g,variables:b}}var H0e=[{entity:"disconnect"}],G0e=()=>h0e();function rV({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,mutate:c,mutateAsync:f,reset:u,status:d}=m4(H0e,G0e,{...t?{onError(h,v,y){t(h,y)}}:{},onMutate:e,...r?{onSettled(h,v,y,g){r(v,g)}}:{},...n?{onSuccess(h,v,y){n(y)}}:{}});return{disconnect:c,disconnectAsync:f,error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,reset:u,status:d}}function dn(){const t=Rw(),e=m.useCallback(r=>g0e(r),[t]);return eV(e,Yz)}var K0e=t=>[{entity:"switchNetwork",...t}],Q0e=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return m0e({chainId:e})};function nV({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){var T;const o=Rw(),a=V0e(),{data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,mutate:v,mutateAsync:y,reset:g,status:b,variables:p}=m4(K0e({chainId:t}),Q0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),w=m.useCallback(B=>v({chainId:B??t}),[t,v]),E=m.useCallback(B=>y({chainId:B??t}),[t,y]);m.useEffect(()=>o.subscribe(({chains:L,connector:U})=>({chains:L,connector:U}),a),[o,a]);let k,$;const x=!!((T=o.connector)!=null&&T.switchChain);return(e||x)&&(k=w,$=E),{chains:o.chains??[],data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,pendingChainId:p==null?void 0:p.chainId,reset:g,status:b,switchNetwork:k,switchNetworkAsync:$,variables:p}}const Y0e=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var J0e=Object.freeze({__proto__:null,abi:Y0e});const X0e=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],Z0e={isValidSignatureBytes32:"0x1626ba7e"};var eme=Object.freeze({__proto__:null,abi:X0e,returns:Z0e});const tme=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var rme=Object.freeze({__proto__:null,abi:tme});const nme=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var sme=Object.freeze({__proto__:null,abi:nme});const ime=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"}];var ome=Object.freeze({__proto__:null,abi:ime});const ame=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var lme=Object.freeze({__proto__:null,abi:ame});const cme=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var fme=Object.freeze({__proto__:null,abi:cme});const ume=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var dme=Object.freeze({__proto__:null,abi:ume});const $n={erc6492:rme,erc5719:J0e,erc1271:eme,factory:sme,mainModule:ome,mainModuleUpgradable:lme,sequenceUtils:fme,requireFreshSigner:dme},hme=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:$n},Symbol.toStringTag,{value:"Module"}));function nb(){return nb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),be({},n)).then(s=>we(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),be({},n)).then(s=>we(s).then(i=>({data:i.data}))),this.getAuthToken=(n,s)=>this.fetch(this.url("GetAuthToken"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,s)=>this.fetch(this.url("SendPasswordlessLink"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.friendList=(n,s)=>this.fetch(this.url("FriendList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,s)=>this.fetch(this.url("GetFriendByAddress"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,s)=>this.fetch(this.url("SearchFriends"),be(n,s)).then(i=>we(i).then(o=>({friends:o.friends}))),this.addFriend=(n,s)=>this.fetch(this.url("AddFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,s)=>this.fetch(this.url("UpdateFriendNickname"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,s)=>this.fetch(this.url("RemoveFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.contractCall=(n,s)=>this.fetch(this.url("ContractCall"),be(n,s)).then(i=>we(i).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,s)=>this.fetch(this.url("DecodeContractCall"),be(n,s)).then(i=>we(i).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,s)=>this.fetch(this.url("LookupContractCallSelectors"),be(n,s)).then(i=>we(i).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,s)=>this.fetch(this.url("UserStorageFetch"),be(n,s)).then(i=>we(i).then(o=>({object:o.object}))),this.userStorageSave=(n,s)=>this.fetch(this.url("UserStorageSave"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,s)=>this.fetch(this.url("UserStorageDelete"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,s)=>this.fetch(this.url("UserStorageFetchAll"),be(n,s)).then(i=>we(i).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,s)=>this.fetch(this.url("GetMoonpayLink"),be(n,s)).then(i=>we(i).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),be({},n)).then(s=>we(s).then(i=>({token:i.token}))),this.isUsingGoogleMail=(n,s)=>this.fetch(this.url("IsUsingGoogleMail"),be(n,s)).then(i=>we(i).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,s)=>this.fetch(this.url("ResolveENSAddress"),be(n,s)).then(i=>we(i).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,s)=>this.fetch(this.url("IsValidSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,s)=>this.fetch(this.url("IsValidMessageSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,s)=>this.fetch(this.url("IsValidTypedDataSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,s)=>this.fetch(this.url("IsValidETHAuthProof"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,s)=>this.fetch(this.url("GetCoinPrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,s)=>this.fetch(this.url("GetCollectiblePrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,s)=>this.fetch(this.url("GetExchangeRate"),be(n,s)).then(i=>we(i).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,s)=>this.fetch(this.url("MemoryStore"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.memoryLoad=(n,s)=>this.fetch(this.url("MemoryLoad"),be(n,s)).then(i=>we(i).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),be({},n)).then(s=>we(s).then(i=>({payCards:i.payCards}))),this.savePayCard=(n,s)=>this.fetch(this.url("SavePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,s)=>this.fetch(this.url("UpdatePayCardCVC"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.deletePayCard=(n,s)=>this.fetch(this.url("DeletePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,s)=>this.fetch(this.url("SmartRampQuote"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,s)=>this.fetch(this.url("SmartRampPurchase"),be(n,s)).then(i=>we(i).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,s)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),be(n,s)).then(i=>we(i).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,s)=>this.fetch(this.url("SmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,s)=>this.fetch(this.url("SmartRampOrdersList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,s)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),be(n,s)).then(i=>we(i).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,s)=>this.fetch(this.url("AdminSmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),be(n,s)).then(i=>we(i).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),be(n,s)).then(i=>we(i).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),be({},n)).then(s=>we(s).then(i=>({inviteInfo:i.inviteInfo}))),this.isValidAccessCode=(n,s)=>this.fetch(this.url("IsValidAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,s)=>this.fetch(this.url("InternalClaimAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.walletRecover=(n,s)=>this.fetch(this.url("WalletRecover"),be(n,s)).then(i=>we(i).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,s)=>this.fetch(this.url("BlockNumberAtTime"),be(n,s)).then(i=>we(i).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,s)=>this.fetch(this.url("PaperSessionSecret"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,s)=>this.fetch(this.url("PaperSessionSecret2"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const be=(t={},e={})=>({method:"POST",headers:nb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),we=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),q9=typeof global=="object"?global.fetch:window.fetch;class hd extends sV{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,q9),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=nb({},s.headers,i),q9(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const wme=Object.freeze(Object.defineProperty({__proto__:null,API:sV,SequenceAPIClient:hd,SmartRampOrderStatus:pme,SmartRampTxnStatus:gme,SortOrder:bme,WebRPCSchemaHash:mme,WebRPCSchemaVersion:yme,WebRPCVersion:vme},Symbol.toStringTag,{value:"Module"}));var j3={},xme={get exports(){return j3},set exports(t){j3=t}};const Cme={},Eme=Object.freeze(Object.defineProperty({__proto__:null,default:Cme},Symbol.toStringTag,{value:"Module"})),iV=tZ(Eme);(function(t){(function(e,r){function n(N,C){if(!N)throw new Error(C||"Assertion failed")}function s(N,C){N.super_=C;var S=function(){};S.prototype=C.prototype,N.prototype=new S,N.prototype.constructor=N}function i(N,C,S){if(i.isBN(N))return N;this.negative=0,this.words=null,this.length=0,this.red=null,N!==null&&((C==="le"||C==="be")&&(S=C,C=10),this._init(N||0,C||10,S||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=iV.Buffer}catch{}i.isBN=function(C){return C instanceof i?!0:C!==null&&typeof C=="object"&&C.constructor.wordSize===i.wordSize&&Array.isArray(C.words)},i.max=function(C,S){return C.cmp(S)>0?C:S},i.min=function(C,S){return C.cmp(S)<0?C:S},i.prototype._init=function(C,S,R){if(typeof C=="number")return this._initNumber(C,S,R);if(typeof C=="object")return this._initArray(C,S,R);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),C=C.toString().replace(/\s+/g,"");var M=0;C[0]==="-"&&(M++,this.negative=1),M=0;M-=3)I=C[M]|C[M-1]<<8|C[M-2]<<16,this.words[_]|=I<>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);else if(R==="le")for(M=0,_=0;M>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);return this._strip()};function a(N,C){var S=N.charCodeAt(C);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+N)}function l(N,C,S){var R=a(N,S);return S-1>=C&&(R|=a(N,S-1)<<4),R}i.prototype._parseHex=function(C,S,R){this.length=Math.ceil((C.length-S)/6),this.words=new Array(this.length);for(var M=0;M=S;M-=2)F=l(C,S,M)<<_,this.words[I]|=F&67108863,_>=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8;else{var D=C.length-S;for(M=D%2===0?S+1:S;M=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8}this._strip()};function c(N,C,S,R){for(var M=0,_=0,I=Math.min(N.length,S),F=C;F=49?_=D-49+10:D>=17?_=D-17+10:_=D,n(D>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(C,S){C=C||10,S=S|0||1;var R;if(C===16||C==="hex"){R="";for(var M=0,_=0,I=0;I>>24-M&16777215,M+=2,M>=26&&(M-=26,I--),_!==0||I!==this.length-1?R=d[6-D.length]+D+R:R=D+R}for(_!==0&&(R=_.toString(16)+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}if(C===(C|0)&&C>=2&&C<=36){var A=h[C],j=v[C];R="";var G=this.clone();for(G.negative=0;!G.isZero();){var O=G.modrn(j).toString(C);G=G.idivn(j),G.isZero()?R=O+R:R=d[A-O.length]+O+R}for(this.isZero()&&(R="0"+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var C=this.words[0];return this.length===2?C+=this.words[1]*67108864:this.length===3&&this.words[2]===1?C+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-C:C},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(C,S){return this.toArrayLike(o,C,S)}),i.prototype.toArray=function(C,S){return this.toArrayLike(Array,C,S)};var y=function(C,S){return C.allocUnsafe?C.allocUnsafe(S):new C(S)};i.prototype.toArrayLike=function(C,S,R){this._strip();var M=this.byteLength(),_=R||Math.max(1,M);n(M<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=y(C,_),F=S==="le"?"LE":"BE";return this["_toArrayLike"+F](I,M),I},i.prototype._toArrayLikeLE=function(C,S){for(var R=0,M=0,_=0,I=0;_>8&255),R>16&255),I===6?(R>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R=0&&(C[R--]=F>>8&255),R>=0&&(C[R--]=F>>16&255),I===6?(R>=0&&(C[R--]=F>>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R>=0)for(C[R--]=M;R>=0;)C[R--]=0},Math.clz32?i.prototype._countBits=function(C){return 32-Math.clz32(C)}:i.prototype._countBits=function(C){var S=C,R=0;return S>=4096&&(R+=13,S>>>=13),S>=64&&(R+=7,S>>>=7),S>=8&&(R+=4,S>>>=4),S>=2&&(R+=2,S>>>=2),R+S},i.prototype._zeroBits=function(C){if(C===0)return 26;var S=C,R=0;return S&8191||(R+=13,S>>>=13),S&127||(R+=7,S>>>=7),S&15||(R+=4,S>>>=4),S&3||(R+=2,S>>>=2),S&1||R++,R},i.prototype.bitLength=function(){var C=this.words[this.length-1],S=this._countBits(C);return(this.length-1)*26+S};function g(N){for(var C=new Array(N.bitLength()),S=0;S>>M&1}return C}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var C=0,S=0;SC.length?this.clone().ior(C):C.clone().ior(this)},i.prototype.uor=function(C){return this.length>C.length?this.clone().iuor(C):C.clone().iuor(this)},i.prototype.iuand=function(C){var S;this.length>C.length?S=C:S=this;for(var R=0;RC.length?this.clone().iand(C):C.clone().iand(this)},i.prototype.uand=function(C){return this.length>C.length?this.clone().iuand(C):C.clone().iuand(this)},i.prototype.iuxor=function(C){var S,R;this.length>C.length?(S=this,R=C):(S=C,R=this);for(var M=0;MC.length?this.clone().ixor(C):C.clone().ixor(this)},i.prototype.uxor=function(C){return this.length>C.length?this.clone().iuxor(C):C.clone().iuxor(this)},i.prototype.inotn=function(C){n(typeof C=="number"&&C>=0);var S=Math.ceil(C/26)|0,R=C%26;this._expand(S),R>0&&S--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-R),this._strip()},i.prototype.notn=function(C){return this.clone().inotn(C)},i.prototype.setn=function(C,S){n(typeof C=="number"&&C>=0);var R=C/26|0,M=C%26;return this._expand(R+1),S?this.words[R]=this.words[R]|1<C.length?(R=this,M=C):(R=C,M=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=R.length,_!==0)this.words[this.length]=_,this.length++;else if(R!==this)for(;IC.length?this.clone().iadd(C):C.clone().iadd(this)},i.prototype.isub=function(C){if(C.negative!==0){C.negative=0;var S=this.iadd(C);return C.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(C),this.negative=1,this._normSign();var R=this.cmp(C);if(R===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,_;R>0?(M=this,_=C):(M=C,_=this);for(var I=0,F=0;F<_.length;F++)S=(M.words[F]|0)-(_.words[F]|0)+I,I=S>>26,this.words[F]=S&67108863;for(;I!==0&&F>26,this.words[F]=S&67108863;if(I===0&&F>>26,G=D&67108863,O=Math.min(A,C.length-1),q=Math.max(0,A-N.length+1);q<=O;q++){var z=A-q|0;M=N.words[z]|0,_=C.words[q]|0,I=M*_+G,j+=I/67108864|0,G=I&67108863}S.words[A]=G|0,D=j|0}return D!==0?S.words[A]=D|0:S.length--,S._strip()}var p=function(C,S,R){var M=C.words,_=S.words,I=R.words,F=0,D,A,j,G=M[0]|0,O=G&8191,q=G>>>13,z=M[1]|0,H=z&8191,J=z>>>13,X=M[2]|0,K=X&8191,Q=X>>>13,ae=M[3]|0,ie=ae&8191,ue=ae>>>13,st=M[4]|0,ke=st&8191,Ae=st>>>13,at=M[5]|0,me=at&8191,Re=at>>>13,Qt=M[6]|0,Ie=Qt&8191,Oe=Qt>>>13,Yt=M[7]|0,Me=Yt&8191,De=Yt>>>13,Jt=M[8]|0,Ne=Jt&8191,Le=Jt>>>13,Xt=M[9]|0,je=Xt&8191,Fe=Xt>>>13,Zt=_[0]|0,Be=Zt&8191,Ct=Zt>>>13,mc=_[1]|0,Et=mc&8191,St=mc>>>13,pc=_[2]|0,kt=pc&8191,$t=pc>>>13,gc=_[3]|0,At=gc&8191,_t=gc>>>13,bc=_[4]|0,Pt=bc&8191,Tt=bc>>>13,wc=_[5]|0,Rt=wc&8191,It=wc>>>13,xc=_[6]|0,Ot=xc&8191,Mt=xc>>>13,Cc=_[7]|0,Dt=Cc&8191,Nt=Cc>>>13,Ec=_[8]|0,Lt=Ec&8191,jt=Ec>>>13,Sc=_[9]|0,Ft=Sc&8191,Bt=Sc>>>13;R.negative=C.negative^S.negative,R.length=19,D=Math.imul(O,Be),A=Math.imul(O,Ct),A=A+Math.imul(q,Be)|0,j=Math.imul(q,Ct);var Fa=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,D=Math.imul(H,Be),A=Math.imul(H,Ct),A=A+Math.imul(J,Be)|0,j=Math.imul(J,Ct),D=D+Math.imul(O,Et)|0,A=A+Math.imul(O,St)|0,A=A+Math.imul(q,Et)|0,j=j+Math.imul(q,St)|0;var Ba=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,D=Math.imul(K,Be),A=Math.imul(K,Ct),A=A+Math.imul(Q,Be)|0,j=Math.imul(Q,Ct),D=D+Math.imul(H,Et)|0,A=A+Math.imul(H,St)|0,A=A+Math.imul(J,Et)|0,j=j+Math.imul(J,St)|0,D=D+Math.imul(O,kt)|0,A=A+Math.imul(O,$t)|0,A=A+Math.imul(q,kt)|0,j=j+Math.imul(q,$t)|0;var Ua=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,D=Math.imul(ie,Be),A=Math.imul(ie,Ct),A=A+Math.imul(ue,Be)|0,j=Math.imul(ue,Ct),D=D+Math.imul(K,Et)|0,A=A+Math.imul(K,St)|0,A=A+Math.imul(Q,Et)|0,j=j+Math.imul(Q,St)|0,D=D+Math.imul(H,kt)|0,A=A+Math.imul(H,$t)|0,A=A+Math.imul(J,kt)|0,j=j+Math.imul(J,$t)|0,D=D+Math.imul(O,At)|0,A=A+Math.imul(O,_t)|0,A=A+Math.imul(q,At)|0,j=j+Math.imul(q,_t)|0;var za=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(za>>>26)|0,za&=67108863,D=Math.imul(ke,Be),A=Math.imul(ke,Ct),A=A+Math.imul(Ae,Be)|0,j=Math.imul(Ae,Ct),D=D+Math.imul(ie,Et)|0,A=A+Math.imul(ie,St)|0,A=A+Math.imul(ue,Et)|0,j=j+Math.imul(ue,St)|0,D=D+Math.imul(K,kt)|0,A=A+Math.imul(K,$t)|0,A=A+Math.imul(Q,kt)|0,j=j+Math.imul(Q,$t)|0,D=D+Math.imul(H,At)|0,A=A+Math.imul(H,_t)|0,A=A+Math.imul(J,At)|0,j=j+Math.imul(J,_t)|0,D=D+Math.imul(O,Pt)|0,A=A+Math.imul(O,Tt)|0,A=A+Math.imul(q,Pt)|0,j=j+Math.imul(q,Tt)|0;var Va=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Va>>>26)|0,Va&=67108863,D=Math.imul(me,Be),A=Math.imul(me,Ct),A=A+Math.imul(Re,Be)|0,j=Math.imul(Re,Ct),D=D+Math.imul(ke,Et)|0,A=A+Math.imul(ke,St)|0,A=A+Math.imul(Ae,Et)|0,j=j+Math.imul(Ae,St)|0,D=D+Math.imul(ie,kt)|0,A=A+Math.imul(ie,$t)|0,A=A+Math.imul(ue,kt)|0,j=j+Math.imul(ue,$t)|0,D=D+Math.imul(K,At)|0,A=A+Math.imul(K,_t)|0,A=A+Math.imul(Q,At)|0,j=j+Math.imul(Q,_t)|0,D=D+Math.imul(H,Pt)|0,A=A+Math.imul(H,Tt)|0,A=A+Math.imul(J,Pt)|0,j=j+Math.imul(J,Tt)|0,D=D+Math.imul(O,Rt)|0,A=A+Math.imul(O,It)|0,A=A+Math.imul(q,Rt)|0,j=j+Math.imul(q,It)|0;var Yx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Yx>>>26)|0,Yx&=67108863,D=Math.imul(Ie,Be),A=Math.imul(Ie,Ct),A=A+Math.imul(Oe,Be)|0,j=Math.imul(Oe,Ct),D=D+Math.imul(me,Et)|0,A=A+Math.imul(me,St)|0,A=A+Math.imul(Re,Et)|0,j=j+Math.imul(Re,St)|0,D=D+Math.imul(ke,kt)|0,A=A+Math.imul(ke,$t)|0,A=A+Math.imul(Ae,kt)|0,j=j+Math.imul(Ae,$t)|0,D=D+Math.imul(ie,At)|0,A=A+Math.imul(ie,_t)|0,A=A+Math.imul(ue,At)|0,j=j+Math.imul(ue,_t)|0,D=D+Math.imul(K,Pt)|0,A=A+Math.imul(K,Tt)|0,A=A+Math.imul(Q,Pt)|0,j=j+Math.imul(Q,Tt)|0,D=D+Math.imul(H,Rt)|0,A=A+Math.imul(H,It)|0,A=A+Math.imul(J,Rt)|0,j=j+Math.imul(J,It)|0,D=D+Math.imul(O,Ot)|0,A=A+Math.imul(O,Mt)|0,A=A+Math.imul(q,Ot)|0,j=j+Math.imul(q,Mt)|0;var Jx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Jx>>>26)|0,Jx&=67108863,D=Math.imul(Me,Be),A=Math.imul(Me,Ct),A=A+Math.imul(De,Be)|0,j=Math.imul(De,Ct),D=D+Math.imul(Ie,Et)|0,A=A+Math.imul(Ie,St)|0,A=A+Math.imul(Oe,Et)|0,j=j+Math.imul(Oe,St)|0,D=D+Math.imul(me,kt)|0,A=A+Math.imul(me,$t)|0,A=A+Math.imul(Re,kt)|0,j=j+Math.imul(Re,$t)|0,D=D+Math.imul(ke,At)|0,A=A+Math.imul(ke,_t)|0,A=A+Math.imul(Ae,At)|0,j=j+Math.imul(Ae,_t)|0,D=D+Math.imul(ie,Pt)|0,A=A+Math.imul(ie,Tt)|0,A=A+Math.imul(ue,Pt)|0,j=j+Math.imul(ue,Tt)|0,D=D+Math.imul(K,Rt)|0,A=A+Math.imul(K,It)|0,A=A+Math.imul(Q,Rt)|0,j=j+Math.imul(Q,It)|0,D=D+Math.imul(H,Ot)|0,A=A+Math.imul(H,Mt)|0,A=A+Math.imul(J,Ot)|0,j=j+Math.imul(J,Mt)|0,D=D+Math.imul(O,Dt)|0,A=A+Math.imul(O,Nt)|0,A=A+Math.imul(q,Dt)|0,j=j+Math.imul(q,Nt)|0;var Xx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Xx>>>26)|0,Xx&=67108863,D=Math.imul(Ne,Be),A=Math.imul(Ne,Ct),A=A+Math.imul(Le,Be)|0,j=Math.imul(Le,Ct),D=D+Math.imul(Me,Et)|0,A=A+Math.imul(Me,St)|0,A=A+Math.imul(De,Et)|0,j=j+Math.imul(De,St)|0,D=D+Math.imul(Ie,kt)|0,A=A+Math.imul(Ie,$t)|0,A=A+Math.imul(Oe,kt)|0,j=j+Math.imul(Oe,$t)|0,D=D+Math.imul(me,At)|0,A=A+Math.imul(me,_t)|0,A=A+Math.imul(Re,At)|0,j=j+Math.imul(Re,_t)|0,D=D+Math.imul(ke,Pt)|0,A=A+Math.imul(ke,Tt)|0,A=A+Math.imul(Ae,Pt)|0,j=j+Math.imul(Ae,Tt)|0,D=D+Math.imul(ie,Rt)|0,A=A+Math.imul(ie,It)|0,A=A+Math.imul(ue,Rt)|0,j=j+Math.imul(ue,It)|0,D=D+Math.imul(K,Ot)|0,A=A+Math.imul(K,Mt)|0,A=A+Math.imul(Q,Ot)|0,j=j+Math.imul(Q,Mt)|0,D=D+Math.imul(H,Dt)|0,A=A+Math.imul(H,Nt)|0,A=A+Math.imul(J,Dt)|0,j=j+Math.imul(J,Nt)|0,D=D+Math.imul(O,Lt)|0,A=A+Math.imul(O,jt)|0,A=A+Math.imul(q,Lt)|0,j=j+Math.imul(q,jt)|0;var Zx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Zx>>>26)|0,Zx&=67108863,D=Math.imul(je,Be),A=Math.imul(je,Ct),A=A+Math.imul(Fe,Be)|0,j=Math.imul(Fe,Ct),D=D+Math.imul(Ne,Et)|0,A=A+Math.imul(Ne,St)|0,A=A+Math.imul(Le,Et)|0,j=j+Math.imul(Le,St)|0,D=D+Math.imul(Me,kt)|0,A=A+Math.imul(Me,$t)|0,A=A+Math.imul(De,kt)|0,j=j+Math.imul(De,$t)|0,D=D+Math.imul(Ie,At)|0,A=A+Math.imul(Ie,_t)|0,A=A+Math.imul(Oe,At)|0,j=j+Math.imul(Oe,_t)|0,D=D+Math.imul(me,Pt)|0,A=A+Math.imul(me,Tt)|0,A=A+Math.imul(Re,Pt)|0,j=j+Math.imul(Re,Tt)|0,D=D+Math.imul(ke,Rt)|0,A=A+Math.imul(ke,It)|0,A=A+Math.imul(Ae,Rt)|0,j=j+Math.imul(Ae,It)|0,D=D+Math.imul(ie,Ot)|0,A=A+Math.imul(ie,Mt)|0,A=A+Math.imul(ue,Ot)|0,j=j+Math.imul(ue,Mt)|0,D=D+Math.imul(K,Dt)|0,A=A+Math.imul(K,Nt)|0,A=A+Math.imul(Q,Dt)|0,j=j+Math.imul(Q,Nt)|0,D=D+Math.imul(H,Lt)|0,A=A+Math.imul(H,jt)|0,A=A+Math.imul(J,Lt)|0,j=j+Math.imul(J,jt)|0,D=D+Math.imul(O,Ft)|0,A=A+Math.imul(O,Bt)|0,A=A+Math.imul(q,Ft)|0,j=j+Math.imul(q,Bt)|0;var eC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(eC>>>26)|0,eC&=67108863,D=Math.imul(je,Et),A=Math.imul(je,St),A=A+Math.imul(Fe,Et)|0,j=Math.imul(Fe,St),D=D+Math.imul(Ne,kt)|0,A=A+Math.imul(Ne,$t)|0,A=A+Math.imul(Le,kt)|0,j=j+Math.imul(Le,$t)|0,D=D+Math.imul(Me,At)|0,A=A+Math.imul(Me,_t)|0,A=A+Math.imul(De,At)|0,j=j+Math.imul(De,_t)|0,D=D+Math.imul(Ie,Pt)|0,A=A+Math.imul(Ie,Tt)|0,A=A+Math.imul(Oe,Pt)|0,j=j+Math.imul(Oe,Tt)|0,D=D+Math.imul(me,Rt)|0,A=A+Math.imul(me,It)|0,A=A+Math.imul(Re,Rt)|0,j=j+Math.imul(Re,It)|0,D=D+Math.imul(ke,Ot)|0,A=A+Math.imul(ke,Mt)|0,A=A+Math.imul(Ae,Ot)|0,j=j+Math.imul(Ae,Mt)|0,D=D+Math.imul(ie,Dt)|0,A=A+Math.imul(ie,Nt)|0,A=A+Math.imul(ue,Dt)|0,j=j+Math.imul(ue,Nt)|0,D=D+Math.imul(K,Lt)|0,A=A+Math.imul(K,jt)|0,A=A+Math.imul(Q,Lt)|0,j=j+Math.imul(Q,jt)|0,D=D+Math.imul(H,Ft)|0,A=A+Math.imul(H,Bt)|0,A=A+Math.imul(J,Ft)|0,j=j+Math.imul(J,Bt)|0;var tC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(tC>>>26)|0,tC&=67108863,D=Math.imul(je,kt),A=Math.imul(je,$t),A=A+Math.imul(Fe,kt)|0,j=Math.imul(Fe,$t),D=D+Math.imul(Ne,At)|0,A=A+Math.imul(Ne,_t)|0,A=A+Math.imul(Le,At)|0,j=j+Math.imul(Le,_t)|0,D=D+Math.imul(Me,Pt)|0,A=A+Math.imul(Me,Tt)|0,A=A+Math.imul(De,Pt)|0,j=j+Math.imul(De,Tt)|0,D=D+Math.imul(Ie,Rt)|0,A=A+Math.imul(Ie,It)|0,A=A+Math.imul(Oe,Rt)|0,j=j+Math.imul(Oe,It)|0,D=D+Math.imul(me,Ot)|0,A=A+Math.imul(me,Mt)|0,A=A+Math.imul(Re,Ot)|0,j=j+Math.imul(Re,Mt)|0,D=D+Math.imul(ke,Dt)|0,A=A+Math.imul(ke,Nt)|0,A=A+Math.imul(Ae,Dt)|0,j=j+Math.imul(Ae,Nt)|0,D=D+Math.imul(ie,Lt)|0,A=A+Math.imul(ie,jt)|0,A=A+Math.imul(ue,Lt)|0,j=j+Math.imul(ue,jt)|0,D=D+Math.imul(K,Ft)|0,A=A+Math.imul(K,Bt)|0,A=A+Math.imul(Q,Ft)|0,j=j+Math.imul(Q,Bt)|0;var rC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(rC>>>26)|0,rC&=67108863,D=Math.imul(je,At),A=Math.imul(je,_t),A=A+Math.imul(Fe,At)|0,j=Math.imul(Fe,_t),D=D+Math.imul(Ne,Pt)|0,A=A+Math.imul(Ne,Tt)|0,A=A+Math.imul(Le,Pt)|0,j=j+Math.imul(Le,Tt)|0,D=D+Math.imul(Me,Rt)|0,A=A+Math.imul(Me,It)|0,A=A+Math.imul(De,Rt)|0,j=j+Math.imul(De,It)|0,D=D+Math.imul(Ie,Ot)|0,A=A+Math.imul(Ie,Mt)|0,A=A+Math.imul(Oe,Ot)|0,j=j+Math.imul(Oe,Mt)|0,D=D+Math.imul(me,Dt)|0,A=A+Math.imul(me,Nt)|0,A=A+Math.imul(Re,Dt)|0,j=j+Math.imul(Re,Nt)|0,D=D+Math.imul(ke,Lt)|0,A=A+Math.imul(ke,jt)|0,A=A+Math.imul(Ae,Lt)|0,j=j+Math.imul(Ae,jt)|0,D=D+Math.imul(ie,Ft)|0,A=A+Math.imul(ie,Bt)|0,A=A+Math.imul(ue,Ft)|0,j=j+Math.imul(ue,Bt)|0;var nC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(nC>>>26)|0,nC&=67108863,D=Math.imul(je,Pt),A=Math.imul(je,Tt),A=A+Math.imul(Fe,Pt)|0,j=Math.imul(Fe,Tt),D=D+Math.imul(Ne,Rt)|0,A=A+Math.imul(Ne,It)|0,A=A+Math.imul(Le,Rt)|0,j=j+Math.imul(Le,It)|0,D=D+Math.imul(Me,Ot)|0,A=A+Math.imul(Me,Mt)|0,A=A+Math.imul(De,Ot)|0,j=j+Math.imul(De,Mt)|0,D=D+Math.imul(Ie,Dt)|0,A=A+Math.imul(Ie,Nt)|0,A=A+Math.imul(Oe,Dt)|0,j=j+Math.imul(Oe,Nt)|0,D=D+Math.imul(me,Lt)|0,A=A+Math.imul(me,jt)|0,A=A+Math.imul(Re,Lt)|0,j=j+Math.imul(Re,jt)|0,D=D+Math.imul(ke,Ft)|0,A=A+Math.imul(ke,Bt)|0,A=A+Math.imul(Ae,Ft)|0,j=j+Math.imul(Ae,Bt)|0;var sC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(sC>>>26)|0,sC&=67108863,D=Math.imul(je,Rt),A=Math.imul(je,It),A=A+Math.imul(Fe,Rt)|0,j=Math.imul(Fe,It),D=D+Math.imul(Ne,Ot)|0,A=A+Math.imul(Ne,Mt)|0,A=A+Math.imul(Le,Ot)|0,j=j+Math.imul(Le,Mt)|0,D=D+Math.imul(Me,Dt)|0,A=A+Math.imul(Me,Nt)|0,A=A+Math.imul(De,Dt)|0,j=j+Math.imul(De,Nt)|0,D=D+Math.imul(Ie,Lt)|0,A=A+Math.imul(Ie,jt)|0,A=A+Math.imul(Oe,Lt)|0,j=j+Math.imul(Oe,jt)|0,D=D+Math.imul(me,Ft)|0,A=A+Math.imul(me,Bt)|0,A=A+Math.imul(Re,Ft)|0,j=j+Math.imul(Re,Bt)|0;var iC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(iC>>>26)|0,iC&=67108863,D=Math.imul(je,Ot),A=Math.imul(je,Mt),A=A+Math.imul(Fe,Ot)|0,j=Math.imul(Fe,Mt),D=D+Math.imul(Ne,Dt)|0,A=A+Math.imul(Ne,Nt)|0,A=A+Math.imul(Le,Dt)|0,j=j+Math.imul(Le,Nt)|0,D=D+Math.imul(Me,Lt)|0,A=A+Math.imul(Me,jt)|0,A=A+Math.imul(De,Lt)|0,j=j+Math.imul(De,jt)|0,D=D+Math.imul(Ie,Ft)|0,A=A+Math.imul(Ie,Bt)|0,A=A+Math.imul(Oe,Ft)|0,j=j+Math.imul(Oe,Bt)|0;var oC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(oC>>>26)|0,oC&=67108863,D=Math.imul(je,Dt),A=Math.imul(je,Nt),A=A+Math.imul(Fe,Dt)|0,j=Math.imul(Fe,Nt),D=D+Math.imul(Ne,Lt)|0,A=A+Math.imul(Ne,jt)|0,A=A+Math.imul(Le,Lt)|0,j=j+Math.imul(Le,jt)|0,D=D+Math.imul(Me,Ft)|0,A=A+Math.imul(Me,Bt)|0,A=A+Math.imul(De,Ft)|0,j=j+Math.imul(De,Bt)|0;var aC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(aC>>>26)|0,aC&=67108863,D=Math.imul(je,Lt),A=Math.imul(je,jt),A=A+Math.imul(Fe,Lt)|0,j=Math.imul(Fe,jt),D=D+Math.imul(Ne,Ft)|0,A=A+Math.imul(Ne,Bt)|0,A=A+Math.imul(Le,Ft)|0,j=j+Math.imul(Le,Bt)|0;var lC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(lC>>>26)|0,lC&=67108863,D=Math.imul(je,Ft),A=Math.imul(je,Bt),A=A+Math.imul(Fe,Ft)|0,j=Math.imul(Fe,Bt);var cC=(F+D|0)+((A&8191)<<13)|0;return F=(j+(A>>>13)|0)+(cC>>>26)|0,cC&=67108863,I[0]=Fa,I[1]=Ba,I[2]=Ua,I[3]=za,I[4]=Va,I[5]=Yx,I[6]=Jx,I[7]=Xx,I[8]=Zx,I[9]=eC,I[10]=tC,I[11]=rC,I[12]=nC,I[13]=sC,I[14]=iC,I[15]=oC,I[16]=aC,I[17]=lC,I[18]=cC,F!==0&&(I[19]=F,R.length++),R};Math.imul||(p=b);function w(N,C,S){S.negative=C.negative^N.negative,S.length=N.length+C.length;for(var R=0,M=0,_=0;_>>26)|0,M+=I>>>26,I&=67108863}S.words[_]=F,R=I,I=M}return R!==0?S.words[_]=R:S.length--,S._strip()}function E(N,C,S){return w(N,C,S)}i.prototype.mulTo=function(C,S){var R,M=this.length+C.length;return this.length===10&&C.length===10?R=p(this,C,S):M<63?R=b(this,C,S):M<1024?R=w(this,C,S):R=E(this,C,S),R},i.prototype.mul=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),this.mulTo(C,S)},i.prototype.mulf=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),E(this,C,S)},i.prototype.imul=function(C){return this.clone().mulTo(C,this)},i.prototype.imuln=function(C){var S=C<0;S&&(C=-C),n(typeof C=="number"),n(C<67108864);for(var R=0,M=0;M>=26,R+=_/67108864|0,R+=I>>>26,this.words[M]=I&67108863}return R!==0&&(this.words[M]=R,this.length++),S?this.ineg():this},i.prototype.muln=function(C){return this.clone().imuln(C)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(C){var S=g(C);if(S.length===0)return new i(1);for(var R=this,M=0;M=0);var S=C%26,R=(C-S)/26,M=67108863>>>26-S<<26-S,_;if(S!==0){var I=0;for(_=0;_>>26-S}I&&(this.words[_]=I,this.length++)}if(R!==0){for(_=this.length-1;_>=0;_--)this.words[_+R]=this.words[_];for(_=0;_=0);var M;S?M=(S-S%26)/26:M=0;var _=C%26,I=Math.min((C-_)/26,this.length),F=67108863^67108863>>>_<<_,D=R;if(M-=I,M=Math.max(0,M),D){for(var A=0;AI)for(this.length-=I,A=0;A=0&&(j!==0||A>=M);A--){var G=this.words[A]|0;this.words[A]=j<<26-_|G>>>_,j=G&F}return D&&j!==0&&(D.words[D.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(C,S,R){return n(this.negative===0),this.iushrn(C,S,R)},i.prototype.shln=function(C){return this.clone().ishln(C)},i.prototype.ushln=function(C){return this.clone().iushln(C)},i.prototype.shrn=function(C){return this.clone().ishrn(C)},i.prototype.ushrn=function(C){return this.clone().iushrn(C)},i.prototype.testn=function(C){n(typeof C=="number"&&C>=0);var S=C%26,R=(C-S)/26,M=1<=0);var S=C%26,R=(C-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=R)return this;if(S!==0&&R++,this.length=Math.min(R,this.length),S!==0){var M=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(C){if(n(typeof C=="number"),n(C<67108864),C<0)return this.iaddn(-C);if(this.negative!==0)return this.negative=0,this.iaddn(C),this.negative=1,this;if(this.words[0]-=C,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[_+R]=I&67108863}for(;_>26,this.words[_+R]=I&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(C,S){var R=this.length-C.length,M=this.clone(),_=C,I=_.words[_.length-1]|0,F=this._countBits(I);R=26-F,R!==0&&(_=_.ushln(R),M.iushln(R),I=_.words[_.length-1]|0);var D=M.length-_.length,A;if(S!=="mod"){A=new i(null),A.length=D+1,A.words=new Array(A.length);for(var j=0;j=0;O--){var q=(M.words[_.length+O]|0)*67108864+(M.words[_.length+O-1]|0);for(q=Math.min(q/I|0,67108863),M._ishlnsubmul(_,q,O);M.negative!==0;)q--,M.negative=0,M._ishlnsubmul(_,1,O),M.isZero()||(M.negative^=1);A&&(A.words[O]=q)}return A&&A._strip(),M._strip(),S!=="div"&&R!==0&&M.iushrn(R),{div:A||null,mod:M}},i.prototype.divmod=function(C,S,R){if(n(!C.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,_,I;return this.negative!==0&&C.negative===0?(I=this.neg().divmod(C,S),S!=="mod"&&(M=I.div.neg()),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.iadd(C)),{div:M,mod:_}):this.negative===0&&C.negative!==0?(I=this.divmod(C.neg(),S),S!=="mod"&&(M=I.div.neg()),{div:M,mod:I.mod}):this.negative&C.negative?(I=this.neg().divmod(C.neg(),S),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.isub(C)),{div:I.div,mod:_}):C.length>this.length||this.cmp(C)<0?{div:new i(0),mod:this}:C.length===1?S==="div"?{div:this.divn(C.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(C.words[0]))}:{div:this.divn(C.words[0]),mod:new i(this.modrn(C.words[0]))}:this._wordDiv(C,S)},i.prototype.div=function(C){return this.divmod(C,"div",!1).div},i.prototype.mod=function(C){return this.divmod(C,"mod",!1).mod},i.prototype.umod=function(C){return this.divmod(C,"mod",!0).mod},i.prototype.divRound=function(C){var S=this.divmod(C);if(S.mod.isZero())return S.div;var R=S.div.negative!==0?S.mod.isub(C):S.mod,M=C.ushrn(1),_=C.andln(1),I=R.cmp(M);return I<0||_===1&&I===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=(1<<26)%C,M=0,_=this.length-1;_>=0;_--)M=(R*M+(this.words[_]|0))%C;return S?-M:M},i.prototype.modn=function(C){return this.modrn(C)},i.prototype.idivn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=0,M=this.length-1;M>=0;M--){var _=(this.words[M]|0)+R*67108864;this.words[M]=_/C|0,R=_%C}return this._strip(),S?this.ineg():this},i.prototype.divn=function(C){return this.clone().idivn(C)},i.prototype.egcd=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=new i(0),F=new i(1),D=0;S.isEven()&&R.isEven();)S.iushrn(1),R.iushrn(1),++D;for(var A=R.clone(),j=S.clone();!S.isZero();){for(var G=0,O=1;!(S.words[0]&O)&&G<26;++G,O<<=1);if(G>0)for(S.iushrn(G);G-- >0;)(M.isOdd()||_.isOdd())&&(M.iadd(A),_.isub(j)),M.iushrn(1),_.iushrn(1);for(var q=0,z=1;!(R.words[0]&z)&&q<26;++q,z<<=1);if(q>0)for(R.iushrn(q);q-- >0;)(I.isOdd()||F.isOdd())&&(I.iadd(A),F.isub(j)),I.iushrn(1),F.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(I),_.isub(F)):(R.isub(S),I.isub(M),F.isub(_))}return{a:I,b:F,gcd:R.iushln(D)}},i.prototype._invmp=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=R.clone();S.cmpn(1)>0&&R.cmpn(1)>0;){for(var F=0,D=1;!(S.words[0]&D)&&F<26;++F,D<<=1);if(F>0)for(S.iushrn(F);F-- >0;)M.isOdd()&&M.iadd(I),M.iushrn(1);for(var A=0,j=1;!(R.words[0]&j)&&A<26;++A,j<<=1);if(A>0)for(R.iushrn(A);A-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(_)):(R.isub(S),_.isub(M))}var G;return S.cmpn(1)===0?G=M:G=_,G.cmpn(0)<0&&G.iadd(C),G},i.prototype.gcd=function(C){if(this.isZero())return C.abs();if(C.isZero())return this.abs();var S=this.clone(),R=C.clone();S.negative=0,R.negative=0;for(var M=0;S.isEven()&&R.isEven();M++)S.iushrn(1),R.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;R.isEven();)R.iushrn(1);var _=S.cmp(R);if(_<0){var I=S;S=R,R=I}else if(_===0||R.cmpn(1)===0)break;S.isub(R)}while(!0);return R.iushln(M)},i.prototype.invm=function(C){return this.egcd(C).a.umod(C)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(C){return this.words[0]&C},i.prototype.bincn=function(C){n(typeof C=="number");var S=C%26,R=(C-S)/26,M=1<>>26,F&=67108863,this.words[I]=F}return _!==0&&(this.words[I]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(C){var S=C<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var R;if(this.length>1)R=1;else{S&&(C=-C),n(C<=67108863,"Number is too big");var M=this.words[0]|0;R=M===C?0:MC.length)return 1;if(this.length=0;R--){var M=this.words[R]|0,_=C.words[R]|0;if(M!==_){M<_?S=-1:M>_&&(S=1);break}}return S},i.prototype.gtn=function(C){return this.cmpn(C)===1},i.prototype.gt=function(C){return this.cmp(C)===1},i.prototype.gten=function(C){return this.cmpn(C)>=0},i.prototype.gte=function(C){return this.cmp(C)>=0},i.prototype.ltn=function(C){return this.cmpn(C)===-1},i.prototype.lt=function(C){return this.cmp(C)===-1},i.prototype.lten=function(C){return this.cmpn(C)<=0},i.prototype.lte=function(C){return this.cmp(C)<=0},i.prototype.eqn=function(C){return this.cmpn(C)===0},i.prototype.eq=function(C){return this.cmp(C)===0},i.red=function(C){return new U(C)},i.prototype.toRed=function(C){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),C.convertTo(this)._forceRed(C)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(C){return this.red=C,this},i.prototype.forceRed=function(C){return n(!this.red,"Already a number in reduction context"),this._forceRed(C)},i.prototype.redAdd=function(C){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,C)},i.prototype.redIAdd=function(C){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,C)},i.prototype.redSub=function(C){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,C)},i.prototype.redISub=function(C){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,C)},i.prototype.redShl=function(C){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,C)},i.prototype.redMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.mul(this,C)},i.prototype.redIMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.imul(this,C)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(C){return n(this.red&&!C.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,C)};var k={k256:null,p224:null,p192:null,p25519:null};function $(N,C){this.name=N,this.p=new i(C,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var C=new i(null);return C.words=new Array(Math.ceil(this.n/13)),C},$.prototype.ireduce=function(C){var S=C,R;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),R=S.bitLength();while(R>this.n);var M=R0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},$.prototype.split=function(C,S){C.iushrn(this.n,0,S)},$.prototype.imulK=function(C){return C.imul(this.k)};function x(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(x,$),x.prototype.split=function(C,S){for(var R=4194303,M=Math.min(C.length,9),_=0;_>>22,I=F}I>>>=22,C.words[_-10]=I,I===0&&C.length>10?C.length-=10:C.length-=9},x.prototype.imulK=function(C){C.words[C.length]=0,C.words[C.length+1]=0,C.length+=2;for(var S=0,R=0;R>>=26,C.words[R]=_,S=M}return S!==0&&(C.words[C.length++]=S),C},i._prime=function(C){if(k[C])return k[C];var S;if(C==="k256")S=new x;else if(C==="p224")S=new T;else if(C==="p192")S=new B;else if(C==="p25519")S=new L;else throw new Error("Unknown prime "+C);return k[C]=S,S};function U(N){if(typeof N=="string"){var C=i._prime(N);this.m=C.p,this.prime=C}else n(N.gtn(1),"modulus must be greater than 1"),this.m=N,this.prime=null}U.prototype._verify1=function(C){n(C.negative===0,"red works only with positives"),n(C.red,"red works only with red numbers")},U.prototype._verify2=function(C,S){n((C.negative|S.negative)===0,"red works only with positives"),n(C.red&&C.red===S.red,"red works only with red numbers")},U.prototype.imod=function(C){return this.prime?this.prime.ireduce(C)._forceRed(this):(f(C,C.umod(this.m)._forceRed(this)),C)},U.prototype.neg=function(C){return C.isZero()?C.clone():this.m.sub(C)._forceRed(this)},U.prototype.add=function(C,S){this._verify2(C,S);var R=C.add(S);return R.cmp(this.m)>=0&&R.isub(this.m),R._forceRed(this)},U.prototype.iadd=function(C,S){this._verify2(C,S);var R=C.iadd(S);return R.cmp(this.m)>=0&&R.isub(this.m),R},U.prototype.sub=function(C,S){this._verify2(C,S);var R=C.sub(S);return R.cmpn(0)<0&&R.iadd(this.m),R._forceRed(this)},U.prototype.isub=function(C,S){this._verify2(C,S);var R=C.isub(S);return R.cmpn(0)<0&&R.iadd(this.m),R},U.prototype.shl=function(C,S){return this._verify1(C),this.imod(C.ushln(S))},U.prototype.imul=function(C,S){return this._verify2(C,S),this.imod(C.imul(S))},U.prototype.mul=function(C,S){return this._verify2(C,S),this.imod(C.mul(S))},U.prototype.isqr=function(C){return this.imul(C,C.clone())},U.prototype.sqr=function(C){return this.mul(C,C)},U.prototype.sqrt=function(C){if(C.isZero())return C.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var R=this.m.add(new i(1)).iushrn(2);return this.pow(C,R)}for(var M=this.m.subn(1),_=0;!M.isZero()&&M.andln(1)===0;)_++,M.iushrn(1);n(!M.isZero());var I=new i(1).toRed(this),F=I.redNeg(),D=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new i(2*A*A).toRed(this);this.pow(A,D).cmp(F)!==0;)A.redIAdd(F);for(var j=this.pow(A,M),G=this.pow(C,M.addn(1).iushrn(1)),O=this.pow(C,M),q=_;O.cmp(I)!==0;){for(var z=O,H=0;z.cmp(I)!==0;H++)z=z.redSqr();n(H=0;_--){for(var j=S.words[_],G=A-1;G>=0;G--){var O=j>>G&1;if(I!==M[0]&&(I=this.sqr(I)),O===0&&F===0){D=0;continue}F<<=1,F|=O,D++,!(D!==R&&(_!==0||G!==0))&&(I=this.mul(I,M[F]),D=0,F=0)}A=26}return I},U.prototype.convertTo=function(C){var S=C.umod(this.m);return S===C?S.clone():S},U.prototype.convertFrom=function(C){var S=C.clone();return S.red=null,S},i.mont=function(C){return new V(C)};function V(N){U.call(this,N),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(V,U),V.prototype.convertTo=function(C){return this.imod(C.ushln(this.shift))},V.prototype.convertFrom=function(C){var S=this.imod(C.mul(this.rinv));return S.red=null,S},V.prototype.imul=function(C,S){if(C.isZero()||S.isZero())return C.words[0]=0,C.length=1,C;var R=C.imul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.mul=function(C,S){if(C.isZero()||S.isZero())return new i(0)._forceRed(this);var R=C.mul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.invm=function(C){var S=this.imod(C._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(t,Wr)})(xme);const Te=j3,Sme="logger/5.7.0";let W9=!1,H9=!1;const Pp={debug:1,default:2,info:2,warning:3,error:4,off:5};let G9=Pp.default,pE=null;function kme(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const K9=kme();var F3;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(F3||(F3={}));var ki;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ki||(ki={}));const Q9="0123456789abcdef";let ee=class jr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Pp[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(G9>Pp[n])&&console.log.apply(console,r)}debug(...e){this._log(jr.levels.DEBUG,e)}info(...e){this._log(jr.levels.INFO,e)}warn(...e){this._log(jr.levels.WARNING,e)}makeError(e,r,n){if(H9)return this.makeError("censored error",r,{});r||(r=jr.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=Q9[c[u]&15];s.push(l+"=Uint8Array(0x"+f+")")}else s.push(l+"="+JSON.stringify(c))}catch{s.push(l+"="+JSON.stringify(n[l].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let o="";switch(r){case ki.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case ki.CALL_EXCEPTION:case ki.INSUFFICIENT_FUNDS:case ki.MISSING_NEW:case ki.NONCE_EXPIRED:case ki.REPLACEMENT_UNDERPRICED:case ki.TRANSACTION_REPLACED:case ki.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,jr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){K9&&this.throwError("platform missing String.prototype.normalize",jr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:K9})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,jr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",jr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return pE||(pE=new jr(Sme)),pE}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),W9){if(!e)return;this.globalLogger().throwError("error censorship permanent",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}H9=!!e,W9=!!r}static setLogLevel(e){const r=Pp[e.toLowerCase()];if(r==null){jr.globalLogger().warn("invalid log level - "+e);return}G9=r}static from(e){return new jr(e)}};ee.errors=ki;ee.levels=F3;const $me="bytes/5.7.0",mr=new ee($me);function oV(t){return!!t.toHexString}function vd(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return vd(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ma(t){return ze(t)&&!(t.length%2)||Ta(t)}function Y9(t){return typeof t=="number"&&t==t&&t%1===0}function Ta(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Y9(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ne(t,e){if(e||(e={}),typeof t=="number"){mr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),vd(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oV(t)&&(t=t.toHexString()),ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":mr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sne(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),vd(n)}function Eo(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&mr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),vd(r)}function ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const gE="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){mr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=gE[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oV(t))return t.toHexString();if(ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":mr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Ta(t)){let r="0x";for(let n=0;n>4]+gE[s&15]}return r}return mr.throwArgumentError("invalid hexlify value","value",t)}function Io(t){if(typeof t!="string")t=te(t);else if(!ze(t)||t.length%2)return null;return(t.length-2)/2}function Sr(t,e,r){return typeof t!="string"?t=te(t):(!ze(t)||t.length%2)&&mr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function jn(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function Hl(t){const e=aV(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function aV(t){typeof t!="string"&&(t=te(t)),ze(t)||mr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&mr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function qf(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ma(t)){let r=ne(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64))):r.length===65?(e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64)),e.v=r[64]):mr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:mr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=te(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const s=sv(ne(e._vs),32);e._vs=te(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&mr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const o=te(s);e.s==null?e.s=o:e.s!==o&&mr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?mr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&mr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!ze(e.r)?mr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ht(e.r,32),e.s==null||!ze(e.s)?mr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ht(e.s,32);const r=ne(e.s);r[0]>=128&&mr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(ze(e._vs)||mr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ht(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&mr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Ame(t){return t=qf(t),te(Ht([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const lV="bignumber/5.7.0";var Ey=Te.BN;const Wo=new ee(lV),bE={},J9=9007199254740991;function _me(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}let X9=!1;class Z{constructor(e,r){e!==bE&&Wo.throwError("cannot call constructor directly; use BigNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jn(Je(this).fromTwos(e))}toTwos(e){return Jn(Je(this).toTwos(e))}abs(){return this._hex[0]==="-"?Z.from(this._hex.substring(1)):this}add(e){return Jn(Je(this).add(Je(e)))}sub(e){return Jn(Je(this).sub(Je(e)))}div(e){return Z.from(e).isZero()&&Us("division-by-zero","div"),Jn(Je(this).div(Je(e)))}mul(e){return Jn(Je(this).mul(Je(e)))}mod(e){const r=Je(e);return r.isNeg()&&Us("division-by-zero","mod"),Jn(Je(this).umod(r))}pow(e){const r=Je(e);return r.isNeg()&&Us("negative-power","pow"),Jn(Je(this).pow(r))}and(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","and"),Jn(Je(this).and(r))}or(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","or"),Jn(Je(this).or(r))}xor(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","xor"),Jn(Je(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Us("negative-width","mask"),Jn(Je(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Us("negative-width","shl"),Jn(Je(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Us("negative-width","shr"),Jn(Je(this).shrn(e))}eq(e){return Je(this).eq(Je(e))}lt(e){return Je(this).lt(Je(e))}lte(e){return Je(this).lte(Je(e))}gt(e){return Je(this).gt(Je(e))}gte(e){return Je(this).gte(Je(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Je(this).isZero()}toNumber(){try{return Je(this).toNumber()}catch{Us("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Wo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?X9||(X9=!0,Wo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Wo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):Wo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Je(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Z(bE,Sy(e)):e.match(/^-?[0-9]+$/)?new Z(bE,Sy(new Ey(e))):Wo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Us("underflow","BigNumber.from",e),(e>=J9||e<=-J9)&&Us("overflow","BigNumber.from",e),Z.from(String(e));const r=e;if(typeof r=="bigint")return Z.from(r.toString());if(Ta(r))return Z.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Z.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(ze(n)||n[0]==="-"&&ze(n.substring(1))))return Z.from(n)}return Wo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Sy(t){if(typeof t!="string")return Sy(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Wo.throwArgumentError("invalid hex","value",t),t=Sy(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jn(t){return Z.from(Sy(t))}function Je(t){const e=Z.from(t).toHexString();return e[0]==="-"?new Ey("-"+e.substring(3),16):new Ey(e.substring(2),16)}function Us(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Wo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function Pme(t){return new Ey(t,36).toString(16)}function Tme(t){return new Ey(t,16).toString(36)}const Fn=new ee(lV),iv={},cV=Z.from(0),fV=Z.from(-1);function uV(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),Fn.throwError(t,ee.errors.NUMERIC_FAULT,s)}let ov="0";for(;ov.length<256;)ov+=ov;function b4(t){if(typeof t!="number")try{t=Z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+ov.substring(0,t):Fn.throwArgumentError("invalid decimal size","decimals",t)}function Tp(t,e){e==null&&(e=0);const r=b4(e);t=Z.from(t);const n=t.lt(cV);n&&(t=t.mul(fV));let s=t.mod(r).toString();for(;s.length2&&Fn.throwArgumentError("too many decimal points","value",t);let i=s[0],o=s[1];for(i||(i="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&uV("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Fn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&Fn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&Fn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new yd(iv,r,n,s)}}class on{constructor(e,r,n,s){e!==iv&&Fn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Fn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Z9.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Z9.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Fn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=on.from("1"+ov.substring(0,e),this.format),s=Rme.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Fn.throwArgumentError("invalid byte width","width",e);const r=Z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ht(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return on.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!_me(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),on.fromString(Tp(e,r),yd.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=yd.from(r),s=to(e,n.decimals);!n.signed&&s.lt(cV)&&uV("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=ht(i,n.width/8));const o=Tp(s,n.decimals);return new on(iv,i,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=yd.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let s=Z.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),o=Tp(s,n.decimals);return new on(iv,i,o,n)}static from(e,r){if(typeof e=="string")return on.fromString(e,r);if(Ta(e))return on.fromBytes(e,r);try{return on.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return Fn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Z9=on.from(1),Rme=on.from("0.5"),Ime="properties/5.7.0";var Ome=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const sb=new ee(Ime);function oe(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Ti(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function mt(t){return Ome(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function w4(t,e){(!t||typeof t!="object")&&sb.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||sb.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const Mme={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function dV(t){if(t==null||Mme[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;r_s(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&oe(e,r,_s(n))}return e}return sb.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function _s(t){return Dme(t)}class x0{constructor(e){for(const r in e)this[r]=_s(e[r])}}const C0="abi/5.7.0",tt=new ee(C0),Cf={};let eR={calldata:!0,memory:!0,storage:!0},Nme={calldata:!0,memory:!0};function Am(t,e){if(t==="bytes"||t==="string"){if(eR[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Nme[e])return!0;return(eR[e]||e==="payable")&&tt.throwArgumentError("invalid modifier","name",e),!1}function Lme(t,e){let r=t;function n(a){tt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function s(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;aJSON.parse(s.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==it.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===it.full?", ":",")+")"):r+=this.type,e!==it.sighash&&(this.indexed===!0&&(r+=" indexed"),e===it.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?qr.fromString(e,r):qr.fromObject(e)}static fromObject(e){return qr.isParamType(e)?e:new qr(Cf,{name:e.name||null,type:ku(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(qr.fromObject):null})}static fromString(e,r){function n(s){return qr.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(Lme(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function ky(t,e){return Bme(t).map(r=>qr.fromString(r,e))}class po{constructor(e,r){e!==Cf&&tt.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Rp(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return po.isFragment(e)?e:typeof e=="string"?po.fromString(e):po.fromObject(e)}static fromObject(e){if(po.isFragment(e))return e;switch(e.type){case"function":return Pi.fromObject(e);case"event":return yo.fromObject(e);case"constructor":return _i.fromObject(e);case"error":return Xo.fromObject(e);case"fallback":case"receive":return null}return tt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?yo.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Pi.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?_i.fromString(e.trim()):e.split(" ")[0]==="error"?Xo.fromString(e.substring(5).trim()):tt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class yo extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==it.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?yo.fromString(e):yo.fromObject(e)}static fromObject(e){if(yo.isEventFragment(e))return e;e.type!=="event"&&tt.throwArgumentError("invalid event object","value",e);const r={name:$y(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(qr.fromObject):[],type:"event"};return new yo(Cf,r)}static fromString(e){let r=e.match(Ay);r||tt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:tt.warn("unknown modifier: "+s)}}),yo.fromObject({name:r[1].trim(),anonymous:n,inputs:ky(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function hV(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&tt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||tt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Z.from(r[1]),r[0]):t}function vV(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function yV(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&tt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&tt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&tt.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e}class _i extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===it.sighash&&tt.throwError("cannot format a constructor for sighash",ee.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?_i.fromString(e):_i.fromObject(e)}static fromObject(e){if(_i.isConstructorFragment(e))return e;e.type!=="constructor"&&tt.throwArgumentError("invalid constructor object","value",e);let r=yV(e);r.constant&&tt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new _i(Cf,n)}static fromString(e){let r={type:"constructor"};e=hV(e,r);let n=e.match(Ay);return(!n||n[1].trim()!=="constructor")&&tt.throwArgumentError("invalid constructor string","value",e),r.inputs=ky(n[2].trim(),!1),vV(n[3].trim(),r),_i.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Pi extends _i{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==it.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Pi.fromString(e):Pi.fromObject(e)}static fromObject(e){if(Pi.isFunctionFragment(e))return e;e.type!=="function"&&tt.throwArgumentError("invalid function object","value",e);let r=yV(e);const n={type:e.type,name:$y(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(qr.fromObject):[],outputs:e.outputs?e.outputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new Pi(Cf,n)}static fromString(e){let r={type:"function"};e=hV(e,r);let n=e.split(" returns ");n.length>2&&tt.throwArgumentError("invalid function string","value",e);let s=n[0].match(Ay);if(s||tt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&$y(r.name),r.inputs=ky(s[2],!1),vV(s[3].trim(),r),n.length>1){let i=n[1].match(Ay);(i[1].trim()!=""||i[3].trim()!="")&&tt.throwArgumentError("unexpected tokens","value",e),r.outputs=ky(i[2],!1)}else r.outputs=[];return Pi.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function tR(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&tt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Xo extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==it.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Xo.fromString(e):Xo.fromObject(e)}static fromObject(e){if(Xo.isErrorFragment(e))return e;e.type!=="error"&&tt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:$y(e.name),inputs:e.inputs?e.inputs.map(qr.fromObject):[]};return tR(new Xo(Cf,r))}static fromString(e){let r={type:"error"},n=e.match(Ay);return n||tt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&$y(r.name),r.inputs=ky(n[2],!1),tR(Xo.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function ku(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Fme=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function $y(t){return(!t||!t.match(Fme))&&tt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Ay=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Bme(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&x4.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ht([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class ib{constructor(e,r,n,s){oe(this,"_data",ne(e)),oe(this,"wordSize",r||32),oe(this,"_coerceFunc",n),oe(this,"allowLoose",s),this._offset=0}get data(){return te(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):ib.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:x4.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new ib(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return Z.from(this.readBytes(this.wordSize))}}var U3={},Ume={get exports(){return U3},set exports(t){U3=t}};/** + */var Pw=m,w0e=jd;function x0e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var C0e=typeof Object.is=="function"?Object.is:x0e,E0e=w0e.useSyncExternalStore,S0e=Pw.useRef,k0e=Pw.useEffect,$0e=Pw.useMemo,A0e=Pw.useDebugValue;Jz.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=S0e(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=$0e(function(){function l(h){if(!c){if(c=!0,f=h,h=n(h),s!==void 0&&o.hasValue){var v=o.value;if(s(v,h))return u=v}return u=h}if(v=u,C0e(f,h))return v;var y=n(h);return s!==void 0&&s(v,y)?v:(f=h,u=y)}var c=!1,f,u,d=r===void 0?null:r;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,r,n,s]);var a=E0e(t,i[0],i[1]);return k0e(function(){o.hasValue=!0,o.value=a},[a]),A0e(a),a};(function(t){t.exports=Jz})(b0e);function _0e({queryClient:t=new Mde({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=Hz({storage:typeof window<"u"&&window.localStorage?window.localStorage:Wz}),persister:r=typeof window<"u"?bde({key:"cache",storage:e,serialize:s=>s,deserialize:s=>s}):void 0,...n}){const s=c0e({...n,storage:e});return r&&hhe({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:i=>i.cacheTime!==0&&i.queryKey[0].persist!==!1}}),Object.assign(s,{queryClient:t})}var Xz=m.createContext(void 0),Tw=m.createContext(void 0);function P0e({children:t,config:e}){return m.createElement(Xz.Provider,{children:m.createElement(rhe,{children:t,client:e.queryClient,context:Tw}),value:e})}function Rw(){const t=m.useContext(Xz);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` +`));return t}var T0e=jd.useSyncExternalStore;function R0e(t){return Array.isArray(t)}function I0e(t){if(!VR(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!VR(r)||!r.hasOwnProperty("isPrototypeOf"))}function VR(t){return Object.prototype.toString.call(t)==="[object Object]"}function O0e(t,e,r){return R0e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function M0e(t){return JSON.stringify(t,(e,r)=>I0e(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):typeof r=="bigint"?r.toString():r)}function D0e(t,e){return typeof t=="function"?t(...e):!!t}function N0e(t,e){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(e.trackedProps.add(n),t[n])})}),r}function L0e(t,e){const r=L$({context:t.context}),n=nhe(),s=ohe(),i=r.defaultQueryOptions({...t,queryKeyHashFn:M0e});i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=gr.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=gr.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=gr.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(s.isReset()||(i.retryOnMount=!1));const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(T0e(m.useCallback(u=>n?()=>{}:o.subscribe(gr.batchCalls(u)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{s.clearReset()},[s]),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),i.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(i).then(({data:u})=>{var d,h;(d=i.onSuccess)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,u,null)}).catch(u=>{var d,h;s.clearReset(),(d=i.onError)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,void 0,u)});if(a.isError&&!s.isReset()&&!a.isFetching&&D0e(i.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const l=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,c=l==="idle",f=l==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:i,isIdle:c,isLoading:f,observer:o,status:l}}function m4(t,e,r){const n=IU(t,e,r);return lhe({context:Tw,...n})}function j0e(t,e,r){const n=O0e(t,e,r),s=L0e({context:Tw,...n},Dde),i={data:s.data,error:s.error,fetchStatus:s.fetchStatus,isError:s.isError,isFetched:s.isFetched,isFetchedAfterMount:s.isFetchedAfterMount,isFetching:s.isFetching,isIdle:s.isIdle,isLoading:s.isLoading,isRefetching:s.isRefetching,isSuccess:s.isSuccess,refetch:s.refetch,status:s.status,internal:{dataUpdatedAt:s.dataUpdatedAt,errorUpdatedAt:s.errorUpdatedAt,failureCount:s.failureCount,isFetchedAfterMount:s.isFetchedAfterMount,isLoadingError:s.isLoadingError,isPaused:s.isPaused,isPlaceholderData:s.isPlaceholderData,isPreviousData:s.isPreviousData,isRefetchError:s.isRefetchError,isStale:s.isStale,remove:s.remove}};return s.defaultedOptions.notifyOnChangeProps?i:N0e(i,s.observer)}var F0e=()=>L$({context:Tw});function Zz({chainId:t}={}){return rb.useSyncExternalStoreWithSelector(e=>d0e({chainId:t},e),()=>L3({chainId:t}),()=>L3({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function yE({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function B0e({queryKey:[{chainId:t}]}){return Kz({chainId:t})}function p4({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:s}={}){const{connector:i}=Tn(),o=g4({chainId:t}),a=j0e(yE({chainId:o}),B0e,{cacheTime:0,enabled:Boolean(i),staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:s}),l=F0e();return m.useEffect(()=>h0e({chainId:o},f=>{f?l.invalidateQueries(yE({chainId:o})):l.removeQueries(yE({chainId:o}))}),[l,o]),a}function g4({chainId:t}={}){return Zz({chainId:t}).chain.id}function U0e(){const[,t]=m.useReducer(e=>e+1,0);return t}var mE=t=>typeof t=="object"&&!Array.isArray(t);function eV(t,e,r=e,n=O3){const s=m.useRef([]),i=rb.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(mE(o)&&mE(a)&&s.current.length){for(const l of s.current)if(!n(o[l],a[l]))return!1;return!0}return n(o,a)});if(mE(i)){const o={...i};return Object.defineProperties(o,Object.entries(o).reduce((a,[l,c])=>({...a,[l]:{configurable:!1,enumerable:!0,get:()=>(s.current.includes(l)||s.current.push(l),c)}}),{})),o}return i}function Tn({onConnect:t,onDisconnect:e}={}){const r=Rw(),n=m.useCallback(a=>y0e(a),[r]),s=eV(n,Qz),i=m.useRef(),o=i.current;return m.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&s.status==="connected"&&(t==null||t({address:s.address,connector:s.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&s.status==="disconnected"&&(e==null||e()),i.current=s},[t,e,o,s]),s}var z0e=t=>[{entity:"connect",...t}],V0e=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return f0e({connector:e,chainId:r})};function tV({chainId:t,connector:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){const o=Rw(),{data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,mutate:h,mutateAsync:v,reset:y,status:g,variables:b}=m4(z0e({connector:e,chainId:t}),V0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),p=m.useCallback(E=>h({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,h]),w=m.useCallback(E=>v({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,v]);return{connect:p,connectAsync:w,connectors:o.connectors,data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,pendingConnector:b==null?void 0:b.connector,reset:y,status:g,variables:b}}var q0e=[{entity:"disconnect"}],W0e=()=>u0e();function rV({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,mutate:c,mutateAsync:f,reset:u,status:d}=m4(q0e,W0e,{...t?{onError(h,v,y){t(h,y)}}:{},onMutate:e,...r?{onSettled(h,v,y,g){r(v,g)}}:{},...n?{onSuccess(h,v,y){n(y)}}:{}});return{disconnect:c,disconnectAsync:f,error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,reset:u,status:d}}function dn(){const t=Rw(),e=m.useCallback(r=>m0e(r),[t]);return eV(e,Yz)}var H0e=t=>[{entity:"switchNetwork",...t}],G0e=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return v0e({chainId:e})};function nV({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){var T;const o=Rw(),a=U0e(),{data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,mutate:v,mutateAsync:y,reset:g,status:b,variables:p}=m4(H0e({chainId:t}),G0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),w=m.useCallback(B=>v({chainId:B??t}),[t,v]),E=m.useCallback(B=>y({chainId:B??t}),[t,y]);m.useEffect(()=>o.subscribe(({chains:L,connector:U})=>({chains:L,connector:U}),a),[o,a]);let k,A;const x=!!((T=o.connector)!=null&&T.switchChain);return(e||x)&&(k=w,A=E),{chains:o.chains??[],data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,pendingChainId:p==null?void 0:p.chainId,reset:g,status:b,switchNetwork:k,switchNetworkAsync:A,variables:p}}const K0e=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var Q0e=Object.freeze({__proto__:null,abi:K0e});const Y0e=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],J0e={isValidSignatureBytes32:"0x1626ba7e"};var X0e=Object.freeze({__proto__:null,abi:Y0e,returns:J0e});const Z0e=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var eme=Object.freeze({__proto__:null,abi:Z0e});const tme=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var rme=Object.freeze({__proto__:null,abi:tme});const nme=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"}];var sme=Object.freeze({__proto__:null,abi:nme});const ime=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var ome=Object.freeze({__proto__:null,abi:ime});const ame=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var lme=Object.freeze({__proto__:null,abi:ame});const cme=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var fme=Object.freeze({__proto__:null,abi:cme});const $n={erc6492:eme,erc5719:Q0e,erc1271:X0e,factory:rme,mainModule:sme,mainModuleUpgradable:ome,sequenceUtils:lme,requireFreshSigner:fme},ume=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:$n},Symbol.toStringTag,{value:"Module"}));function nb(){return nb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),be({},n)).then(s=>we(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),be({},n)).then(s=>we(s).then(i=>({data:i.data}))),this.getAuthToken=(n,s)=>this.fetch(this.url("GetAuthToken"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,s)=>this.fetch(this.url("SendPasswordlessLink"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.friendList=(n,s)=>this.fetch(this.url("FriendList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,s)=>this.fetch(this.url("GetFriendByAddress"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,s)=>this.fetch(this.url("SearchFriends"),be(n,s)).then(i=>we(i).then(o=>({friends:o.friends}))),this.addFriend=(n,s)=>this.fetch(this.url("AddFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,s)=>this.fetch(this.url("UpdateFriendNickname"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,s)=>this.fetch(this.url("RemoveFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.contractCall=(n,s)=>this.fetch(this.url("ContractCall"),be(n,s)).then(i=>we(i).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,s)=>this.fetch(this.url("DecodeContractCall"),be(n,s)).then(i=>we(i).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,s)=>this.fetch(this.url("LookupContractCallSelectors"),be(n,s)).then(i=>we(i).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,s)=>this.fetch(this.url("UserStorageFetch"),be(n,s)).then(i=>we(i).then(o=>({object:o.object}))),this.userStorageSave=(n,s)=>this.fetch(this.url("UserStorageSave"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,s)=>this.fetch(this.url("UserStorageDelete"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,s)=>this.fetch(this.url("UserStorageFetchAll"),be(n,s)).then(i=>we(i).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,s)=>this.fetch(this.url("GetMoonpayLink"),be(n,s)).then(i=>we(i).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),be({},n)).then(s=>we(s).then(i=>({token:i.token}))),this.isUsingGoogleMail=(n,s)=>this.fetch(this.url("IsUsingGoogleMail"),be(n,s)).then(i=>we(i).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,s)=>this.fetch(this.url("ResolveENSAddress"),be(n,s)).then(i=>we(i).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,s)=>this.fetch(this.url("IsValidSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,s)=>this.fetch(this.url("IsValidMessageSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,s)=>this.fetch(this.url("IsValidTypedDataSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,s)=>this.fetch(this.url("IsValidETHAuthProof"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,s)=>this.fetch(this.url("GetCoinPrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,s)=>this.fetch(this.url("GetCollectiblePrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,s)=>this.fetch(this.url("GetExchangeRate"),be(n,s)).then(i=>we(i).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,s)=>this.fetch(this.url("MemoryStore"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.memoryLoad=(n,s)=>this.fetch(this.url("MemoryLoad"),be(n,s)).then(i=>we(i).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),be({},n)).then(s=>we(s).then(i=>({payCards:i.payCards}))),this.savePayCard=(n,s)=>this.fetch(this.url("SavePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,s)=>this.fetch(this.url("UpdatePayCardCVC"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.deletePayCard=(n,s)=>this.fetch(this.url("DeletePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,s)=>this.fetch(this.url("SmartRampQuote"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,s)=>this.fetch(this.url("SmartRampPurchase"),be(n,s)).then(i=>we(i).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,s)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),be(n,s)).then(i=>we(i).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,s)=>this.fetch(this.url("SmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,s)=>this.fetch(this.url("SmartRampOrdersList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,s)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),be(n,s)).then(i=>we(i).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,s)=>this.fetch(this.url("AdminSmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),be(n,s)).then(i=>we(i).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),be(n,s)).then(i=>we(i).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),be({},n)).then(s=>we(s).then(i=>({inviteInfo:i.inviteInfo}))),this.isValidAccessCode=(n,s)=>this.fetch(this.url("IsValidAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,s)=>this.fetch(this.url("InternalClaimAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.walletRecover=(n,s)=>this.fetch(this.url("WalletRecover"),be(n,s)).then(i=>we(i).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,s)=>this.fetch(this.url("BlockNumberAtTime"),be(n,s)).then(i=>we(i).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,s)=>this.fetch(this.url("PaperSessionSecret"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,s)=>this.fetch(this.url("PaperSessionSecret2"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const be=(t={},e={})=>({method:"POST",headers:nb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),we=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),qR=typeof global=="object"?global.fetch:window.fetch;class hd extends sV{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,qR),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=nb({},s.headers,i),qR(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const gme=Object.freeze(Object.defineProperty({__proto__:null,API:sV,SequenceAPIClient:hd,SmartRampOrderStatus:yme,SmartRampTxnStatus:mme,SortOrder:pme,WebRPCSchemaHash:vme,WebRPCSchemaVersion:hme,WebRPCVersion:dme},Symbol.toStringTag,{value:"Module"}));var j3={},bme={get exports(){return j3},set exports(t){j3=t}};const wme={},xme=Object.freeze(Object.defineProperty({__proto__:null,default:wme},Symbol.toStringTag,{value:"Module"})),iV=tZ(xme);(function(t){(function(e,r){function n(N,C){if(!N)throw new Error(C||"Assertion failed")}function s(N,C){N.super_=C;var S=function(){};S.prototype=C.prototype,N.prototype=new S,N.prototype.constructor=N}function i(N,C,S){if(i.isBN(N))return N;this.negative=0,this.words=null,this.length=0,this.red=null,N!==null&&((C==="le"||C==="be")&&(S=C,C=10),this._init(N||0,C||10,S||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=iV.Buffer}catch{}i.isBN=function(C){return C instanceof i?!0:C!==null&&typeof C=="object"&&C.constructor.wordSize===i.wordSize&&Array.isArray(C.words)},i.max=function(C,S){return C.cmp(S)>0?C:S},i.min=function(C,S){return C.cmp(S)<0?C:S},i.prototype._init=function(C,S,R){if(typeof C=="number")return this._initNumber(C,S,R);if(typeof C=="object")return this._initArray(C,S,R);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),C=C.toString().replace(/\s+/g,"");var M=0;C[0]==="-"&&(M++,this.negative=1),M=0;M-=3)I=C[M]|C[M-1]<<8|C[M-2]<<16,this.words[_]|=I<>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);else if(R==="le")for(M=0,_=0;M>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);return this._strip()};function a(N,C){var S=N.charCodeAt(C);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+N)}function l(N,C,S){var R=a(N,S);return S-1>=C&&(R|=a(N,S-1)<<4),R}i.prototype._parseHex=function(C,S,R){this.length=Math.ceil((C.length-S)/6),this.words=new Array(this.length);for(var M=0;M=S;M-=2)F=l(C,S,M)<<_,this.words[I]|=F&67108863,_>=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8;else{var D=C.length-S;for(M=D%2===0?S+1:S;M=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8}this._strip()};function c(N,C,S,R){for(var M=0,_=0,I=Math.min(N.length,S),F=C;F=49?_=D-49+10:D>=17?_=D-17+10:_=D,n(D>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(C,S){C=C||10,S=S|0||1;var R;if(C===16||C==="hex"){R="";for(var M=0,_=0,I=0;I>>24-M&16777215,M+=2,M>=26&&(M-=26,I--),_!==0||I!==this.length-1?R=d[6-D.length]+D+R:R=D+R}for(_!==0&&(R=_.toString(16)+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}if(C===(C|0)&&C>=2&&C<=36){var $=h[C],j=v[C];R="";var G=this.clone();for(G.negative=0;!G.isZero();){var O=G.modrn(j).toString(C);G=G.idivn(j),G.isZero()?R=O+R:R=d[$-O.length]+O+R}for(this.isZero()&&(R="0"+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var C=this.words[0];return this.length===2?C+=this.words[1]*67108864:this.length===3&&this.words[2]===1?C+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-C:C},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(C,S){return this.toArrayLike(o,C,S)}),i.prototype.toArray=function(C,S){return this.toArrayLike(Array,C,S)};var y=function(C,S){return C.allocUnsafe?C.allocUnsafe(S):new C(S)};i.prototype.toArrayLike=function(C,S,R){this._strip();var M=this.byteLength(),_=R||Math.max(1,M);n(M<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=y(C,_),F=S==="le"?"LE":"BE";return this["_toArrayLike"+F](I,M),I},i.prototype._toArrayLikeLE=function(C,S){for(var R=0,M=0,_=0,I=0;_>8&255),R>16&255),I===6?(R>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R=0&&(C[R--]=F>>8&255),R>=0&&(C[R--]=F>>16&255),I===6?(R>=0&&(C[R--]=F>>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R>=0)for(C[R--]=M;R>=0;)C[R--]=0},Math.clz32?i.prototype._countBits=function(C){return 32-Math.clz32(C)}:i.prototype._countBits=function(C){var S=C,R=0;return S>=4096&&(R+=13,S>>>=13),S>=64&&(R+=7,S>>>=7),S>=8&&(R+=4,S>>>=4),S>=2&&(R+=2,S>>>=2),R+S},i.prototype._zeroBits=function(C){if(C===0)return 26;var S=C,R=0;return S&8191||(R+=13,S>>>=13),S&127||(R+=7,S>>>=7),S&15||(R+=4,S>>>=4),S&3||(R+=2,S>>>=2),S&1||R++,R},i.prototype.bitLength=function(){var C=this.words[this.length-1],S=this._countBits(C);return(this.length-1)*26+S};function g(N){for(var C=new Array(N.bitLength()),S=0;S>>M&1}return C}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var C=0,S=0;SC.length?this.clone().ior(C):C.clone().ior(this)},i.prototype.uor=function(C){return this.length>C.length?this.clone().iuor(C):C.clone().iuor(this)},i.prototype.iuand=function(C){var S;this.length>C.length?S=C:S=this;for(var R=0;RC.length?this.clone().iand(C):C.clone().iand(this)},i.prototype.uand=function(C){return this.length>C.length?this.clone().iuand(C):C.clone().iuand(this)},i.prototype.iuxor=function(C){var S,R;this.length>C.length?(S=this,R=C):(S=C,R=this);for(var M=0;MC.length?this.clone().ixor(C):C.clone().ixor(this)},i.prototype.uxor=function(C){return this.length>C.length?this.clone().iuxor(C):C.clone().iuxor(this)},i.prototype.inotn=function(C){n(typeof C=="number"&&C>=0);var S=Math.ceil(C/26)|0,R=C%26;this._expand(S),R>0&&S--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-R),this._strip()},i.prototype.notn=function(C){return this.clone().inotn(C)},i.prototype.setn=function(C,S){n(typeof C=="number"&&C>=0);var R=C/26|0,M=C%26;return this._expand(R+1),S?this.words[R]=this.words[R]|1<C.length?(R=this,M=C):(R=C,M=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=R.length,_!==0)this.words[this.length]=_,this.length++;else if(R!==this)for(;IC.length?this.clone().iadd(C):C.clone().iadd(this)},i.prototype.isub=function(C){if(C.negative!==0){C.negative=0;var S=this.iadd(C);return C.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(C),this.negative=1,this._normSign();var R=this.cmp(C);if(R===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,_;R>0?(M=this,_=C):(M=C,_=this);for(var I=0,F=0;F<_.length;F++)S=(M.words[F]|0)-(_.words[F]|0)+I,I=S>>26,this.words[F]=S&67108863;for(;I!==0&&F>26,this.words[F]=S&67108863;if(I===0&&F>>26,G=D&67108863,O=Math.min($,C.length-1),q=Math.max(0,$-N.length+1);q<=O;q++){var z=$-q|0;M=N.words[z]|0,_=C.words[q]|0,I=M*_+G,j+=I/67108864|0,G=I&67108863}S.words[$]=G|0,D=j|0}return D!==0?S.words[$]=D|0:S.length--,S._strip()}var p=function(C,S,R){var M=C.words,_=S.words,I=R.words,F=0,D,$,j,G=M[0]|0,O=G&8191,q=G>>>13,z=M[1]|0,H=z&8191,J=z>>>13,X=M[2]|0,K=X&8191,Q=X>>>13,ae=M[3]|0,ie=ae&8191,ue=ae>>>13,nt=M[4]|0,ke=nt&8191,Ae=nt>>>13,at=M[5]|0,me=at&8191,Re=at>>>13,Qt=M[6]|0,Ie=Qt&8191,Oe=Qt>>>13,Yt=M[7]|0,Me=Yt&8191,De=Yt>>>13,Jt=M[8]|0,Ne=Jt&8191,Le=Jt>>>13,Xt=M[9]|0,je=Xt&8191,Fe=Xt>>>13,Zt=_[0]|0,Be=Zt&8191,Ct=Zt>>>13,mc=_[1]|0,Et=mc&8191,St=mc>>>13,pc=_[2]|0,kt=pc&8191,$t=pc>>>13,gc=_[3]|0,At=gc&8191,_t=gc>>>13,bc=_[4]|0,Pt=bc&8191,Tt=bc>>>13,wc=_[5]|0,Rt=wc&8191,It=wc>>>13,xc=_[6]|0,Ot=xc&8191,Mt=xc>>>13,Cc=_[7]|0,Dt=Cc&8191,Nt=Cc>>>13,Ec=_[8]|0,Lt=Ec&8191,jt=Ec>>>13,Sc=_[9]|0,Ft=Sc&8191,Bt=Sc>>>13;R.negative=C.negative^S.negative,R.length=19,D=Math.imul(O,Be),$=Math.imul(O,Ct),$=$+Math.imul(q,Be)|0,j=Math.imul(q,Ct);var Fa=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,D=Math.imul(H,Be),$=Math.imul(H,Ct),$=$+Math.imul(J,Be)|0,j=Math.imul(J,Ct),D=D+Math.imul(O,Et)|0,$=$+Math.imul(O,St)|0,$=$+Math.imul(q,Et)|0,j=j+Math.imul(q,St)|0;var Ba=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,D=Math.imul(K,Be),$=Math.imul(K,Ct),$=$+Math.imul(Q,Be)|0,j=Math.imul(Q,Ct),D=D+Math.imul(H,Et)|0,$=$+Math.imul(H,St)|0,$=$+Math.imul(J,Et)|0,j=j+Math.imul(J,St)|0,D=D+Math.imul(O,kt)|0,$=$+Math.imul(O,$t)|0,$=$+Math.imul(q,kt)|0,j=j+Math.imul(q,$t)|0;var Ua=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,D=Math.imul(ie,Be),$=Math.imul(ie,Ct),$=$+Math.imul(ue,Be)|0,j=Math.imul(ue,Ct),D=D+Math.imul(K,Et)|0,$=$+Math.imul(K,St)|0,$=$+Math.imul(Q,Et)|0,j=j+Math.imul(Q,St)|0,D=D+Math.imul(H,kt)|0,$=$+Math.imul(H,$t)|0,$=$+Math.imul(J,kt)|0,j=j+Math.imul(J,$t)|0,D=D+Math.imul(O,At)|0,$=$+Math.imul(O,_t)|0,$=$+Math.imul(q,At)|0,j=j+Math.imul(q,_t)|0;var za=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(za>>>26)|0,za&=67108863,D=Math.imul(ke,Be),$=Math.imul(ke,Ct),$=$+Math.imul(Ae,Be)|0,j=Math.imul(Ae,Ct),D=D+Math.imul(ie,Et)|0,$=$+Math.imul(ie,St)|0,$=$+Math.imul(ue,Et)|0,j=j+Math.imul(ue,St)|0,D=D+Math.imul(K,kt)|0,$=$+Math.imul(K,$t)|0,$=$+Math.imul(Q,kt)|0,j=j+Math.imul(Q,$t)|0,D=D+Math.imul(H,At)|0,$=$+Math.imul(H,_t)|0,$=$+Math.imul(J,At)|0,j=j+Math.imul(J,_t)|0,D=D+Math.imul(O,Pt)|0,$=$+Math.imul(O,Tt)|0,$=$+Math.imul(q,Pt)|0,j=j+Math.imul(q,Tt)|0;var Va=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Va>>>26)|0,Va&=67108863,D=Math.imul(me,Be),$=Math.imul(me,Ct),$=$+Math.imul(Re,Be)|0,j=Math.imul(Re,Ct),D=D+Math.imul(ke,Et)|0,$=$+Math.imul(ke,St)|0,$=$+Math.imul(Ae,Et)|0,j=j+Math.imul(Ae,St)|0,D=D+Math.imul(ie,kt)|0,$=$+Math.imul(ie,$t)|0,$=$+Math.imul(ue,kt)|0,j=j+Math.imul(ue,$t)|0,D=D+Math.imul(K,At)|0,$=$+Math.imul(K,_t)|0,$=$+Math.imul(Q,At)|0,j=j+Math.imul(Q,_t)|0,D=D+Math.imul(H,Pt)|0,$=$+Math.imul(H,Tt)|0,$=$+Math.imul(J,Pt)|0,j=j+Math.imul(J,Tt)|0,D=D+Math.imul(O,Rt)|0,$=$+Math.imul(O,It)|0,$=$+Math.imul(q,Rt)|0,j=j+Math.imul(q,It)|0;var Yx=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Yx>>>26)|0,Yx&=67108863,D=Math.imul(Ie,Be),$=Math.imul(Ie,Ct),$=$+Math.imul(Oe,Be)|0,j=Math.imul(Oe,Ct),D=D+Math.imul(me,Et)|0,$=$+Math.imul(me,St)|0,$=$+Math.imul(Re,Et)|0,j=j+Math.imul(Re,St)|0,D=D+Math.imul(ke,kt)|0,$=$+Math.imul(ke,$t)|0,$=$+Math.imul(Ae,kt)|0,j=j+Math.imul(Ae,$t)|0,D=D+Math.imul(ie,At)|0,$=$+Math.imul(ie,_t)|0,$=$+Math.imul(ue,At)|0,j=j+Math.imul(ue,_t)|0,D=D+Math.imul(K,Pt)|0,$=$+Math.imul(K,Tt)|0,$=$+Math.imul(Q,Pt)|0,j=j+Math.imul(Q,Tt)|0,D=D+Math.imul(H,Rt)|0,$=$+Math.imul(H,It)|0,$=$+Math.imul(J,Rt)|0,j=j+Math.imul(J,It)|0,D=D+Math.imul(O,Ot)|0,$=$+Math.imul(O,Mt)|0,$=$+Math.imul(q,Ot)|0,j=j+Math.imul(q,Mt)|0;var Jx=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Jx>>>26)|0,Jx&=67108863,D=Math.imul(Me,Be),$=Math.imul(Me,Ct),$=$+Math.imul(De,Be)|0,j=Math.imul(De,Ct),D=D+Math.imul(Ie,Et)|0,$=$+Math.imul(Ie,St)|0,$=$+Math.imul(Oe,Et)|0,j=j+Math.imul(Oe,St)|0,D=D+Math.imul(me,kt)|0,$=$+Math.imul(me,$t)|0,$=$+Math.imul(Re,kt)|0,j=j+Math.imul(Re,$t)|0,D=D+Math.imul(ke,At)|0,$=$+Math.imul(ke,_t)|0,$=$+Math.imul(Ae,At)|0,j=j+Math.imul(Ae,_t)|0,D=D+Math.imul(ie,Pt)|0,$=$+Math.imul(ie,Tt)|0,$=$+Math.imul(ue,Pt)|0,j=j+Math.imul(ue,Tt)|0,D=D+Math.imul(K,Rt)|0,$=$+Math.imul(K,It)|0,$=$+Math.imul(Q,Rt)|0,j=j+Math.imul(Q,It)|0,D=D+Math.imul(H,Ot)|0,$=$+Math.imul(H,Mt)|0,$=$+Math.imul(J,Ot)|0,j=j+Math.imul(J,Mt)|0,D=D+Math.imul(O,Dt)|0,$=$+Math.imul(O,Nt)|0,$=$+Math.imul(q,Dt)|0,j=j+Math.imul(q,Nt)|0;var Xx=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Xx>>>26)|0,Xx&=67108863,D=Math.imul(Ne,Be),$=Math.imul(Ne,Ct),$=$+Math.imul(Le,Be)|0,j=Math.imul(Le,Ct),D=D+Math.imul(Me,Et)|0,$=$+Math.imul(Me,St)|0,$=$+Math.imul(De,Et)|0,j=j+Math.imul(De,St)|0,D=D+Math.imul(Ie,kt)|0,$=$+Math.imul(Ie,$t)|0,$=$+Math.imul(Oe,kt)|0,j=j+Math.imul(Oe,$t)|0,D=D+Math.imul(me,At)|0,$=$+Math.imul(me,_t)|0,$=$+Math.imul(Re,At)|0,j=j+Math.imul(Re,_t)|0,D=D+Math.imul(ke,Pt)|0,$=$+Math.imul(ke,Tt)|0,$=$+Math.imul(Ae,Pt)|0,j=j+Math.imul(Ae,Tt)|0,D=D+Math.imul(ie,Rt)|0,$=$+Math.imul(ie,It)|0,$=$+Math.imul(ue,Rt)|0,j=j+Math.imul(ue,It)|0,D=D+Math.imul(K,Ot)|0,$=$+Math.imul(K,Mt)|0,$=$+Math.imul(Q,Ot)|0,j=j+Math.imul(Q,Mt)|0,D=D+Math.imul(H,Dt)|0,$=$+Math.imul(H,Nt)|0,$=$+Math.imul(J,Dt)|0,j=j+Math.imul(J,Nt)|0,D=D+Math.imul(O,Lt)|0,$=$+Math.imul(O,jt)|0,$=$+Math.imul(q,Lt)|0,j=j+Math.imul(q,jt)|0;var Zx=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(Zx>>>26)|0,Zx&=67108863,D=Math.imul(je,Be),$=Math.imul(je,Ct),$=$+Math.imul(Fe,Be)|0,j=Math.imul(Fe,Ct),D=D+Math.imul(Ne,Et)|0,$=$+Math.imul(Ne,St)|0,$=$+Math.imul(Le,Et)|0,j=j+Math.imul(Le,St)|0,D=D+Math.imul(Me,kt)|0,$=$+Math.imul(Me,$t)|0,$=$+Math.imul(De,kt)|0,j=j+Math.imul(De,$t)|0,D=D+Math.imul(Ie,At)|0,$=$+Math.imul(Ie,_t)|0,$=$+Math.imul(Oe,At)|0,j=j+Math.imul(Oe,_t)|0,D=D+Math.imul(me,Pt)|0,$=$+Math.imul(me,Tt)|0,$=$+Math.imul(Re,Pt)|0,j=j+Math.imul(Re,Tt)|0,D=D+Math.imul(ke,Rt)|0,$=$+Math.imul(ke,It)|0,$=$+Math.imul(Ae,Rt)|0,j=j+Math.imul(Ae,It)|0,D=D+Math.imul(ie,Ot)|0,$=$+Math.imul(ie,Mt)|0,$=$+Math.imul(ue,Ot)|0,j=j+Math.imul(ue,Mt)|0,D=D+Math.imul(K,Dt)|0,$=$+Math.imul(K,Nt)|0,$=$+Math.imul(Q,Dt)|0,j=j+Math.imul(Q,Nt)|0,D=D+Math.imul(H,Lt)|0,$=$+Math.imul(H,jt)|0,$=$+Math.imul(J,Lt)|0,j=j+Math.imul(J,jt)|0,D=D+Math.imul(O,Ft)|0,$=$+Math.imul(O,Bt)|0,$=$+Math.imul(q,Ft)|0,j=j+Math.imul(q,Bt)|0;var eC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(eC>>>26)|0,eC&=67108863,D=Math.imul(je,Et),$=Math.imul(je,St),$=$+Math.imul(Fe,Et)|0,j=Math.imul(Fe,St),D=D+Math.imul(Ne,kt)|0,$=$+Math.imul(Ne,$t)|0,$=$+Math.imul(Le,kt)|0,j=j+Math.imul(Le,$t)|0,D=D+Math.imul(Me,At)|0,$=$+Math.imul(Me,_t)|0,$=$+Math.imul(De,At)|0,j=j+Math.imul(De,_t)|0,D=D+Math.imul(Ie,Pt)|0,$=$+Math.imul(Ie,Tt)|0,$=$+Math.imul(Oe,Pt)|0,j=j+Math.imul(Oe,Tt)|0,D=D+Math.imul(me,Rt)|0,$=$+Math.imul(me,It)|0,$=$+Math.imul(Re,Rt)|0,j=j+Math.imul(Re,It)|0,D=D+Math.imul(ke,Ot)|0,$=$+Math.imul(ke,Mt)|0,$=$+Math.imul(Ae,Ot)|0,j=j+Math.imul(Ae,Mt)|0,D=D+Math.imul(ie,Dt)|0,$=$+Math.imul(ie,Nt)|0,$=$+Math.imul(ue,Dt)|0,j=j+Math.imul(ue,Nt)|0,D=D+Math.imul(K,Lt)|0,$=$+Math.imul(K,jt)|0,$=$+Math.imul(Q,Lt)|0,j=j+Math.imul(Q,jt)|0,D=D+Math.imul(H,Ft)|0,$=$+Math.imul(H,Bt)|0,$=$+Math.imul(J,Ft)|0,j=j+Math.imul(J,Bt)|0;var tC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(tC>>>26)|0,tC&=67108863,D=Math.imul(je,kt),$=Math.imul(je,$t),$=$+Math.imul(Fe,kt)|0,j=Math.imul(Fe,$t),D=D+Math.imul(Ne,At)|0,$=$+Math.imul(Ne,_t)|0,$=$+Math.imul(Le,At)|0,j=j+Math.imul(Le,_t)|0,D=D+Math.imul(Me,Pt)|0,$=$+Math.imul(Me,Tt)|0,$=$+Math.imul(De,Pt)|0,j=j+Math.imul(De,Tt)|0,D=D+Math.imul(Ie,Rt)|0,$=$+Math.imul(Ie,It)|0,$=$+Math.imul(Oe,Rt)|0,j=j+Math.imul(Oe,It)|0,D=D+Math.imul(me,Ot)|0,$=$+Math.imul(me,Mt)|0,$=$+Math.imul(Re,Ot)|0,j=j+Math.imul(Re,Mt)|0,D=D+Math.imul(ke,Dt)|0,$=$+Math.imul(ke,Nt)|0,$=$+Math.imul(Ae,Dt)|0,j=j+Math.imul(Ae,Nt)|0,D=D+Math.imul(ie,Lt)|0,$=$+Math.imul(ie,jt)|0,$=$+Math.imul(ue,Lt)|0,j=j+Math.imul(ue,jt)|0,D=D+Math.imul(K,Ft)|0,$=$+Math.imul(K,Bt)|0,$=$+Math.imul(Q,Ft)|0,j=j+Math.imul(Q,Bt)|0;var rC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(rC>>>26)|0,rC&=67108863,D=Math.imul(je,At),$=Math.imul(je,_t),$=$+Math.imul(Fe,At)|0,j=Math.imul(Fe,_t),D=D+Math.imul(Ne,Pt)|0,$=$+Math.imul(Ne,Tt)|0,$=$+Math.imul(Le,Pt)|0,j=j+Math.imul(Le,Tt)|0,D=D+Math.imul(Me,Rt)|0,$=$+Math.imul(Me,It)|0,$=$+Math.imul(De,Rt)|0,j=j+Math.imul(De,It)|0,D=D+Math.imul(Ie,Ot)|0,$=$+Math.imul(Ie,Mt)|0,$=$+Math.imul(Oe,Ot)|0,j=j+Math.imul(Oe,Mt)|0,D=D+Math.imul(me,Dt)|0,$=$+Math.imul(me,Nt)|0,$=$+Math.imul(Re,Dt)|0,j=j+Math.imul(Re,Nt)|0,D=D+Math.imul(ke,Lt)|0,$=$+Math.imul(ke,jt)|0,$=$+Math.imul(Ae,Lt)|0,j=j+Math.imul(Ae,jt)|0,D=D+Math.imul(ie,Ft)|0,$=$+Math.imul(ie,Bt)|0,$=$+Math.imul(ue,Ft)|0,j=j+Math.imul(ue,Bt)|0;var nC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(nC>>>26)|0,nC&=67108863,D=Math.imul(je,Pt),$=Math.imul(je,Tt),$=$+Math.imul(Fe,Pt)|0,j=Math.imul(Fe,Tt),D=D+Math.imul(Ne,Rt)|0,$=$+Math.imul(Ne,It)|0,$=$+Math.imul(Le,Rt)|0,j=j+Math.imul(Le,It)|0,D=D+Math.imul(Me,Ot)|0,$=$+Math.imul(Me,Mt)|0,$=$+Math.imul(De,Ot)|0,j=j+Math.imul(De,Mt)|0,D=D+Math.imul(Ie,Dt)|0,$=$+Math.imul(Ie,Nt)|0,$=$+Math.imul(Oe,Dt)|0,j=j+Math.imul(Oe,Nt)|0,D=D+Math.imul(me,Lt)|0,$=$+Math.imul(me,jt)|0,$=$+Math.imul(Re,Lt)|0,j=j+Math.imul(Re,jt)|0,D=D+Math.imul(ke,Ft)|0,$=$+Math.imul(ke,Bt)|0,$=$+Math.imul(Ae,Ft)|0,j=j+Math.imul(Ae,Bt)|0;var sC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(sC>>>26)|0,sC&=67108863,D=Math.imul(je,Rt),$=Math.imul(je,It),$=$+Math.imul(Fe,Rt)|0,j=Math.imul(Fe,It),D=D+Math.imul(Ne,Ot)|0,$=$+Math.imul(Ne,Mt)|0,$=$+Math.imul(Le,Ot)|0,j=j+Math.imul(Le,Mt)|0,D=D+Math.imul(Me,Dt)|0,$=$+Math.imul(Me,Nt)|0,$=$+Math.imul(De,Dt)|0,j=j+Math.imul(De,Nt)|0,D=D+Math.imul(Ie,Lt)|0,$=$+Math.imul(Ie,jt)|0,$=$+Math.imul(Oe,Lt)|0,j=j+Math.imul(Oe,jt)|0,D=D+Math.imul(me,Ft)|0,$=$+Math.imul(me,Bt)|0,$=$+Math.imul(Re,Ft)|0,j=j+Math.imul(Re,Bt)|0;var iC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(iC>>>26)|0,iC&=67108863,D=Math.imul(je,Ot),$=Math.imul(je,Mt),$=$+Math.imul(Fe,Ot)|0,j=Math.imul(Fe,Mt),D=D+Math.imul(Ne,Dt)|0,$=$+Math.imul(Ne,Nt)|0,$=$+Math.imul(Le,Dt)|0,j=j+Math.imul(Le,Nt)|0,D=D+Math.imul(Me,Lt)|0,$=$+Math.imul(Me,jt)|0,$=$+Math.imul(De,Lt)|0,j=j+Math.imul(De,jt)|0,D=D+Math.imul(Ie,Ft)|0,$=$+Math.imul(Ie,Bt)|0,$=$+Math.imul(Oe,Ft)|0,j=j+Math.imul(Oe,Bt)|0;var oC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(oC>>>26)|0,oC&=67108863,D=Math.imul(je,Dt),$=Math.imul(je,Nt),$=$+Math.imul(Fe,Dt)|0,j=Math.imul(Fe,Nt),D=D+Math.imul(Ne,Lt)|0,$=$+Math.imul(Ne,jt)|0,$=$+Math.imul(Le,Lt)|0,j=j+Math.imul(Le,jt)|0,D=D+Math.imul(Me,Ft)|0,$=$+Math.imul(Me,Bt)|0,$=$+Math.imul(De,Ft)|0,j=j+Math.imul(De,Bt)|0;var aC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(aC>>>26)|0,aC&=67108863,D=Math.imul(je,Lt),$=Math.imul(je,jt),$=$+Math.imul(Fe,Lt)|0,j=Math.imul(Fe,jt),D=D+Math.imul(Ne,Ft)|0,$=$+Math.imul(Ne,Bt)|0,$=$+Math.imul(Le,Ft)|0,j=j+Math.imul(Le,Bt)|0;var lC=(F+D|0)+(($&8191)<<13)|0;F=(j+($>>>13)|0)+(lC>>>26)|0,lC&=67108863,D=Math.imul(je,Ft),$=Math.imul(je,Bt),$=$+Math.imul(Fe,Ft)|0,j=Math.imul(Fe,Bt);var cC=(F+D|0)+(($&8191)<<13)|0;return F=(j+($>>>13)|0)+(cC>>>26)|0,cC&=67108863,I[0]=Fa,I[1]=Ba,I[2]=Ua,I[3]=za,I[4]=Va,I[5]=Yx,I[6]=Jx,I[7]=Xx,I[8]=Zx,I[9]=eC,I[10]=tC,I[11]=rC,I[12]=nC,I[13]=sC,I[14]=iC,I[15]=oC,I[16]=aC,I[17]=lC,I[18]=cC,F!==0&&(I[19]=F,R.length++),R};Math.imul||(p=b);function w(N,C,S){S.negative=C.negative^N.negative,S.length=N.length+C.length;for(var R=0,M=0,_=0;_>>26)|0,M+=I>>>26,I&=67108863}S.words[_]=F,R=I,I=M}return R!==0?S.words[_]=R:S.length--,S._strip()}function E(N,C,S){return w(N,C,S)}i.prototype.mulTo=function(C,S){var R,M=this.length+C.length;return this.length===10&&C.length===10?R=p(this,C,S):M<63?R=b(this,C,S):M<1024?R=w(this,C,S):R=E(this,C,S),R},i.prototype.mul=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),this.mulTo(C,S)},i.prototype.mulf=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),E(this,C,S)},i.prototype.imul=function(C){return this.clone().mulTo(C,this)},i.prototype.imuln=function(C){var S=C<0;S&&(C=-C),n(typeof C=="number"),n(C<67108864);for(var R=0,M=0;M>=26,R+=_/67108864|0,R+=I>>>26,this.words[M]=I&67108863}return R!==0&&(this.words[M]=R,this.length++),S?this.ineg():this},i.prototype.muln=function(C){return this.clone().imuln(C)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(C){var S=g(C);if(S.length===0)return new i(1);for(var R=this,M=0;M=0);var S=C%26,R=(C-S)/26,M=67108863>>>26-S<<26-S,_;if(S!==0){var I=0;for(_=0;_>>26-S}I&&(this.words[_]=I,this.length++)}if(R!==0){for(_=this.length-1;_>=0;_--)this.words[_+R]=this.words[_];for(_=0;_=0);var M;S?M=(S-S%26)/26:M=0;var _=C%26,I=Math.min((C-_)/26,this.length),F=67108863^67108863>>>_<<_,D=R;if(M-=I,M=Math.max(0,M),D){for(var $=0;$I)for(this.length-=I,$=0;$=0&&(j!==0||$>=M);$--){var G=this.words[$]|0;this.words[$]=j<<26-_|G>>>_,j=G&F}return D&&j!==0&&(D.words[D.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(C,S,R){return n(this.negative===0),this.iushrn(C,S,R)},i.prototype.shln=function(C){return this.clone().ishln(C)},i.prototype.ushln=function(C){return this.clone().iushln(C)},i.prototype.shrn=function(C){return this.clone().ishrn(C)},i.prototype.ushrn=function(C){return this.clone().iushrn(C)},i.prototype.testn=function(C){n(typeof C=="number"&&C>=0);var S=C%26,R=(C-S)/26,M=1<=0);var S=C%26,R=(C-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=R)return this;if(S!==0&&R++,this.length=Math.min(R,this.length),S!==0){var M=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(C){if(n(typeof C=="number"),n(C<67108864),C<0)return this.iaddn(-C);if(this.negative!==0)return this.negative=0,this.iaddn(C),this.negative=1,this;if(this.words[0]-=C,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[_+R]=I&67108863}for(;_>26,this.words[_+R]=I&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(C,S){var R=this.length-C.length,M=this.clone(),_=C,I=_.words[_.length-1]|0,F=this._countBits(I);R=26-F,R!==0&&(_=_.ushln(R),M.iushln(R),I=_.words[_.length-1]|0);var D=M.length-_.length,$;if(S!=="mod"){$=new i(null),$.length=D+1,$.words=new Array($.length);for(var j=0;j<$.length;j++)$.words[j]=0}var G=M.clone()._ishlnsubmul(_,1,D);G.negative===0&&(M=G,$&&($.words[D]=1));for(var O=D-1;O>=0;O--){var q=(M.words[_.length+O]|0)*67108864+(M.words[_.length+O-1]|0);for(q=Math.min(q/I|0,67108863),M._ishlnsubmul(_,q,O);M.negative!==0;)q--,M.negative=0,M._ishlnsubmul(_,1,O),M.isZero()||(M.negative^=1);$&&($.words[O]=q)}return $&&$._strip(),M._strip(),S!=="div"&&R!==0&&M.iushrn(R),{div:$||null,mod:M}},i.prototype.divmod=function(C,S,R){if(n(!C.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,_,I;return this.negative!==0&&C.negative===0?(I=this.neg().divmod(C,S),S!=="mod"&&(M=I.div.neg()),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.iadd(C)),{div:M,mod:_}):this.negative===0&&C.negative!==0?(I=this.divmod(C.neg(),S),S!=="mod"&&(M=I.div.neg()),{div:M,mod:I.mod}):this.negative&C.negative?(I=this.neg().divmod(C.neg(),S),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.isub(C)),{div:I.div,mod:_}):C.length>this.length||this.cmp(C)<0?{div:new i(0),mod:this}:C.length===1?S==="div"?{div:this.divn(C.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(C.words[0]))}:{div:this.divn(C.words[0]),mod:new i(this.modrn(C.words[0]))}:this._wordDiv(C,S)},i.prototype.div=function(C){return this.divmod(C,"div",!1).div},i.prototype.mod=function(C){return this.divmod(C,"mod",!1).mod},i.prototype.umod=function(C){return this.divmod(C,"mod",!0).mod},i.prototype.divRound=function(C){var S=this.divmod(C);if(S.mod.isZero())return S.div;var R=S.div.negative!==0?S.mod.isub(C):S.mod,M=C.ushrn(1),_=C.andln(1),I=R.cmp(M);return I<0||_===1&&I===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=(1<<26)%C,M=0,_=this.length-1;_>=0;_--)M=(R*M+(this.words[_]|0))%C;return S?-M:M},i.prototype.modn=function(C){return this.modrn(C)},i.prototype.idivn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=0,M=this.length-1;M>=0;M--){var _=(this.words[M]|0)+R*67108864;this.words[M]=_/C|0,R=_%C}return this._strip(),S?this.ineg():this},i.prototype.divn=function(C){return this.clone().idivn(C)},i.prototype.egcd=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=new i(0),F=new i(1),D=0;S.isEven()&&R.isEven();)S.iushrn(1),R.iushrn(1),++D;for(var $=R.clone(),j=S.clone();!S.isZero();){for(var G=0,O=1;!(S.words[0]&O)&&G<26;++G,O<<=1);if(G>0)for(S.iushrn(G);G-- >0;)(M.isOdd()||_.isOdd())&&(M.iadd($),_.isub(j)),M.iushrn(1),_.iushrn(1);for(var q=0,z=1;!(R.words[0]&z)&&q<26;++q,z<<=1);if(q>0)for(R.iushrn(q);q-- >0;)(I.isOdd()||F.isOdd())&&(I.iadd($),F.isub(j)),I.iushrn(1),F.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(I),_.isub(F)):(R.isub(S),I.isub(M),F.isub(_))}return{a:I,b:F,gcd:R.iushln(D)}},i.prototype._invmp=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=R.clone();S.cmpn(1)>0&&R.cmpn(1)>0;){for(var F=0,D=1;!(S.words[0]&D)&&F<26;++F,D<<=1);if(F>0)for(S.iushrn(F);F-- >0;)M.isOdd()&&M.iadd(I),M.iushrn(1);for(var $=0,j=1;!(R.words[0]&j)&&$<26;++$,j<<=1);if($>0)for(R.iushrn($);$-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(_)):(R.isub(S),_.isub(M))}var G;return S.cmpn(1)===0?G=M:G=_,G.cmpn(0)<0&&G.iadd(C),G},i.prototype.gcd=function(C){if(this.isZero())return C.abs();if(C.isZero())return this.abs();var S=this.clone(),R=C.clone();S.negative=0,R.negative=0;for(var M=0;S.isEven()&&R.isEven();M++)S.iushrn(1),R.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;R.isEven();)R.iushrn(1);var _=S.cmp(R);if(_<0){var I=S;S=R,R=I}else if(_===0||R.cmpn(1)===0)break;S.isub(R)}while(!0);return R.iushln(M)},i.prototype.invm=function(C){return this.egcd(C).a.umod(C)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(C){return this.words[0]&C},i.prototype.bincn=function(C){n(typeof C=="number");var S=C%26,R=(C-S)/26,M=1<>>26,F&=67108863,this.words[I]=F}return _!==0&&(this.words[I]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(C){var S=C<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var R;if(this.length>1)R=1;else{S&&(C=-C),n(C<=67108863,"Number is too big");var M=this.words[0]|0;R=M===C?0:MC.length)return 1;if(this.length=0;R--){var M=this.words[R]|0,_=C.words[R]|0;if(M!==_){M<_?S=-1:M>_&&(S=1);break}}return S},i.prototype.gtn=function(C){return this.cmpn(C)===1},i.prototype.gt=function(C){return this.cmp(C)===1},i.prototype.gten=function(C){return this.cmpn(C)>=0},i.prototype.gte=function(C){return this.cmp(C)>=0},i.prototype.ltn=function(C){return this.cmpn(C)===-1},i.prototype.lt=function(C){return this.cmp(C)===-1},i.prototype.lten=function(C){return this.cmpn(C)<=0},i.prototype.lte=function(C){return this.cmp(C)<=0},i.prototype.eqn=function(C){return this.cmpn(C)===0},i.prototype.eq=function(C){return this.cmp(C)===0},i.red=function(C){return new U(C)},i.prototype.toRed=function(C){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),C.convertTo(this)._forceRed(C)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(C){return this.red=C,this},i.prototype.forceRed=function(C){return n(!this.red,"Already a number in reduction context"),this._forceRed(C)},i.prototype.redAdd=function(C){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,C)},i.prototype.redIAdd=function(C){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,C)},i.prototype.redSub=function(C){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,C)},i.prototype.redISub=function(C){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,C)},i.prototype.redShl=function(C){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,C)},i.prototype.redMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.mul(this,C)},i.prototype.redIMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.imul(this,C)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(C){return n(this.red&&!C.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,C)};var k={k256:null,p224:null,p192:null,p25519:null};function A(N,C){this.name=N,this.p=new i(C,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var C=new i(null);return C.words=new Array(Math.ceil(this.n/13)),C},A.prototype.ireduce=function(C){var S=C,R;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),R=S.bitLength();while(R>this.n);var M=R0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},A.prototype.split=function(C,S){C.iushrn(this.n,0,S)},A.prototype.imulK=function(C){return C.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(x,A),x.prototype.split=function(C,S){for(var R=4194303,M=Math.min(C.length,9),_=0;_>>22,I=F}I>>>=22,C.words[_-10]=I,I===0&&C.length>10?C.length-=10:C.length-=9},x.prototype.imulK=function(C){C.words[C.length]=0,C.words[C.length+1]=0,C.length+=2;for(var S=0,R=0;R>>=26,C.words[R]=_,S=M}return S!==0&&(C.words[C.length++]=S),C},i._prime=function(C){if(k[C])return k[C];var S;if(C==="k256")S=new x;else if(C==="p224")S=new T;else if(C==="p192")S=new B;else if(C==="p25519")S=new L;else throw new Error("Unknown prime "+C);return k[C]=S,S};function U(N){if(typeof N=="string"){var C=i._prime(N);this.m=C.p,this.prime=C}else n(N.gtn(1),"modulus must be greater than 1"),this.m=N,this.prime=null}U.prototype._verify1=function(C){n(C.negative===0,"red works only with positives"),n(C.red,"red works only with red numbers")},U.prototype._verify2=function(C,S){n((C.negative|S.negative)===0,"red works only with positives"),n(C.red&&C.red===S.red,"red works only with red numbers")},U.prototype.imod=function(C){return this.prime?this.prime.ireduce(C)._forceRed(this):(f(C,C.umod(this.m)._forceRed(this)),C)},U.prototype.neg=function(C){return C.isZero()?C.clone():this.m.sub(C)._forceRed(this)},U.prototype.add=function(C,S){this._verify2(C,S);var R=C.add(S);return R.cmp(this.m)>=0&&R.isub(this.m),R._forceRed(this)},U.prototype.iadd=function(C,S){this._verify2(C,S);var R=C.iadd(S);return R.cmp(this.m)>=0&&R.isub(this.m),R},U.prototype.sub=function(C,S){this._verify2(C,S);var R=C.sub(S);return R.cmpn(0)<0&&R.iadd(this.m),R._forceRed(this)},U.prototype.isub=function(C,S){this._verify2(C,S);var R=C.isub(S);return R.cmpn(0)<0&&R.iadd(this.m),R},U.prototype.shl=function(C,S){return this._verify1(C),this.imod(C.ushln(S))},U.prototype.imul=function(C,S){return this._verify2(C,S),this.imod(C.imul(S))},U.prototype.mul=function(C,S){return this._verify2(C,S),this.imod(C.mul(S))},U.prototype.isqr=function(C){return this.imul(C,C.clone())},U.prototype.sqr=function(C){return this.mul(C,C)},U.prototype.sqrt=function(C){if(C.isZero())return C.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var R=this.m.add(new i(1)).iushrn(2);return this.pow(C,R)}for(var M=this.m.subn(1),_=0;!M.isZero()&&M.andln(1)===0;)_++,M.iushrn(1);n(!M.isZero());var I=new i(1).toRed(this),F=I.redNeg(),D=this.m.subn(1).iushrn(1),$=this.m.bitLength();for($=new i(2*$*$).toRed(this);this.pow($,D).cmp(F)!==0;)$.redIAdd(F);for(var j=this.pow($,M),G=this.pow(C,M.addn(1).iushrn(1)),O=this.pow(C,M),q=_;O.cmp(I)!==0;){for(var z=O,H=0;z.cmp(I)!==0;H++)z=z.redSqr();n(H=0;_--){for(var j=S.words[_],G=$-1;G>=0;G--){var O=j>>G&1;if(I!==M[0]&&(I=this.sqr(I)),O===0&&F===0){D=0;continue}F<<=1,F|=O,D++,!(D!==R&&(_!==0||G!==0))&&(I=this.mul(I,M[F]),D=0,F=0)}$=26}return I},U.prototype.convertTo=function(C){var S=C.umod(this.m);return S===C?S.clone():S},U.prototype.convertFrom=function(C){var S=C.clone();return S.red=null,S},i.mont=function(C){return new V(C)};function V(N){U.call(this,N),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(V,U),V.prototype.convertTo=function(C){return this.imod(C.ushln(this.shift))},V.prototype.convertFrom=function(C){var S=this.imod(C.mul(this.rinv));return S.red=null,S},V.prototype.imul=function(C,S){if(C.isZero()||S.isZero())return C.words[0]=0,C.length=1,C;var R=C.imul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.mul=function(C,S){if(C.isZero()||S.isZero())return new i(0)._forceRed(this);var R=C.mul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.invm=function(C){var S=this.imod(C._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(t,Wr)})(bme);const Te=j3,Cme="logger/5.7.0";let WR=!1,HR=!1;const Pp={debug:1,default:2,info:2,warning:3,error:4,off:5};let GR=Pp.default,pE=null;function Eme(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const KR=Eme();var F3;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(F3||(F3={}));var ki;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ki||(ki={}));const QR="0123456789abcdef";let ee=class jr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Pp[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(GR>Pp[n])&&console.log.apply(console,r)}debug(...e){this._log(jr.levels.DEBUG,e)}info(...e){this._log(jr.levels.INFO,e)}warn(...e){this._log(jr.levels.WARNING,e)}makeError(e,r,n){if(HR)return this.makeError("censored error",r,{});r||(r=jr.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=QR[c[u]&15];s.push(l+"=Uint8Array(0x"+f+")")}else s.push(l+"="+JSON.stringify(c))}catch{s.push(l+"="+JSON.stringify(n[l].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let o="";switch(r){case ki.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case ki.CALL_EXCEPTION:case ki.INSUFFICIENT_FUNDS:case ki.MISSING_NEW:case ki.NONCE_EXPIRED:case ki.REPLACEMENT_UNDERPRICED:case ki.TRANSACTION_REPLACED:case ki.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,jr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){KR&&this.throwError("platform missing String.prototype.normalize",jr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:KR})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,jr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",jr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return pE||(pE=new jr(Cme)),pE}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),WR){if(!e)return;this.globalLogger().throwError("error censorship permanent",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}HR=!!e,WR=!!r}static setLogLevel(e){const r=Pp[e.toLowerCase()];if(r==null){jr.globalLogger().warn("invalid log level - "+e);return}GR=r}static from(e){return new jr(e)}};ee.errors=ki;ee.levels=F3;const Sme="bytes/5.7.0",yr=new ee(Sme);function oV(t){return!!t.toHexString}function vd(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return vd(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ma(t){return ze(t)&&!(t.length%2)||Ta(t)}function YR(t){return typeof t=="number"&&t==t&&t%1===0}function Ta(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!YR(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ne(t,e){if(e||(e={}),typeof t=="number"){yr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),vd(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oV(t)&&(t=t.toHexString()),ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":yr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sne(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),vd(n)}function Eo(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&yr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),vd(r)}function ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const gE="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){yr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=gE[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oV(t))return t.toHexString();if(ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":yr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Ta(t)){let r="0x";for(let n=0;n>4]+gE[s&15]}return r}return yr.throwArgumentError("invalid hexlify value","value",t)}function Io(t){if(typeof t!="string")t=te(t);else if(!ze(t)||t.length%2)return null;return(t.length-2)/2}function Sr(t,e,r){return typeof t!="string"?t=te(t):(!ze(t)||t.length%2)&&yr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function jn(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function Hl(t){const e=aV(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function aV(t){typeof t!="string"&&(t=te(t)),ze(t)||yr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&yr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function qf(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ma(t)){let r=ne(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64))):r.length===65?(e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64)),e.v=r[64]):yr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:yr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=te(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const s=sv(ne(e._vs),32);e._vs=te(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&yr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const o=te(s);e.s==null?e.s=o:e.s!==o&&yr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?yr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&yr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!ze(e.r)?yr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ht(e.r,32),e.s==null||!ze(e.s)?yr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ht(e.s,32);const r=ne(e.s);r[0]>=128&&yr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(ze(e._vs)||yr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ht(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&yr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function kme(t){return t=qf(t),te(Ht([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const lV="bignumber/5.7.0";var Ey=Te.BN;const Wo=new ee(lV),bE={},JR=9007199254740991;function $me(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}let XR=!1;class Z{constructor(e,r){e!==bE&&Wo.throwError("cannot call constructor directly; use BigNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jn(Je(this).fromTwos(e))}toTwos(e){return Jn(Je(this).toTwos(e))}abs(){return this._hex[0]==="-"?Z.from(this._hex.substring(1)):this}add(e){return Jn(Je(this).add(Je(e)))}sub(e){return Jn(Je(this).sub(Je(e)))}div(e){return Z.from(e).isZero()&&Us("division-by-zero","div"),Jn(Je(this).div(Je(e)))}mul(e){return Jn(Je(this).mul(Je(e)))}mod(e){const r=Je(e);return r.isNeg()&&Us("division-by-zero","mod"),Jn(Je(this).umod(r))}pow(e){const r=Je(e);return r.isNeg()&&Us("negative-power","pow"),Jn(Je(this).pow(r))}and(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","and"),Jn(Je(this).and(r))}or(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","or"),Jn(Je(this).or(r))}xor(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","xor"),Jn(Je(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Us("negative-width","mask"),Jn(Je(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Us("negative-width","shl"),Jn(Je(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Us("negative-width","shr"),Jn(Je(this).shrn(e))}eq(e){return Je(this).eq(Je(e))}lt(e){return Je(this).lt(Je(e))}lte(e){return Je(this).lte(Je(e))}gt(e){return Je(this).gt(Je(e))}gte(e){return Je(this).gte(Je(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Je(this).isZero()}toNumber(){try{return Je(this).toNumber()}catch{Us("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Wo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?XR||(XR=!0,Wo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Wo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):Wo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Je(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Z(bE,Sy(e)):e.match(/^-?[0-9]+$/)?new Z(bE,Sy(new Ey(e))):Wo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Us("underflow","BigNumber.from",e),(e>=JR||e<=-JR)&&Us("overflow","BigNumber.from",e),Z.from(String(e));const r=e;if(typeof r=="bigint")return Z.from(r.toString());if(Ta(r))return Z.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Z.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(ze(n)||n[0]==="-"&&ze(n.substring(1))))return Z.from(n)}return Wo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Sy(t){if(typeof t!="string")return Sy(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Wo.throwArgumentError("invalid hex","value",t),t=Sy(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jn(t){return Z.from(Sy(t))}function Je(t){const e=Z.from(t).toHexString();return e[0]==="-"?new Ey("-"+e.substring(3),16):new Ey(e.substring(2),16)}function Us(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Wo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function Ame(t){return new Ey(t,36).toString(16)}function _me(t){return new Ey(t,16).toString(36)}const Fn=new ee(lV),iv={},cV=Z.from(0),fV=Z.from(-1);function uV(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),Fn.throwError(t,ee.errors.NUMERIC_FAULT,s)}let ov="0";for(;ov.length<256;)ov+=ov;function b4(t){if(typeof t!="number")try{t=Z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+ov.substring(0,t):Fn.throwArgumentError("invalid decimal size","decimals",t)}function Tp(t,e){e==null&&(e=0);const r=b4(e);t=Z.from(t);const n=t.lt(cV);n&&(t=t.mul(fV));let s=t.mod(r).toString();for(;s.length2&&Fn.throwArgumentError("too many decimal points","value",t);let i=s[0],o=s[1];for(i||(i="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&uV("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Fn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&Fn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&Fn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new yd(iv,r,n,s)}}class on{constructor(e,r,n,s){e!==iv&&Fn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Fn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(ZR.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(ZR.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Fn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=on.from("1"+ov.substring(0,e),this.format),s=Pme.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Fn.throwArgumentError("invalid byte width","width",e);const r=Z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ht(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return on.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!$me(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),on.fromString(Tp(e,r),yd.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=yd.from(r),s=eo(e,n.decimals);!n.signed&&s.lt(cV)&&uV("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=ht(i,n.width/8));const o=Tp(s,n.decimals);return new on(iv,i,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=yd.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let s=Z.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),o=Tp(s,n.decimals);return new on(iv,i,o,n)}static from(e,r){if(typeof e=="string")return on.fromString(e,r);if(Ta(e))return on.fromBytes(e,r);try{return on.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return Fn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const ZR=on.from(1),Pme=on.from("0.5"),Tme="properties/5.7.0";var Rme=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const sb=new ee(Tme);function oe(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Ti(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function mt(t){return Rme(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function w4(t,e){(!t||typeof t!="object")&&sb.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||sb.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const Ime={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function dV(t){if(t==null||Ime[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;r_s(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&oe(e,r,_s(n))}return e}return sb.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function _s(t){return Ome(t)}class x0{constructor(e){for(const r in e)this[r]=_s(e[r])}}const C0="abi/5.7.0",tt=new ee(C0),Cf={};let e9={calldata:!0,memory:!0,storage:!0},Mme={calldata:!0,memory:!0};function Am(t,e){if(t==="bytes"||t==="string"){if(e9[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Mme[e])return!0;return(e9[e]||e==="payable")&&tt.throwArgumentError("invalid modifier","name",e),!1}function Dme(t,e){let r=t;function n(a){tt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function s(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;aJSON.parse(s.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==st.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===st.full?", ":",")+")"):r+=this.type,e!==st.sighash&&(this.indexed===!0&&(r+=" indexed"),e===st.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?qr.fromString(e,r):qr.fromObject(e)}static fromObject(e){return qr.isParamType(e)?e:new qr(Cf,{name:e.name||null,type:ku(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(qr.fromObject):null})}static fromString(e,r){function n(s){return qr.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(Dme(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function ky(t,e){return jme(t).map(r=>qr.fromString(r,e))}class mo{constructor(e,r){e!==Cf&&tt.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Rp(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return mo.isFragment(e)?e:typeof e=="string"?mo.fromString(e):mo.fromObject(e)}static fromObject(e){if(mo.isFragment(e))return e;switch(e.type){case"function":return Pi.fromObject(e);case"event":return vo.fromObject(e);case"constructor":return _i.fromObject(e);case"error":return Xo.fromObject(e);case"fallback":case"receive":return null}return tt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?vo.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Pi.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?_i.fromString(e.trim()):e.split(" ")[0]==="error"?Xo.fromString(e.substring(5).trim()):tt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class vo extends mo{format(e){if(e||(e=st.sighash),st[e]||tt.throwArgumentError("invalid format type","format",e),e===st.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==st.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===st.full?", ":",")+") ",e!==st.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?vo.fromString(e):vo.fromObject(e)}static fromObject(e){if(vo.isEventFragment(e))return e;e.type!=="event"&&tt.throwArgumentError("invalid event object","value",e);const r={name:$y(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(qr.fromObject):[],type:"event"};return new vo(Cf,r)}static fromString(e){let r=e.match(Ay);r||tt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:tt.warn("unknown modifier: "+s)}}),vo.fromObject({name:r[1].trim(),anonymous:n,inputs:ky(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function hV(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&tt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||tt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Z.from(r[1]),r[0]):t}function vV(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function yV(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&tt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&tt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&tt.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e}class _i extends mo{format(e){if(e||(e=st.sighash),st[e]||tt.throwArgumentError("invalid format type","format",e),e===st.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===st.sighash&&tt.throwError("cannot format a constructor for sighash",ee.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===st.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?_i.fromString(e):_i.fromObject(e)}static fromObject(e){if(_i.isConstructorFragment(e))return e;e.type!=="constructor"&&tt.throwArgumentError("invalid constructor object","value",e);let r=yV(e);r.constant&&tt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new _i(Cf,n)}static fromString(e){let r={type:"constructor"};e=hV(e,r);let n=e.match(Ay);return(!n||n[1].trim()!=="constructor")&&tt.throwArgumentError("invalid constructor string","value",e),r.inputs=ky(n[2].trim(),!1),vV(n[3].trim(),r),_i.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Pi extends _i{format(e){if(e||(e=st.sighash),st[e]||tt.throwArgumentError("invalid format type","format",e),e===st.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==st.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===st.full?", ":",")+") ",e!==st.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Pi.fromString(e):Pi.fromObject(e)}static fromObject(e){if(Pi.isFunctionFragment(e))return e;e.type!=="function"&&tt.throwArgumentError("invalid function object","value",e);let r=yV(e);const n={type:e.type,name:$y(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(qr.fromObject):[],outputs:e.outputs?e.outputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new Pi(Cf,n)}static fromString(e){let r={type:"function"};e=hV(e,r);let n=e.split(" returns ");n.length>2&&tt.throwArgumentError("invalid function string","value",e);let s=n[0].match(Ay);if(s||tt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&$y(r.name),r.inputs=ky(s[2],!1),vV(s[3].trim(),r),n.length>1){let i=n[1].match(Ay);(i[1].trim()!=""||i[3].trim()!="")&&tt.throwArgumentError("unexpected tokens","value",e),r.outputs=ky(i[2],!1)}else r.outputs=[];return Pi.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function t9(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&tt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Xo extends mo{format(e){if(e||(e=st.sighash),st[e]||tt.throwArgumentError("invalid format type","format",e),e===st.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==st.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===st.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Xo.fromString(e):Xo.fromObject(e)}static fromObject(e){if(Xo.isErrorFragment(e))return e;e.type!=="error"&&tt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:$y(e.name),inputs:e.inputs?e.inputs.map(qr.fromObject):[]};return t9(new Xo(Cf,r))}static fromString(e){let r={type:"error"},n=e.match(Ay);return n||tt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&$y(r.name),r.inputs=ky(n[2],!1),t9(Xo.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function ku(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Lme=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function $y(t){return(!t||!t.match(Lme))&&tt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Ay=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function jme(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&x4.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ht([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class ib{constructor(e,r,n,s){oe(this,"_data",ne(e)),oe(this,"wordSize",r||32),oe(this,"_coerceFunc",n),oe(this,"allowLoose",s),this._offset=0}get data(){return te(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):ib.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:x4.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new ib(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return Z.from(this.readBytes(this.wordSize))}}var U3={},Fme={get exports(){return U3},set exports(t){U3=t}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",s=n?window:{};s.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",o=!s.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?s=Wr:i&&(s=self);var a=!s.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],h=[6,1536,393216,100663296],v=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],p=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return Object.prototype.toString.call(O)==="[object Array]"}),l&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var E=function(O,q,z){return function(H){return new A(O,q,O).update(H)[z]()}},k=function(O,q,z){return function(H,J){return new A(O,q,J).update(H)[z]()}},$=function(O,q,z){return function(H,J,X,K){return C["cshake"+O].update(H,J,X,K)[z]()}},x=function(O,q,z){return function(H,J,X,K){return C["kmac"+O].update(H,J,X,K)[z]()}},T=function(O,q,z,H){for(var J=0;J>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var H=0;H<50;++H)this.s[H]=0}A.prototype.update=function(O){if(this.finalized)throw new Error(r);var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}for(var H=this.blocks,J=this.byteCount,X=O.length,K=this.blockCount,Q=0,ae=this.s,ie,ue;Q>2]|=O[Q]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(H[ie>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=J){for(this.start=ie-J,this.block=H[K],ie=0;ie>8,z=O&255;z>0;)J.unshift(z),O=O>>8,z=O&255,++H;return q?J.push(H):J.unshift(H),this.update(J),J.length},A.prototype.encodeString=function(O){var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}var H=0,J=O.length;if(q)H=J;else for(var X=0;X=57344?H+=3:(K=65536+((K&1023)<<10|O.charCodeAt(++X)&1023),H+=4)}return H+=this.encode(H*8),this.update(O),H},A.prototype.bytepad=function(O,q){for(var z=this.encode(q),H=0;H>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(O[0]=O[z],q=1;q>4&15]+c[Q&15]+c[Q>>12&15]+c[Q>>8&15]+c[Q>>20&15]+c[Q>>16&15]+c[Q>>28&15]+c[Q>>24&15];X%O===0&&(G(q),J=0)}return H&&(Q=q[J],K+=c[Q>>4&15]+c[Q&15],H>1&&(K+=c[Q>>12&15]+c[Q>>8&15]),H>2&&(K+=c[Q>>20&15]+c[Q>>16&15])),K},A.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,q=this.s,z=this.outputBlocks,H=this.extraBytes,J=0,X=0,K=this.outputBits>>3,Q;H?Q=new ArrayBuffer(z+1<<2):Q=new ArrayBuffer(K);for(var ae=new Uint32Array(Q);X>8&255,K[Q+2]=ae>>16&255,K[Q+3]=ae>>24&255;X%O===0&&G(q)}return H&&(Q=X<<2,ae=q[J],K[Q]=ae&255,H>1&&(K[Q+1]=ae>>8&255),H>2&&(K[Q+2]=ae>>16&255)),K};function j(O,q,z){A.call(this,O,q,z)}j.prototype=new A,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var G=function(O){var q,z,H,J,X,K,Q,ae,ie,ue,st,ke,Ae,at,me,Re,Qt,Ie,Oe,Yt,Me,De,Jt,Ne,Le,Xt,je,Fe,Zt,Be,Ct,mc,Et,St,pc,kt,$t,gc,At,_t,bc,Pt,Tt,wc,Rt,It,xc,Ot,Mt,Cc,Dt,Nt,Ec,Lt,jt,Sc,Ft,Bt,Fa,Ba,Ua,za,Va;for(H=0;H<48;H+=2)J=O[0]^O[10]^O[20]^O[30]^O[40],X=O[1]^O[11]^O[21]^O[31]^O[41],K=O[2]^O[12]^O[22]^O[32]^O[42],Q=O[3]^O[13]^O[23]^O[33]^O[43],ae=O[4]^O[14]^O[24]^O[34]^O[44],ie=O[5]^O[15]^O[25]^O[35]^O[45],ue=O[6]^O[16]^O[26]^O[36]^O[46],st=O[7]^O[17]^O[27]^O[37]^O[47],ke=O[8]^O[18]^O[28]^O[38]^O[48],Ae=O[9]^O[19]^O[29]^O[39]^O[49],q=ke^(K<<1|Q>>>31),z=Ae^(Q<<1|K>>>31),O[0]^=q,O[1]^=z,O[10]^=q,O[11]^=z,O[20]^=q,O[21]^=z,O[30]^=q,O[31]^=z,O[40]^=q,O[41]^=z,q=J^(ae<<1|ie>>>31),z=X^(ie<<1|ae>>>31),O[2]^=q,O[3]^=z,O[12]^=q,O[13]^=z,O[22]^=q,O[23]^=z,O[32]^=q,O[33]^=z,O[42]^=q,O[43]^=z,q=K^(ue<<1|st>>>31),z=Q^(st<<1|ue>>>31),O[4]^=q,O[5]^=z,O[14]^=q,O[15]^=z,O[24]^=q,O[25]^=z,O[34]^=q,O[35]^=z,O[44]^=q,O[45]^=z,q=ae^(ke<<1|Ae>>>31),z=ie^(Ae<<1|ke>>>31),O[6]^=q,O[7]^=z,O[16]^=q,O[17]^=z,O[26]^=q,O[27]^=z,O[36]^=q,O[37]^=z,O[46]^=q,O[47]^=z,q=ue^(J<<1|X>>>31),z=st^(X<<1|J>>>31),O[8]^=q,O[9]^=z,O[18]^=q,O[19]^=z,O[28]^=q,O[29]^=z,O[38]^=q,O[39]^=z,O[48]^=q,O[49]^=z,at=O[0],me=O[1],It=O[11]<<4|O[10]>>>28,xc=O[10]<<4|O[11]>>>28,Fe=O[20]<<3|O[21]>>>29,Zt=O[21]<<3|O[20]>>>29,Ba=O[31]<<9|O[30]>>>23,Ua=O[30]<<9|O[31]>>>23,Pt=O[40]<<18|O[41]>>>14,Tt=O[41]<<18|O[40]>>>14,St=O[2]<<1|O[3]>>>31,pc=O[3]<<1|O[2]>>>31,Re=O[13]<<12|O[12]>>>20,Qt=O[12]<<12|O[13]>>>20,Ot=O[22]<<10|O[23]>>>22,Mt=O[23]<<10|O[22]>>>22,Be=O[33]<<13|O[32]>>>19,Ct=O[32]<<13|O[33]>>>19,za=O[42]<<2|O[43]>>>30,Va=O[43]<<2|O[42]>>>30,Lt=O[5]<<30|O[4]>>>2,jt=O[4]<<30|O[5]>>>2,kt=O[14]<<6|O[15]>>>26,$t=O[15]<<6|O[14]>>>26,Ie=O[25]<<11|O[24]>>>21,Oe=O[24]<<11|O[25]>>>21,Cc=O[34]<<15|O[35]>>>17,Dt=O[35]<<15|O[34]>>>17,mc=O[45]<<29|O[44]>>>3,Et=O[44]<<29|O[45]>>>3,Ne=O[6]<<28|O[7]>>>4,Le=O[7]<<28|O[6]>>>4,Sc=O[17]<<23|O[16]>>>9,Ft=O[16]<<23|O[17]>>>9,gc=O[26]<<25|O[27]>>>7,At=O[27]<<25|O[26]>>>7,Yt=O[36]<<21|O[37]>>>11,Me=O[37]<<21|O[36]>>>11,Nt=O[47]<<24|O[46]>>>8,Ec=O[46]<<24|O[47]>>>8,wc=O[8]<<27|O[9]>>>5,Rt=O[9]<<27|O[8]>>>5,Xt=O[18]<<20|O[19]>>>12,je=O[19]<<20|O[18]>>>12,Bt=O[29]<<7|O[28]>>>25,Fa=O[28]<<7|O[29]>>>25,_t=O[38]<<8|O[39]>>>24,bc=O[39]<<8|O[38]>>>24,De=O[48]<<14|O[49]>>>18,Jt=O[49]<<14|O[48]>>>18,O[0]=at^~Re&Ie,O[1]=me^~Qt&Oe,O[10]=Ne^~Xt&Fe,O[11]=Le^~je&Zt,O[20]=St^~kt&gc,O[21]=pc^~$t&At,O[30]=wc^~It&Ot,O[31]=Rt^~xc&Mt,O[40]=Lt^~Sc&Bt,O[41]=jt^~Ft&Fa,O[2]=Re^~Ie&Yt,O[3]=Qt^~Oe&Me,O[12]=Xt^~Fe&Be,O[13]=je^~Zt&Ct,O[22]=kt^~gc&_t,O[23]=$t^~At&bc,O[32]=It^~Ot&Cc,O[33]=xc^~Mt&Dt,O[42]=Sc^~Bt&Ba,O[43]=Ft^~Fa&Ua,O[4]=Ie^~Yt&De,O[5]=Oe^~Me&Jt,O[14]=Fe^~Be&mc,O[15]=Zt^~Ct&Et,O[24]=gc^~_t&Pt,O[25]=At^~bc&Tt,O[34]=Ot^~Cc&Nt,O[35]=Mt^~Dt&Ec,O[44]=Bt^~Ba&za,O[45]=Fa^~Ua&Va,O[6]=Yt^~De&at,O[7]=Me^~Jt&me,O[16]=Be^~mc&Ne,O[17]=Ct^~Et&Le,O[26]=_t^~Pt&St,O[27]=bc^~Tt&pc,O[36]=Cc^~Nt&wc,O[37]=Dt^~Ec&Rt,O[46]=Ba^~za&Lt,O[47]=Ua^~Va&jt,O[8]=De^~at&Re,O[9]=Jt^~me&Qt,O[18]=mc^~Ne&Xt,O[19]=Et^~Le&je,O[28]=Pt^~St&kt,O[29]=Tt^~pc&$t,O[38]=Nt^~wc&It,O[39]=Ec^~Rt&xc,O[48]=za^~Lt&Sc,O[49]=Va^~jt&Ft,O[0]^=y[H],O[1]^=y[H+1]};if(a)t.exports=C;else for(R=0;R>=8;return e}function nR(t,e,r){let n=0;for(let s=0;se+1+n&&oo.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function gV(t,e){if(t.length===0&&oo.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&oo.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=nR(t,e+1,r);return e+1+r+n>t.length&&oo.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),sR(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),sR(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=nR(t,e+1,r);e+1+r+n>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const s=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&oo.throwError("data too short",ee.errors.BUFFER_OVERRUN,{});const n=te(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:te(t[e])}}function Iw(t){const e=ne(t),r=gV(e,0);return r.consumed!==e.length&&oo.throwArgumentError("invalid rlp data","data",t),r.result}const qme=Object.freeze(Object.defineProperty({__proto__:null,decode:Iw,encode:Ef},Symbol.toStringTag,{value:"Module"})),Wme="address/5.7.0",hl=new ee(Wme);function iR(t){ze(t,20)||hl.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=ne(Ue(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const Hme=9007199254740991;function Gme(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const C4={};for(let t=0;t<10;t++)C4[String(t)]=String(t);for(let t=0;t<26;t++)C4[String.fromCharCode(65+t)]=String(10+t);const oR=Math.floor(Gme(Hme));function bV(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>C4[n]).join("");for(;e.length>=oR;){let n=e.substring(0,oR);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Ye(t){let e=null;if(typeof t!="string"&&hl.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=iR(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&hl.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==bV(t)&&hl.throwArgumentError("bad icap checksum","address",t),e=Pme(t.substring(4));e.length<40;)e="0"+e;e=iR("0x"+e)}else hl.throwArgumentError("invalid address","address",t);return e}function wV(t){try{return Ye(t),!0}catch{}return!1}function Kme(t){let e=Tme(Ye(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+bV("XE00"+e)+e}function E4(t){let e=null;try{e=Ye(t.from)}catch{hl.throwArgumentError("missing from address","transaction",t)}const r=Eo(ne(Z.from(t.nonce).toHexString()));return Ye(Sr(Ue(Ef([e,r])),12))}function Qme(t,e,r){return Io(e)!==32&&hl.throwArgumentError("salt must be 32 bytes","salt",e),Io(r)!==32&&hl.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ye(Sr(Ue(Ht(["0xff",Ye(t),e,r])),12))}class Yme extends Ra{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ye(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ye(ht(e.readValue().toHexString(),20))}}class Jme extends Ra{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const Wu=new ee(C0);function xV(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Wu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Wu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Wu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Wu.throwArgumentError("types/value length mismatch","tuple",r);let s=new B3(t.wordSize),i=new B3(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=i.length;l.encode(i,f);let d=s.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(s,f)}),o.forEach(l=>{l(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function CV(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=i.decode(l)}catch(c){if(c.code===ee.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}o!=null&&r.push(o)});const s=e.reduce((i,o)=>{const a=o.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});e.forEach((i,o)=>{let a=i.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let i=0;i{throw o}})}return Object.freeze(r)}class Xme extends Ra{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Wu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;o++)i++;return i}return t===es.OVERRUN?r.length-e-1:0}function lpe(t,e,r,n,s){return t===es.OVERLONG?(n.push(s),0):(n.push(65533),AV(t,e,r))}const _V=Object.freeze({error:ape,ignore:AV,replace:lpe});function S4(t,e){e==null&&(e=_V.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(s);continue}let i=null,o=null;if((s&224)===192)i=1,o=127;else if((s&240)===224)i=2,o=2047;else if((s&248)===240)i=3,o=65535;else{(s&192)===128?n+=e(es.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(es.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(es.OVERRUN,n-1,t,r);continue}let a=s&(1<<8-i-1)-1;for(let l=0;l1114111){n+=e(es.OUT_OF_RANGE,n-1-i,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(es.UTF16_SURROGATE,n-1-i,t,r,a);continue}if(a<=o){n+=e(es.OVERLONG,n-1-i,t,r,a);continue}r.push(a)}}return r}function xt(t,e=pa.current){e!=pa.current&&($V.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((s&1023)<<10)+(i&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return ne(r)}function wE(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function cpe(t,e){return'"'+S4(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?wE(r):(r-=65536,wE((r>>10&1023)+55296)+wE((r&1023)+56320))}).join("")+'"'}function z3(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ia(t,e){return z3(S4(t,e))}function ab(t,e=pa.current){return S4(xt(t,e))}function fpe(t){const e=xt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(Ht([e,ob]).slice(0,32))}function upe(t){const e=ne(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Ia(e.slice(0,r))}function dpe(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function PV(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function $4(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const hpe=PV("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),vpe="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),ype=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],mpe=k4("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),ppe=k4("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),gpe=k4("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",dpe),bpe=PV("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function wpe(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function xpe(t){return!!$4(t,hpe)}function Cpe(t){let e=$4(t,ype);if(e)return[t+e.s];let r=mpe[t];if(r)return r;let n=ppe[t];if(n)return[t+n[0]];let s=gpe[t];return s||null}function Epe(t){return!!$4(t,bpe)}function Spe(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=ab(t);e=wpe(e.map(n=>{if(vpe.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=Cpe(n);return s||[n]})),e=ab(z3(e),pa.NFKC),e.forEach(n=>{if(Epe(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(xpe(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=z3(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class kpe extends EV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,xt(r))}decode(e){return Ia(super.decode(e))}}class _m extends Ra{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return xV(e,this.coders,r)}decode(e){return e.coerce(this.name,CV(e,this.coders))}}const Pm=new ee(C0),$pe=new RegExp(/^bytes([0-9]*)$/),Ape=new RegExp(/^(u?int)([0-9]*)$/);class A4{constructor(e){oe(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Yme(e.name);case"bool":return new Zme(e.name);case"string":return new kpe(e.name);case"bytes":return new epe(e.name);case"array":return new Xme(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _m((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new rpe(e.name)}let r=e.type.match(Ape);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Pm.throwArgumentError("invalid "+r[1]+" bit length","param",e),new ipe(n/8,r[1]==="int",e.name)}if(r=e.type.match($pe),r){let n=parseInt(r[1]);return(n===0||n>32)&&Pm.throwArgumentError("invalid bytes length","param",e),new tpe(n,e.name)}return Pm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new ib(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new B3(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(qr.from(s)));return new _m(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Pm.throwError("types/values length mismatch",ee.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(qr.from(o))),s=new _m(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>this._getCoder(qr.from(o)));return new _m(s,"_").decode(this._getReader(ne(r),n))}}const Gn=new A4;function vl(t){return Ue(xt(t))}const TV="hash/5.7.0";function _4(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?s(a,o-1):r.push(a)})};return s(t,e),r}function Ppe(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,v=h>>1,y=d-1;let g=0;for(let k=0;k1;){let L=$+x>>>1;k>>1|f(),T=T<<1^h,B=(B^h)<<1|h|1;p=T,w=1+B-T}let E=n-4;return b.map(k=>{switch(k-E){case 3:return E+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return E+256+(t[a++]<<8|t[a++]);case 1:return E+t[a++];default:return k-1}})}function Rpe(t){let e=0;return()=>t[e++]}function Ipe(t){return Rpe(Tpe(t))}function Ope(t){return t&1?~t>>1:t>>1}function Mpe(t,e){let r=Array(t);for(let n=0;ne[o]):r}function Npe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(jpe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Fpe(r,t))}return Ppe(RV(e))}function Lpe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function IV(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[o].push(i));return n}function jpe(t,e){let r=1+e(),n=e(),s=Lpe(e),i=IV(s.length,1+t,e);return RV(i.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(s[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function Fpe(t,e){let r=1+e();return IV(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Bpe(t){let e=lb(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let c=lb(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let s=t(),i=s%3;s=s/3|0;let o=!!(s&1);s>>=1;let a=s==1,l=s==2;return{branches:n,valid:i,fe0f:o,save:a,check:l}}}function Upe(){return Ipe(_4("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Ow=Upe(),zpe=new Set(lb(Ow)),Vpe=new Set(lb(Ow)),qpe=Npe(Ow),Wpe=Bpe(Ow),lR=45,cR=95;function OV(t){return ab(t)}function Hpe(t){return t.filter(e=>e!=65039)}function MV(t){for(let e of t.split(".")){let r=OV(e);try{for(let n=r.lastIndexOf(cR)-1;n>=0;n--)if(r[n]!==cR)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===lR&&r[3]===lR)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Gpe(t){return MV(Kpe(t,Hpe))}function Kpe(t,e){let r=OV(t).reverse(),n=[];for(;r.length;){let s=Ype(r);if(s){n.push(...e(s));continue}let i=r.pop();if(zpe.has(i)){n.push(i);continue}if(Vpe.has(i))continue;let o=qpe[i];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return MV(Qpe(String.fromCodePoint(...n)))}function Qpe(t){return t.normalize("NFC")}function Ype(t,e){var r;let n=Wpe,s,i,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=l;else if(n.check&&l===i)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(s=o.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return s}const Jpe=new ee(TV),DV=new Uint8Array(32);DV.fill(0);function fR(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function T4(t){const e=xt(Gpe(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(fR(e.slice(n))),r}function Xpe(t){try{return T4(t).length!==0}catch{}return!1}function av(t){typeof t!="string"&&Jpe.throwArgumentError("invalid ENS name; not a string","name",t);let e=DV;const r=T4(t);for(;r.length;)e=Ue(Ht([e,Ue(r.pop())]));return te(e)}function NV(t){return te(Ht(T4(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const Zpe=`Ethereum Signed Message: -`;function R4(t){return typeof t=="string"&&(t=xt(t)),Ue(Ht([xt(Zpe),xt(String(t.length)),t]))}var ege=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new ee(TV),LV=new Uint8Array(32);LV.fill(0);const tge=Z.from(-1),jV=Z.from(0),FV=Z.from(1),rge=Z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function nge(t){const e=ne(t),r=e.length%32;return r?jn([e,LV.slice(r)]):te(e)}const sge=ht(FV.toHexString(),32),ige=ht(jV.toHexString(),32),uR={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},xE=["name","version","chainId","verifyingContract","salt"];function dR(t){return function(e){return typeof e!="string"&&ir.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const oge={name:dR("name"),version:dR("version"),chainId:function(t){try{return Z.from(t).toString()}catch{}return ir.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ye(t).toLowerCase()}catch{}return ir.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ne(t);if(e.length!==32)throw new Error("bad length");return te(e)}catch{}return ir.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function CE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ir.throwArgumentError("invalid numeric width","type",t);const s=rge.mask(r?n-1:n),i=r?s.add(FV).mul(tge):jV;return function(o){const a=Z.from(o);return(a.lt(i)||a.gt(s))&&ir.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ht(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&ir.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&ir.throwArgumentError(`invalid length for ${t}`,"value",n),nge(n)}}}switch(t){case"address":return function(e){return ht(Ye(e),32)};case"bool":return function(e){return e?sge:ige};case"bytes":return function(e){return Ue(e)};case"string":return function(e){return vl(e)}}return null}function hR(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Yr{constructor(e){oe(this,"types",Object.freeze(_s(e))),oe(this,"_encoderCache",{}),oe(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],s[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&ir.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!CE(f)&&(n[f]||ir.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const i=Object.keys(n).filter(a=>n[a].length===0);i.length===0?ir.throwArgumentError("missing primary type","types",e):i.length>1&&ir.throwArgumentError(`ambiguous primary types or unused types: ${i.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),oe(this,"primaryType",i[0]);function o(a,l){l[a]&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{s[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in s){const l=Object.keys(s[a]);l.sort(),this._types[a]=hR(a,e[a])+l.map(c=>hR(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=CE(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(i);return this._types[s]&&(l=l.map(Ue)),Ue(jn(l))}}const n=this.types[e];if(n){const s=vl(this._types[e]);return i=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(i[a]);return this._types[l]?Ue(c):c});return o.unshift(s),jn(o)}}return ir.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||ir.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ue(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(CE(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const o=s[1],a=parseInt(s[3]);return a>=0&&r.length!==a&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const i=this.types[e];return i?i.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):ir.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Yr(e)}static getPrimaryType(e){return Yr.from(e).primaryType}static hashStruct(e,r,n){return Yr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=uR[n];s||ir.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>xE.indexOf(n.name)-xE.indexOf(s.name)),Yr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return jn(["0x1901",Yr.hashDomain(e),Yr.from(r).hash(n)])}static hash(e,r,n){return Ue(Yr.encode(e,r,n))}static resolveNames(e,r,n,s){return ege(this,void 0,void 0,function*(){e=Gt(e);const i={};e.verifyingContract&&!ze(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Yr.from(r);o.visit(n,(a,l)=>(a==="address"&&!ze(l,20)&&(i[l]="0x"),l));for(const a in i)i[a]=yield s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&i[l]?i[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Yr.hashDomain(e);const s={},i=[];xE.forEach(l=>{const c=e[l];c!=null&&(s[l]=oge[l](c),i.push({name:l,type:uR[l]}))});const o=Yr.from(r),a=Gt(r);return a.EIP712Domain?ir.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return te(ne(c));if(l.match(/^u?int/))return Z.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&ir.throwArgumentError("invalid string","value",c),c}return ir.throwArgumentError("unsupported type","type",l)})}}}const nr=new ee(C0);class BV extends x0{}class UV extends x0{}class age extends x0{}class cb extends x0{static isIndexed(e){return!!(e&&e._isIndexed)}}const lge={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function vR(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class en{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,oe(this,"fragments",r.map(n=>po.from(n)).filter(n=>n!=null)),oe(this,"_abiCoder",Ti(new.target,"getAbiCoder")()),oe(this,"functions",{}),oe(this,"errors",{}),oe(this,"events",{}),oe(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){nr.warn("duplicate definition - constructor");return}oe(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){nr.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||oe(this,"deploy",_i.from({payable:!1,type:"constructor"})),oe(this,"_isInterface",!0)}format(e){e||(e=it.full),e===it.sighash&&nr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===it.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Gn}static getAddress(e){return Ye(e)}static getSighash(e){return Sr(vl(e.format()),0,4)}static getEventTopic(e){return vl(e.format())}getFunction(e){if(ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];nr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching function","name",n):s.length>1&&nr.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[Pi.fromString(e).format()];return r||nr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(ze(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];nr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching event","name",n):s.length>1&&nr.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[yo.fromString(e).format()];return r||nr.throwArgumentError("no matching event","signature",e),r}getError(e){if(ze(e)){const n=Ti(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}nr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching error","name",n):s.length>1&&nr.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[Pi.fromString(e).format()];return r||nr.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Ti(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Ti(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&nr.throwArgumentError(`data signature does not match error ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),te(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&nr.throwArgumentError(`data signature does not match function ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),s=null,i="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=te(n.slice(0,4)),f=lge[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(s=o[0]),a==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return nr.throwError("call revert exception"+i,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:l,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&nr.throwError("too many arguments for "+e.format(),ee.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const s=(i,o)=>i.type==="string"?vl(o):i.type==="bytes"?Ue(te(o)):(i.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),i.type.match(/^u?int/)&&(o=Z.from(o).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[o]),ht(te(o),32));for(r.forEach((i,o)=>{let a=e.inputs[o];if(!a.indexed){i!=null&&nr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?nr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(l=>s(a,l))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&nr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(vl(l));else if(o.type==="bytes")n.push(Ue(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else s.push(o),i.push(l)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!ze(n[0],32)||n[0].toLowerCase()!==d)&&nr.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let s=[],i=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(qr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(i.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(s,Ht(n)):null,l=this._abiCoder.decode(i,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new cb({_isIndexed:!0,hash:null});else if(o[h])c[h]=new cb({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(v){c[h]=v}else try{c[h]=l[f++]}catch(v){c[h]=v}if(d.name&&c[d.name]==null){const v=c[h];v instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw vR(`property ${JSON.stringify(d.name)}`,v)}}):c[d.name]=v}});for(let d=0;d{throw vR(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new UV({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new BV({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=te(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new age({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const cge="abstract-provider/5.7.0";var fge=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const uge=new ee(cge);class dge extends x0{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class uc{constructor(){uge.checkAbstract(new.target,uc),oe(this,"_isProvider",!0)}getFeeData(){return fge(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield mt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Z.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const hge="abstract-signer/5.7.0";var mi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const zs=new ee(hge),vge=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],yge=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let Sf=class zV{constructor(){zs.checkAbstract(new.target,zV),oe(this,"_isSigner",!0)}getBalance(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return mi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield mt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return mi(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield mt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return mi(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)vge.indexOf(n)===-1&&zs.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&zs.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return mi(this,void 0,void 0,function*(){const r=yield mt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>mi(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&zs.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?zs.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&zs.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&zs.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):zs.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(yge.indexOf(s.code)>=0)throw s;return zs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&zs.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield mt(r)})}_checkProvider(e){this.provider||zs.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class I4 extends Sf{constructor(e,r){super(),oe(this,"address",e),oe(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{zs.throwError(e,ee.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new I4(this.address,e)}}var Ln={},et={},E0=VV;function VV(t,e){if(!t)throw new Error(e||"Assertion failed")}VV.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var V3={},yR={get exports(){return V3},set exports(t){V3=t}};typeof Object.create=="function"?yR.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yR.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var mge=E0,pge=V3;et.inherits=pge;function gge(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function bge(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),s=0;s>6|192,r[n++]=i&63|128):gge(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}et.htonl=qV;function xge(t,e){for(var r="",n=0;n>>0}return i}et.join32=Cge;function Ege(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}et.split32=Ege;function Sge(t,e){return t>>>e|t<<32-e}et.rotr32=Sge;function kge(t,e){return t<>>32-e}et.rotl32=kge;function $ge(t,e){return t+e>>>0}et.sum32=$ge;function Age(t,e,r){return t+e+r>>>0}et.sum32_3=Age;function _ge(t,e,r,n){return t+e+r+n>>>0}et.sum32_4=_ge;function Pge(t,e,r,n,s){return t+e+r+n+s>>>0}et.sum32_5=Pge;function Tge(t,e,r,n){var s=t[e],i=t[e+1],o=n+i>>>0,a=(o>>0,t[e+1]=o}et.sum64=Tge;function Rge(t,e,r,n){var s=e+n>>>0,i=(s>>0}et.sum64_hi=Rge;function Ige(t,e,r,n){var s=e+n;return s>>>0}et.sum64_lo=Ige;function Oge(t,e,r,n,s,i,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}et.sum64_4_hi=Oge;function Mge(t,e,r,n,s,i,o,a){var l=e+n+i+a;return l>>>0}et.sum64_4_lo=Mge;function Dge(t,e,r,n,s,i,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}et.sum64_5_hi=Dge;function Nge(t,e,r,n,s,i,o,a,l,c){var f=e+n+i+a+c;return f>>>0}et.sum64_5_lo=Nge;function Lge(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}et.rotr64_hi=Lge;function jge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.rotr64_lo=jge;function Fge(t,e,r){return t>>>r}et.shr64_hi=Fge;function Bge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.shr64_lo=Bge;var Ph={},mR=et,Uge=E0;function Mw(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ph.BlockHash=Mw;Mw.prototype.update=function(e,r){if(e=mR.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=mR.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,o=8;o>>3}jo.g0_256=Hge;function Gge(t){return So(t,17)^So(t,19)^t>>>10}jo.g1_256=Gge;var zd=et,Kge=Ph,Qge=jo,EE=zd.rotl32,h1=zd.sum32,Yge=zd.sum32_5,Jge=Qge.ft_1,YV=Kge.BlockHash,Xge=[1518500249,1859775393,2400959708,3395469782];function Oo(){if(!(this instanceof Oo))return new Oo;YV.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zd.inherits(Oo,YV);var Zge=Oo;Oo.blockSize=512;Oo.outSize=160;Oo.hmacStrength=80;Oo.padLength=64;Oo.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),Bbe(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function s(o){return o.length===1?"0"+o:o}r.zero2=s;function i(o){for(var a="",l=0;l(d>>1)-1?y=(d>>1)-g:y=g,h.isubn(y)):y=0,u[v]=y,h.iushrn(1)}return u}r.getNAF=n;function s(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var v=l.andln(3)+u&3,y=c.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var g;v&1?(h=l.andln(7)+u&7,(h===3||h===5)&&y===2?g=-v:g=v):g=0,f[0].push(g);var b;y&1?(h=c.andln(7)+d&7,(h===3||h===5)&&v===2?b=-y:b=y):b=0,f[1].push(b),2*u===g+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=s;function i(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=i;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Te(l,"hex","le")}r.intFromLE=a}),fb=Ls.getNAF,Vbe=Ls.getJSF,ub=Ls.assert;function dc(t,e){this.type=t,this.p=new Te(e.p,16),this.red=e.prime?Te.red(e.prime):Te.mont(this.p),this.zero=new Te(0).toRed(this.red),this.one=new Te(1).toRed(this.red),this.two=new Te(2).toRed(this.red),this.n=e.n&&new Te(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Wf=dc;dc.prototype.point=function(){throw new Error("Not implemented")};dc.prototype.validate=function(){throw new Error("Not implemented")};dc.prototype._fixedNafMul=function(e,r){ub(e.precomputed);var n=e._getDoubles(),s=fb(r,1,this._bitLength),i=(1<=a;c--)l=(l<<1)+s[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];ub(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(i[f-1>>1]):a=a.mixedAdd(i[-f-1>>1].neg()):f>0?a=a.add(i[f-1>>1]):a=a.add(i[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};dc.prototype._wnafMulAdd=function(e,r,n,s,i){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var v=f-1,y=f;if(o[v]!==1||o[y]!==1){l[v]=fb(n[v],o[v],this._bitLength),l[y]=fb(n[y],o[y],this._bitLength),c=Math.max(l[v].length,c),c=Math.max(l[y].length,c);continue}var g=[r[v],null,null,r[y]];r[v].y.cmp(r[y].y)===0?(g[1]=r[v].add(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg())):r[v].y.cmp(r[y].y.redNeg())===0?(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].add(r[y].neg())):(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],p=Vbe(n[v],n[y]);for(c=Math.max(p[0].length,c),l[v]=new Array(c),l[y]=new Array(c),u=0;u=0;f--){for(var x=0;f>=0;){var T=!0;for(u=0;u=0&&x++,k=k.dblp(x),f<0)break;for(u=0;u0?d=a[u][B-1>>1]:B<0&&(d=a[u][-B-1>>1].neg()),d.type==="affine"?k=k.mixedAdd(d):k=k.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};fi.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(h=c,v=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),v=v.neg()),[{a:u,b:d},{a:h,b:v}]};ui.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),l=o.mul(s.a),c=i.mul(n.b),f=o.mul(s.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};ui.prototype.pointFromX=function(e,r){e=new Te(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};ui.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};ui.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""};rn.prototype.isInfinity=function(){return this.inf};rn.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};rn.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};rn.prototype.getX=function(){return this.x.fromRed()};rn.prototype.getY=function(){return this.y.fromRed()};rn.prototype.mul=function(e){return e=new Te(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};rn.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};rn.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};rn.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};rn.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};rn.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function hn(t,e,r,n){Wf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Te(0)):(this.x=new Te(e,16),this.y=new Te(r,16),this.z=new Te(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}M4(hn,Wf.BasePoint);ui.prototype.jpoint=function(e,r,n){return new hn(this,e,r,n)};hn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};hn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};hn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=s.redSub(i),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=s.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),v=c.redMul(d.redISub(h)).redISub(o.redMul(u)),y=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,v,y)};hn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(s),l=i.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(i.redMul(f)),v=this.z.redMul(a);return this.curve.jpoint(d,h,v)};hn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};hn.prototype.inspect=function(){return this.isInfinity()?"":""};hn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ip=Ih(function(t,e){var r=e;r.base=Wf,r.short=Wbe,r.mont=null,r.edwards=null}),Op=Ih(function(t,e){var r=e,n=Ls.assert;function s(a){a.type==="short"?this.curve=new Ip.short(a):a.type==="edwards"?this.curve=new Ip.edwards(a):this.curve=new Ip.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=s;function i(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new s(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ln.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ln.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ln.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ln.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ln.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ln.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ln.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ln.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Gl(t){if(!(this instanceof Gl))return new Gl(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ri.toArray(t.entropy,t.entropyEnc||"hex"),r=Ri.toArray(t.nonce,t.nonceEnc||"hex"),n=Ri.toArray(t.pers,t.persEnc||"hex");O4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var lq=Gl;Gl.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Gl.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=Ri.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var Hbe=Ls.assert;function Dw(t,e){if(t instanceof Dw)return t;this._importDER(t,e)||(Hbe(t.r&&t.s,"Signature without r or s"),this.r=new Te(t.r,16),this.s=new Te(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Nw=Dw;function Gbe(){this.place=0}function $E(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,o=e.place;i>>=0;return s<=127?!1:(e.place=o,s)}function wR(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Dw.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=wR(r),n=wR(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];AE(s,r.length),s=s.concat(r),s.push(2),AE(s,n.length);var i=s.concat(n),o=[48];return AE(o,i.length),o=o.concat(i),Ls.encode(o,e)};var Kbe=function(){throw new Error("unsupported")},cq=Ls.assert;function ii(t){if(!(this instanceof ii))return new ii(t);typeof t=="string"&&(cq(Object.prototype.hasOwnProperty.call(Op,t),"Unknown curve "+t),t=Op[t]),t instanceof Op.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Qbe=ii;ii.prototype.keyPair=function(e){return new D4(this,e)};ii.prototype.keyFromPrivate=function(e,r){return D4.fromPrivate(this,e,r)};ii.prototype.keyFromPublic=function(e,r){return D4.fromPublic(this,e,r)};ii.prototype.genKeyPair=function(e){e||(e={});for(var r=new lq({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Kbe(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new Te(2));;){var i=new Te(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};ii.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};ii.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Te(e,16));for(var i=this.n.byteLength(),o=r.getPrivate().toArray("be",i),a=e.toArray("be",i),l=new lq({hash:this.hash,entropy:o,nonce:a,pers:s.pers,persEnc:s.persEnc||"utf8"}),c=this.n.sub(new Te(1)),f=0;;f++){var u=s.k?s.k(f):new Te(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),v=h.umod(this.n);if(v.cmpn(0)!==0){var y=u.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var g=(d.getY().isOdd()?1:0)|(h.cmp(v)!==0?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new Nw({r:v,s:y,recoveryParam:g})}}}}}};ii.prototype.verify=function(e,r,n,s){e=this._truncateToN(new Te(e,16)),n=this.keyFromPublic(n,s),r=new Nw(r,"hex");var i=r.r,o=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(i).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(i)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(i)===0)};ii.prototype.recoverPubKey=function(t,e,r,n){cq((3&r)===r,"The recovery param is more than two bits"),e=new Nw(e,n);var s=this.n,i=new Te(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(s),u=s.sub(i).mul(f).umod(s),d=a.mul(f).umod(s);return this.g.mulAdd(u,o,d)};ii.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Nw(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var Ybe=Ih(function(t,e){var r=e;r.version="6.5.4",r.utils=Ls,r.rand=function(){throw new Error("unsupported")},r.curve=Ip,r.curves=Op,r.ec=Qbe,r.eddsa=null}),Jbe=Ybe.ec;const Xbe="signing-key/5.7.0",G3=new ee(Xbe);let _E=null;function ao(){return _E||(_E=new Jbe("secp256k1")),_E}class db{constructor(e){oe(this,"curve","secp256k1"),oe(this,"privateKey",te(e)),Io(this.privateKey)!==32&&G3.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ao().keyFromPrivate(ne(this.privateKey));oe(this,"publicKey","0x"+r.getPublic(!1,"hex")),oe(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),oe(this,"_isSigningKey",!0)}_addPoint(e){const r=ao().keyFromPublic(ne(this.publicKey)),n=ao().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=ao().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&G3.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return qf({recoveryParam:s.recoveryParam,r:ht("0x"+s.r.toString(16),32),s:ht("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=ao().keyFromPrivate(ne(this.privateKey)),n=ao().keyFromPublic(ne(N4(e)));return ht("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function fq(t,e){const r=qf(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+ao().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function N4(t,e){const r=ne(t);if(r.length===32){const n=new db(r);return e?"0x"+ao().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+ao().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ao().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return G3.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Zbe="transactions/5.7.0",Cn=new ee(Zbe);var K3;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(K3||(K3={}));function L4(t){return t==="0x"?null:Ye(t)}function xn(t){return t==="0x"?rr:Z.from(t)}const e2e=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],t2e={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function j4(t){const e=N4(t);return Ye(Sr(Ue(Sr(e,1)),12))}function $f(t,e){return j4(fq(ne(t),e))}function bs(t,e){const r=Eo(Z.from(t).toHexString());return r.length>32&&Cn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function PE(t,e){return{address:Ye(t),storageKeys:(e||[]).map((r,n)=>(Io(r)!==32&&Cn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Hf(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Cn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),PE(r[0],r[1])):PE(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return PE(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function uq(t){return Hf(t).map(e=>[e.address,e.storageKeys])}function dq(t,e){if(t.gasPrice!=null){const n=Z.from(t.gasPrice),s=Z.from(t.maxFeePerGas||0);n.eq(s)||Cn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),bs(t.maxFeePerGas||0,"maxFeePerGas"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x02",Ef(r)])}function hq(t,e){const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.gasPrice||0,"gasPrice"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x01",Ef(r)])}function r2e(t,e){w4(t,t2e);const r=[];e2e.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=ne(te(a,l)),o.length&&a.length!==o.length&&a.length>0&&Cn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Eo(a),a.length>o.maxLength&&Cn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(te(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Cn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!ma(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(te(n)),r.push("0x"),r.push("0x")),!e)return Ef(r);const s=qf(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(i)),r.push(Eo(ne(s.r))),r.push(Eo(ne(s.s))),Ef(r)}function n2e(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Cn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),r2e(t,e);switch(t.type){case 1:return hq(t,e);case 2:return dq(t,e)}return Cn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function vq(t,e,r){try{const n=xn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Cn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ht(e[1],32),t.s=ht(e[2],32);try{const n=Ue(r(t));t.from=$f(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function s2e(t){const e=Iw(t.slice(1));e.length!==9&&e.length!==12&&Cn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=xn(e[2]),n=xn(e[3]),s={type:2,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:xn(e[4]),to:L4(e[5]),value:xn(e[6]),data:e[7],accessList:Hf(e[8])};return e.length===9||(s.hash=Ue(t),vq(s,e.slice(9),dq)),s}function i2e(t){const e=Iw(t.slice(1));e.length!==8&&e.length!==11&&Cn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),gasPrice:xn(e[2]),gasLimit:xn(e[3]),to:L4(e[4]),value:xn(e[5]),data:e[6],accessList:Hf(e[7])};return e.length===8||(r.hash=Ue(t),vq(r,e.slice(8),hq)),r}function o2e(t){const e=Iw(t);e.length!==9&&e.length!==6&&Cn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:xn(e[0]).toNumber(),gasPrice:xn(e[1]),gasLimit:xn(e[2]),to:L4(e[3]),value:xn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Z.from(e[6]).toNumber()}catch{return r}if(r.r=ht(e[7],32),r.s=ht(e[8],32),Z.from(r.r).isZero()&&Z.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const s=e.slice(0,6);r.chainId!==0&&(s.push(te(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Ue(Ef(s));try{r.from=$f(i,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Ue(t)}return r.type=null,r}function yq(t){const e=ne(t);if(e[0]>127)return o2e(e);switch(e[0]){case 1:return i2e(e);case 2:return s2e(e)}return Cn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const a2e="contracts/5.7.0";var Af=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Er=new ee(a2e);function hb(t,e){return Af(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Er.throwArgumentError("invalid address or ENS name","name",r);try{return Ye(r)}catch{}t||Er.throwError("a provider or signer is needed to resolve ENS names",ee.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Er.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Mp(t,e,r){return Af(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>Mp(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield hb(t,e):r.type==="tuple"?yield Mp(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Mp(t,n,r.arrayChildren))):Promise.reject(Er.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Lw(t,e,r){return Af(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),Er.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=mt({override:hb(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Af(this,void 0,void 0,function*(){return Ye(c.signer)!==c.override&&Er.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=hb(t.provider,n.from));const s=yield mt({args:Mp(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:mt(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),o={data:i,to:s.address},a=s.overrides;if(a.nonce!=null&&(o.nonce=Z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=Z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=Z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=Z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=Z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Hf(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=ne(i);for(let u=0;un[c]!=null);return l.length&&Er.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function l2e(t,e){return function(...r){return Lw(t,e,r)}}function c2e(t,e){const r=t.signer||t.provider;return function(...n){return Af(this,void 0,void 0,function*(){r||Er.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield Lw(t,e,n);return yield r.estimateGas(s)})}}function f2e(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let o=_s(i),a=null;try{a=t.interface.parseLog(i)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(s.blockHash),o.getTransaction=()=>t.provider.getTransaction(s.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(s),o}),s))}function mq(t,e,r){const n=t.signer||t.provider;return function(...s){return Af(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const l=Gt(s.pop());l.blockTag!=null&&(i=yield l.blockTag),delete l.blockTag,s.push(l)}t.deployTransaction!=null&&(yield t._deployed(i));const o=yield Lw(t,e,s),a=yield n.call(o,i);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===ee.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=s,l.transaction=o),l}})}}function u2e(t,e){return function(...r){return Af(this,void 0,void 0,function*(){t.signer||Er.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Lw(t,e,r),s=yield t.signer.sendTransaction(n);return f2e(t,s),s})}}function xR(t,e,r){return e.constant?mq(t,e,r):u2e(t,e)}function pq(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class _y{constructor(e,r){oe(this,"tag",e),oe(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class d2e extends _y{constructor(){super("error",null)}}class CR extends _y{constructor(e,r,n,s){const i={address:e};let o=r.getEventTopic(n);s?(o!==s[0]&&Er.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[o],super(pq(i),i),oe(this,"address",e),oe(this,"interface",r),oe(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=mV(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class ER extends _y{constructor(e,r){super("*",{address:e}),oe(this,"address",e),oe(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class h2e{constructor(e,r,n){oe(this,"interface",Ti(new.target,"getInterface")(r)),n==null?(oe(this,"provider",null),oe(this,"signer",null)):Sf.isSigner(n)?(oe(this,"provider",n.provider||null),oe(this,"signer",n)):uc.isProvider(n)?(oe(this,"provider",n),oe(this,"signer",null)):Er.throwArgumentError("invalid signer or provider","signerOrProvider",n),oe(this,"callStatic",{}),oe(this,"estimateGas",{}),oe(this,"functions",{}),oe(this,"populateTransaction",{}),oe(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];oe(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?oe(this.filters,a,this.filters[l[0]]):Er.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(oe(this,"_runningEvents",{}),oe(this,"_wrappedEmits",{}),e==null&&Er.throwArgumentError("invalid contract address or ENS name","addressOrName",e),oe(this,"address",e),this.provider)oe(this,"resolvedAddress",hb(this.provider,e));else try{oe(this,"resolvedAddress",Promise.resolve(Ye(e)))}catch{Er.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const s={},i={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(i[o]){Er.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}i[o]=!0;{const l=a.name;s[`%${l}`]||(s[`%${l}`]=[]),s[`%${l}`].push(o)}this[o]==null&&oe(this,o,xR(this,a,!0)),this.functions[o]==null&&oe(this.functions,o,xR(this,a,!1)),this.callStatic[o]==null&&oe(this.callStatic,o,mq(this,a,!0)),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,l2e(this,a)),this.estimateGas[o]==null&&oe(this.estimateGas,o,c2e(this,a))}),Object.keys(s).forEach(o=>{const a=s[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&oe(this,o,this[l])}catch{}this.functions[o]==null&&oe(this.functions,o,this.functions[l]),this.callStatic[o]==null&&oe(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&oe(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return E4(e)}static getInterface(e){return en.isInterface(e)?e:new en(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Er.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Er.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Er.throwError("cannot override "+n,ee.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new I4(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&oe(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return cb.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new d2e);if(e==="event")return this._normalizeRunningEvent(new _y("event",null));if(e==="*")return this._normalizeRunningEvent(new ER(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new CR(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const s=this.interface.getEvent(n);return this._normalizeRunningEvent(new CR(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _y(pq(r),r))}return this._normalizeRunningEvent(new ER(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const s=_s(r);return s.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||Er.throwError("events require a provider or a signer with a provider",ee.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const s=i=>{let o=this._wrapEvent(e,i,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=Gt(s.filter);return typeof r=="string"&&ze(r,32)?(n!=null&&Er.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(o=>o.map(a=>this._wrapEvent(s,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),s=n.run(r)>0;return this._checkRunningEvents(n),s}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Oh extends h2e{}class gq{constructor(e){oe(this,"alphabet",e),oe(this,"base",e.length),oe(this,"_alphabetMap",{}),oe(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=ne(Py(s,t,l));i||(i=d.length,f=new Uint8Array(i),o=Math.ceil(n/i),c=n-(o-1)*i),f.set(d);for(let y=1;y>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var H=0;H<50;++H)this.s[H]=0}$.prototype.update=function(O){if(this.finalized)throw new Error(r);var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}for(var H=this.blocks,J=this.byteCount,X=O.length,K=this.blockCount,Q=0,ae=this.s,ie,ue;Q>2]|=O[Q]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(H[ie>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=J){for(this.start=ie-J,this.block=H[K],ie=0;ie>8,z=O&255;z>0;)J.unshift(z),O=O>>8,z=O&255,++H;return q?J.push(H):J.unshift(H),this.update(J),J.length},$.prototype.encodeString=function(O){var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}var H=0,J=O.length;if(q)H=J;else for(var X=0;X=57344?H+=3:(K=65536+((K&1023)<<10|O.charCodeAt(++X)&1023),H+=4)}return H+=this.encode(H*8),this.update(O),H},$.prototype.bytepad=function(O,q){for(var z=this.encode(q),H=0;H>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(O[0]=O[z],q=1;q>4&15]+c[Q&15]+c[Q>>12&15]+c[Q>>8&15]+c[Q>>20&15]+c[Q>>16&15]+c[Q>>28&15]+c[Q>>24&15];X%O===0&&(G(q),J=0)}return H&&(Q=q[J],K+=c[Q>>4&15]+c[Q&15],H>1&&(K+=c[Q>>12&15]+c[Q>>8&15]),H>2&&(K+=c[Q>>20&15]+c[Q>>16&15])),K},$.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,q=this.s,z=this.outputBlocks,H=this.extraBytes,J=0,X=0,K=this.outputBits>>3,Q;H?Q=new ArrayBuffer(z+1<<2):Q=new ArrayBuffer(K);for(var ae=new Uint32Array(Q);X>8&255,K[Q+2]=ae>>16&255,K[Q+3]=ae>>24&255;X%O===0&&G(q)}return H&&(Q=X<<2,ae=q[J],K[Q]=ae&255,H>1&&(K[Q+1]=ae>>8&255),H>2&&(K[Q+2]=ae>>16&255)),K};function j(O,q,z){$.call(this,O,q,z)}j.prototype=new $,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),$.prototype.finalize.call(this)};var G=function(O){var q,z,H,J,X,K,Q,ae,ie,ue,nt,ke,Ae,at,me,Re,Qt,Ie,Oe,Yt,Me,De,Jt,Ne,Le,Xt,je,Fe,Zt,Be,Ct,mc,Et,St,pc,kt,$t,gc,At,_t,bc,Pt,Tt,wc,Rt,It,xc,Ot,Mt,Cc,Dt,Nt,Ec,Lt,jt,Sc,Ft,Bt,Fa,Ba,Ua,za,Va;for(H=0;H<48;H+=2)J=O[0]^O[10]^O[20]^O[30]^O[40],X=O[1]^O[11]^O[21]^O[31]^O[41],K=O[2]^O[12]^O[22]^O[32]^O[42],Q=O[3]^O[13]^O[23]^O[33]^O[43],ae=O[4]^O[14]^O[24]^O[34]^O[44],ie=O[5]^O[15]^O[25]^O[35]^O[45],ue=O[6]^O[16]^O[26]^O[36]^O[46],nt=O[7]^O[17]^O[27]^O[37]^O[47],ke=O[8]^O[18]^O[28]^O[38]^O[48],Ae=O[9]^O[19]^O[29]^O[39]^O[49],q=ke^(K<<1|Q>>>31),z=Ae^(Q<<1|K>>>31),O[0]^=q,O[1]^=z,O[10]^=q,O[11]^=z,O[20]^=q,O[21]^=z,O[30]^=q,O[31]^=z,O[40]^=q,O[41]^=z,q=J^(ae<<1|ie>>>31),z=X^(ie<<1|ae>>>31),O[2]^=q,O[3]^=z,O[12]^=q,O[13]^=z,O[22]^=q,O[23]^=z,O[32]^=q,O[33]^=z,O[42]^=q,O[43]^=z,q=K^(ue<<1|nt>>>31),z=Q^(nt<<1|ue>>>31),O[4]^=q,O[5]^=z,O[14]^=q,O[15]^=z,O[24]^=q,O[25]^=z,O[34]^=q,O[35]^=z,O[44]^=q,O[45]^=z,q=ae^(ke<<1|Ae>>>31),z=ie^(Ae<<1|ke>>>31),O[6]^=q,O[7]^=z,O[16]^=q,O[17]^=z,O[26]^=q,O[27]^=z,O[36]^=q,O[37]^=z,O[46]^=q,O[47]^=z,q=ue^(J<<1|X>>>31),z=nt^(X<<1|J>>>31),O[8]^=q,O[9]^=z,O[18]^=q,O[19]^=z,O[28]^=q,O[29]^=z,O[38]^=q,O[39]^=z,O[48]^=q,O[49]^=z,at=O[0],me=O[1],It=O[11]<<4|O[10]>>>28,xc=O[10]<<4|O[11]>>>28,Fe=O[20]<<3|O[21]>>>29,Zt=O[21]<<3|O[20]>>>29,Ba=O[31]<<9|O[30]>>>23,Ua=O[30]<<9|O[31]>>>23,Pt=O[40]<<18|O[41]>>>14,Tt=O[41]<<18|O[40]>>>14,St=O[2]<<1|O[3]>>>31,pc=O[3]<<1|O[2]>>>31,Re=O[13]<<12|O[12]>>>20,Qt=O[12]<<12|O[13]>>>20,Ot=O[22]<<10|O[23]>>>22,Mt=O[23]<<10|O[22]>>>22,Be=O[33]<<13|O[32]>>>19,Ct=O[32]<<13|O[33]>>>19,za=O[42]<<2|O[43]>>>30,Va=O[43]<<2|O[42]>>>30,Lt=O[5]<<30|O[4]>>>2,jt=O[4]<<30|O[5]>>>2,kt=O[14]<<6|O[15]>>>26,$t=O[15]<<6|O[14]>>>26,Ie=O[25]<<11|O[24]>>>21,Oe=O[24]<<11|O[25]>>>21,Cc=O[34]<<15|O[35]>>>17,Dt=O[35]<<15|O[34]>>>17,mc=O[45]<<29|O[44]>>>3,Et=O[44]<<29|O[45]>>>3,Ne=O[6]<<28|O[7]>>>4,Le=O[7]<<28|O[6]>>>4,Sc=O[17]<<23|O[16]>>>9,Ft=O[16]<<23|O[17]>>>9,gc=O[26]<<25|O[27]>>>7,At=O[27]<<25|O[26]>>>7,Yt=O[36]<<21|O[37]>>>11,Me=O[37]<<21|O[36]>>>11,Nt=O[47]<<24|O[46]>>>8,Ec=O[46]<<24|O[47]>>>8,wc=O[8]<<27|O[9]>>>5,Rt=O[9]<<27|O[8]>>>5,Xt=O[18]<<20|O[19]>>>12,je=O[19]<<20|O[18]>>>12,Bt=O[29]<<7|O[28]>>>25,Fa=O[28]<<7|O[29]>>>25,_t=O[38]<<8|O[39]>>>24,bc=O[39]<<8|O[38]>>>24,De=O[48]<<14|O[49]>>>18,Jt=O[49]<<14|O[48]>>>18,O[0]=at^~Re&Ie,O[1]=me^~Qt&Oe,O[10]=Ne^~Xt&Fe,O[11]=Le^~je&Zt,O[20]=St^~kt&gc,O[21]=pc^~$t&At,O[30]=wc^~It&Ot,O[31]=Rt^~xc&Mt,O[40]=Lt^~Sc&Bt,O[41]=jt^~Ft&Fa,O[2]=Re^~Ie&Yt,O[3]=Qt^~Oe&Me,O[12]=Xt^~Fe&Be,O[13]=je^~Zt&Ct,O[22]=kt^~gc&_t,O[23]=$t^~At&bc,O[32]=It^~Ot&Cc,O[33]=xc^~Mt&Dt,O[42]=Sc^~Bt&Ba,O[43]=Ft^~Fa&Ua,O[4]=Ie^~Yt&De,O[5]=Oe^~Me&Jt,O[14]=Fe^~Be&mc,O[15]=Zt^~Ct&Et,O[24]=gc^~_t&Pt,O[25]=At^~bc&Tt,O[34]=Ot^~Cc&Nt,O[35]=Mt^~Dt&Ec,O[44]=Bt^~Ba&za,O[45]=Fa^~Ua&Va,O[6]=Yt^~De&at,O[7]=Me^~Jt&me,O[16]=Be^~mc&Ne,O[17]=Ct^~Et&Le,O[26]=_t^~Pt&St,O[27]=bc^~Tt&pc,O[36]=Cc^~Nt&wc,O[37]=Dt^~Ec&Rt,O[46]=Ba^~za&Lt,O[47]=Ua^~Va&jt,O[8]=De^~at&Re,O[9]=Jt^~me&Qt,O[18]=mc^~Ne&Xt,O[19]=Et^~Le&je,O[28]=Pt^~St&kt,O[29]=Tt^~pc&$t,O[38]=Nt^~wc&It,O[39]=Ec^~Rt&xc,O[48]=za^~Lt&Sc,O[49]=Va^~jt&Ft,O[0]^=y[H],O[1]^=y[H+1]};if(a)t.exports=C;else for(R=0;R>=8;return e}function n9(t,e,r){let n=0;for(let s=0;se+1+n&&io.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function gV(t,e){if(t.length===0&&io.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&io.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=n9(t,e+1,r);return e+1+r+n>t.length&&io.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),s9(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),s9(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=n9(t,e+1,r);e+1+r+n>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const s=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&io.throwError("data too short",ee.errors.BUFFER_OVERRUN,{});const n=te(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:te(t[e])}}function Iw(t){const e=ne(t),r=gV(e,0);return r.consumed!==e.length&&io.throwArgumentError("invalid rlp data","data",t),r.result}const zme=Object.freeze(Object.defineProperty({__proto__:null,decode:Iw,encode:Ef},Symbol.toStringTag,{value:"Module"})),Vme="address/5.7.0",hl=new ee(Vme);function i9(t){ze(t,20)||hl.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=ne(Ue(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const qme=9007199254740991;function Wme(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const C4={};for(let t=0;t<10;t++)C4[String(t)]=String(t);for(let t=0;t<26;t++)C4[String.fromCharCode(65+t)]=String(10+t);const o9=Math.floor(Wme(qme));function bV(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>C4[n]).join("");for(;e.length>=o9;){let n=e.substring(0,o9);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Ye(t){let e=null;if(typeof t!="string"&&hl.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=i9(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&hl.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==bV(t)&&hl.throwArgumentError("bad icap checksum","address",t),e=Ame(t.substring(4));e.length<40;)e="0"+e;e=i9("0x"+e)}else hl.throwArgumentError("invalid address","address",t);return e}function wV(t){try{return Ye(t),!0}catch{}return!1}function Hme(t){let e=_me(Ye(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+bV("XE00"+e)+e}function E4(t){let e=null;try{e=Ye(t.from)}catch{hl.throwArgumentError("missing from address","transaction",t)}const r=Eo(ne(Z.from(t.nonce).toHexString()));return Ye(Sr(Ue(Ef([e,r])),12))}function Gme(t,e,r){return Io(e)!==32&&hl.throwArgumentError("salt must be 32 bytes","salt",e),Io(r)!==32&&hl.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ye(Sr(Ue(Ht(["0xff",Ye(t),e,r])),12))}class Kme extends Ra{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ye(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ye(ht(e.readValue().toHexString(),20))}}class Qme extends Ra{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const Wu=new ee(C0);function xV(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Wu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Wu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Wu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Wu.throwArgumentError("types/value length mismatch","tuple",r);let s=new B3(t.wordSize),i=new B3(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=i.length;l.encode(i,f);let d=s.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(s,f)}),o.forEach(l=>{l(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function CV(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=i.decode(l)}catch(c){if(c.code===ee.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}o!=null&&r.push(o)});const s=e.reduce((i,o)=>{const a=o.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});e.forEach((i,o)=>{let a=i.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let i=0;i{throw o}})}return Object.freeze(r)}class Yme extends Ra{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Wu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;o++)i++;return i}return t===es.OVERRUN?r.length-e-1:0}function ope(t,e,r,n,s){return t===es.OVERLONG?(n.push(s),0):(n.push(65533),AV(t,e,r))}const _V=Object.freeze({error:ipe,ignore:AV,replace:ope});function S4(t,e){e==null&&(e=_V.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(s);continue}let i=null,o=null;if((s&224)===192)i=1,o=127;else if((s&240)===224)i=2,o=2047;else if((s&248)===240)i=3,o=65535;else{(s&192)===128?n+=e(es.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(es.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(es.OVERRUN,n-1,t,r);continue}let a=s&(1<<8-i-1)-1;for(let l=0;l1114111){n+=e(es.OUT_OF_RANGE,n-1-i,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(es.UTF16_SURROGATE,n-1-i,t,r,a);continue}if(a<=o){n+=e(es.OVERLONG,n-1-i,t,r,a);continue}r.push(a)}}return r}function xt(t,e=pa.current){e!=pa.current&&($V.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((s&1023)<<10)+(i&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return ne(r)}function wE(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function ape(t,e){return'"'+S4(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?wE(r):(r-=65536,wE((r>>10&1023)+55296)+wE((r&1023)+56320))}).join("")+'"'}function z3(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ia(t,e){return z3(S4(t,e))}function ab(t,e=pa.current){return S4(xt(t,e))}function lpe(t){const e=xt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(Ht([e,ob]).slice(0,32))}function cpe(t){const e=ne(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Ia(e.slice(0,r))}function fpe(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function PV(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function $4(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const upe=PV("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),dpe="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),hpe=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],vpe=k4("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),ype=k4("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),mpe=k4("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",fpe),ppe=PV("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function gpe(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function bpe(t){return!!$4(t,upe)}function wpe(t){let e=$4(t,hpe);if(e)return[t+e.s];let r=vpe[t];if(r)return r;let n=ype[t];if(n)return[t+n[0]];let s=mpe[t];return s||null}function xpe(t){return!!$4(t,ppe)}function Cpe(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=ab(t);e=gpe(e.map(n=>{if(dpe.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=wpe(n);return s||[n]})),e=ab(z3(e),pa.NFKC),e.forEach(n=>{if(xpe(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(bpe(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=z3(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class Epe extends EV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,xt(r))}decode(e){return Ia(super.decode(e))}}class _m extends Ra{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return xV(e,this.coders,r)}decode(e){return e.coerce(this.name,CV(e,this.coders))}}const Pm=new ee(C0),Spe=new RegExp(/^bytes([0-9]*)$/),kpe=new RegExp(/^(u?int)([0-9]*)$/);class A4{constructor(e){oe(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Kme(e.name);case"bool":return new Jme(e.name);case"string":return new Epe(e.name);case"bytes":return new Xme(e.name);case"array":return new Yme(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _m((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new epe(e.name)}let r=e.type.match(kpe);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Pm.throwArgumentError("invalid "+r[1]+" bit length","param",e),new npe(n/8,r[1]==="int",e.name)}if(r=e.type.match(Spe),r){let n=parseInt(r[1]);return(n===0||n>32)&&Pm.throwArgumentError("invalid bytes length","param",e),new Zme(n,e.name)}return Pm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new ib(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new B3(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(qr.from(s)));return new _m(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Pm.throwError("types/values length mismatch",ee.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(qr.from(o))),s=new _m(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>this._getCoder(qr.from(o)));return new _m(s,"_").decode(this._getReader(ne(r),n))}}const Gn=new A4;function vl(t){return Ue(xt(t))}const TV="hash/5.7.0";function _4(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?s(a,o-1):r.push(a)})};return s(t,e),r}function Ape(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,v=h>>1,y=d-1;let g=0;for(let k=0;k1;){let L=A+x>>>1;k>>1|f(),T=T<<1^h,B=(B^h)<<1|h|1;p=T,w=1+B-T}let E=n-4;return b.map(k=>{switch(k-E){case 3:return E+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return E+256+(t[a++]<<8|t[a++]);case 1:return E+t[a++];default:return k-1}})}function Ppe(t){let e=0;return()=>t[e++]}function Tpe(t){return Ppe(_pe(t))}function Rpe(t){return t&1?~t>>1:t>>1}function Ipe(t,e){let r=Array(t);for(let n=0;ne[o]):r}function Mpe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Npe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Lpe(r,t))}return Ape(RV(e))}function Dpe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function IV(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[o].push(i));return n}function Npe(t,e){let r=1+e(),n=e(),s=Dpe(e),i=IV(s.length,1+t,e);return RV(i.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(s[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function Lpe(t,e){let r=1+e();return IV(r,1+t,e).map(s=>[s[0],s.slice(1)])}function jpe(t){let e=lb(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let c=lb(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let s=t(),i=s%3;s=s/3|0;let o=!!(s&1);s>>=1;let a=s==1,l=s==2;return{branches:n,valid:i,fe0f:o,save:a,check:l}}}function Fpe(){return Tpe(_4("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Ow=Fpe(),Bpe=new Set(lb(Ow)),Upe=new Set(lb(Ow)),zpe=Mpe(Ow),Vpe=jpe(Ow),l9=45,c9=95;function OV(t){return ab(t)}function qpe(t){return t.filter(e=>e!=65039)}function MV(t){for(let e of t.split(".")){let r=OV(e);try{for(let n=r.lastIndexOf(c9)-1;n>=0;n--)if(r[n]!==c9)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===l9&&r[3]===l9)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Wpe(t){return MV(Hpe(t,qpe))}function Hpe(t,e){let r=OV(t).reverse(),n=[];for(;r.length;){let s=Kpe(r);if(s){n.push(...e(s));continue}let i=r.pop();if(Bpe.has(i)){n.push(i);continue}if(Upe.has(i))continue;let o=zpe[i];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return MV(Gpe(String.fromCodePoint(...n)))}function Gpe(t){return t.normalize("NFC")}function Kpe(t,e){var r;let n=Vpe,s,i,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=l;else if(n.check&&l===i)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(s=o.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return s}const Qpe=new ee(TV),DV=new Uint8Array(32);DV.fill(0);function f9(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function T4(t){const e=xt(Wpe(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(f9(e.slice(n))),r}function Ype(t){try{return T4(t).length!==0}catch{}return!1}function av(t){typeof t!="string"&&Qpe.throwArgumentError("invalid ENS name; not a string","name",t);let e=DV;const r=T4(t);for(;r.length;)e=Ue(Ht([e,Ue(r.pop())]));return te(e)}function NV(t){return te(Ht(T4(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const Jpe=`Ethereum Signed Message: +`;function R4(t){return typeof t=="string"&&(t=xt(t)),Ue(Ht([xt(Jpe),xt(String(t.length)),t]))}var Xpe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new ee(TV),LV=new Uint8Array(32);LV.fill(0);const Zpe=Z.from(-1),jV=Z.from(0),FV=Z.from(1),ege=Z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function tge(t){const e=ne(t),r=e.length%32;return r?jn([e,LV.slice(r)]):te(e)}const rge=ht(FV.toHexString(),32),nge=ht(jV.toHexString(),32),u9={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},xE=["name","version","chainId","verifyingContract","salt"];function d9(t){return function(e){return typeof e!="string"&&ir.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const sge={name:d9("name"),version:d9("version"),chainId:function(t){try{return Z.from(t).toString()}catch{}return ir.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ye(t).toLowerCase()}catch{}return ir.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ne(t);if(e.length!==32)throw new Error("bad length");return te(e)}catch{}return ir.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function CE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ir.throwArgumentError("invalid numeric width","type",t);const s=ege.mask(r?n-1:n),i=r?s.add(FV).mul(Zpe):jV;return function(o){const a=Z.from(o);return(a.lt(i)||a.gt(s))&&ir.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ht(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&ir.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&ir.throwArgumentError(`invalid length for ${t}`,"value",n),tge(n)}}}switch(t){case"address":return function(e){return ht(Ye(e),32)};case"bool":return function(e){return e?rge:nge};case"bytes":return function(e){return Ue(e)};case"string":return function(e){return vl(e)}}return null}function h9(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Yr{constructor(e){oe(this,"types",Object.freeze(_s(e))),oe(this,"_encoderCache",{}),oe(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],s[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&ir.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!CE(f)&&(n[f]||ir.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const i=Object.keys(n).filter(a=>n[a].length===0);i.length===0?ir.throwArgumentError("missing primary type","types",e):i.length>1&&ir.throwArgumentError(`ambiguous primary types or unused types: ${i.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),oe(this,"primaryType",i[0]);function o(a,l){l[a]&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{s[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in s){const l=Object.keys(s[a]);l.sort(),this._types[a]=h9(a,e[a])+l.map(c=>h9(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=CE(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(i);return this._types[s]&&(l=l.map(Ue)),Ue(jn(l))}}const n=this.types[e];if(n){const s=vl(this._types[e]);return i=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(i[a]);return this._types[l]?Ue(c):c});return o.unshift(s),jn(o)}}return ir.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||ir.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ue(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(CE(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const o=s[1],a=parseInt(s[3]);return a>=0&&r.length!==a&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const i=this.types[e];return i?i.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):ir.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Yr(e)}static getPrimaryType(e){return Yr.from(e).primaryType}static hashStruct(e,r,n){return Yr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=u9[n];s||ir.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>xE.indexOf(n.name)-xE.indexOf(s.name)),Yr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return jn(["0x1901",Yr.hashDomain(e),Yr.from(r).hash(n)])}static hash(e,r,n){return Ue(Yr.encode(e,r,n))}static resolveNames(e,r,n,s){return Xpe(this,void 0,void 0,function*(){e=Gt(e);const i={};e.verifyingContract&&!ze(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Yr.from(r);o.visit(n,(a,l)=>(a==="address"&&!ze(l,20)&&(i[l]="0x"),l));for(const a in i)i[a]=yield s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&i[l]?i[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Yr.hashDomain(e);const s={},i=[];xE.forEach(l=>{const c=e[l];c!=null&&(s[l]=sge[l](c),i.push({name:l,type:u9[l]}))});const o=Yr.from(r),a=Gt(r);return a.EIP712Domain?ir.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return te(ne(c));if(l.match(/^u?int/))return Z.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&ir.throwArgumentError("invalid string","value",c),c}return ir.throwArgumentError("unsupported type","type",l)})}}}const nr=new ee(C0);class BV extends x0{}class UV extends x0{}class ige extends x0{}class cb extends x0{static isIndexed(e){return!!(e&&e._isIndexed)}}const oge={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v9(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class en{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,oe(this,"fragments",r.map(n=>mo.from(n)).filter(n=>n!=null)),oe(this,"_abiCoder",Ti(new.target,"getAbiCoder")()),oe(this,"functions",{}),oe(this,"errors",{}),oe(this,"events",{}),oe(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){nr.warn("duplicate definition - constructor");return}oe(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){nr.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||oe(this,"deploy",_i.from({payable:!1,type:"constructor"})),oe(this,"_isInterface",!0)}format(e){e||(e=st.full),e===st.sighash&&nr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===st.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Gn}static getAddress(e){return Ye(e)}static getSighash(e){return Sr(vl(e.format()),0,4)}static getEventTopic(e){return vl(e.format())}getFunction(e){if(ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];nr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching function","name",n):s.length>1&&nr.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[Pi.fromString(e).format()];return r||nr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(ze(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];nr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching event","name",n):s.length>1&&nr.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[vo.fromString(e).format()];return r||nr.throwArgumentError("no matching event","signature",e),r}getError(e){if(ze(e)){const n=Ti(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}nr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching error","name",n):s.length>1&&nr.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[Pi.fromString(e).format()];return r||nr.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Ti(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Ti(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&nr.throwArgumentError(`data signature does not match error ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),te(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&nr.throwArgumentError(`data signature does not match function ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),s=null,i="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=te(n.slice(0,4)),f=oge[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(s=o[0]),a==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return nr.throwError("call revert exception"+i,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:l,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&nr.throwError("too many arguments for "+e.format(),ee.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const s=(i,o)=>i.type==="string"?vl(o):i.type==="bytes"?Ue(te(o)):(i.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),i.type.match(/^u?int/)&&(o=Z.from(o).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[o]),ht(te(o),32));for(r.forEach((i,o)=>{let a=e.inputs[o];if(!a.indexed){i!=null&&nr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?nr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(l=>s(a,l))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&nr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(vl(l));else if(o.type==="bytes")n.push(Ue(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else s.push(o),i.push(l)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!ze(n[0],32)||n[0].toLowerCase()!==d)&&nr.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let s=[],i=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(qr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(i.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(s,Ht(n)):null,l=this._abiCoder.decode(i,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new cb({_isIndexed:!0,hash:null});else if(o[h])c[h]=new cb({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(v){c[h]=v}else try{c[h]=l[f++]}catch(v){c[h]=v}if(d.name&&c[d.name]==null){const v=c[h];v instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw v9(`property ${JSON.stringify(d.name)}`,v)}}):c[d.name]=v}});for(let d=0;d{throw v9(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new UV({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new BV({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=te(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new ige({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const age="abstract-provider/5.7.0";var lge=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const cge=new ee(age);class fge extends x0{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class uc{constructor(){cge.checkAbstract(new.target,uc),oe(this,"_isProvider",!0)}getFeeData(){return lge(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield mt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Z.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const uge="abstract-signer/5.7.0";var mi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const zs=new ee(uge),dge=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],hge=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let Sf=class zV{constructor(){zs.checkAbstract(new.target,zV),oe(this,"_isSigner",!0)}getBalance(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return mi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield mt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return mi(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield mt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return mi(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)dge.indexOf(n)===-1&&zs.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&zs.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return mi(this,void 0,void 0,function*(){const r=yield mt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>mi(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&zs.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?zs.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&zs.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&zs.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):zs.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(hge.indexOf(s.code)>=0)throw s;return zs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&zs.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield mt(r)})}_checkProvider(e){this.provider||zs.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class I4 extends Sf{constructor(e,r){super(),oe(this,"address",e),oe(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{zs.throwError(e,ee.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new I4(this.address,e)}}var Ln={},et={},E0=VV;function VV(t,e){if(!t)throw new Error(e||"Assertion failed")}VV.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var V3={},y9={get exports(){return V3},set exports(t){V3=t}};typeof Object.create=="function"?y9.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:y9.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var vge=E0,yge=V3;et.inherits=yge;function mge(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function pge(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),s=0;s>6|192,r[n++]=i&63|128):mge(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}et.htonl=qV;function bge(t,e){for(var r="",n=0;n>>0}return i}et.join32=wge;function xge(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}et.split32=xge;function Cge(t,e){return t>>>e|t<<32-e}et.rotr32=Cge;function Ege(t,e){return t<>>32-e}et.rotl32=Ege;function Sge(t,e){return t+e>>>0}et.sum32=Sge;function kge(t,e,r){return t+e+r>>>0}et.sum32_3=kge;function $ge(t,e,r,n){return t+e+r+n>>>0}et.sum32_4=$ge;function Age(t,e,r,n,s){return t+e+r+n+s>>>0}et.sum32_5=Age;function _ge(t,e,r,n){var s=t[e],i=t[e+1],o=n+i>>>0,a=(o>>0,t[e+1]=o}et.sum64=_ge;function Pge(t,e,r,n){var s=e+n>>>0,i=(s>>0}et.sum64_hi=Pge;function Tge(t,e,r,n){var s=e+n;return s>>>0}et.sum64_lo=Tge;function Rge(t,e,r,n,s,i,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}et.sum64_4_hi=Rge;function Ige(t,e,r,n,s,i,o,a){var l=e+n+i+a;return l>>>0}et.sum64_4_lo=Ige;function Oge(t,e,r,n,s,i,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}et.sum64_5_hi=Oge;function Mge(t,e,r,n,s,i,o,a,l,c){var f=e+n+i+a+c;return f>>>0}et.sum64_5_lo=Mge;function Dge(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}et.rotr64_hi=Dge;function Nge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.rotr64_lo=Nge;function Lge(t,e,r){return t>>>r}et.shr64_hi=Lge;function jge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.shr64_lo=jge;var Ph={},m9=et,Fge=E0;function Mw(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ph.BlockHash=Mw;Mw.prototype.update=function(e,r){if(e=m9.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=m9.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,o=8;o>>3}jo.g0_256=qge;function Wge(t){return So(t,17)^So(t,19)^t>>>10}jo.g1_256=Wge;var zd=et,Hge=Ph,Gge=jo,EE=zd.rotl32,h1=zd.sum32,Kge=zd.sum32_5,Qge=Gge.ft_1,YV=Hge.BlockHash,Yge=[1518500249,1859775393,2400959708,3395469782];function Oo(){if(!(this instanceof Oo))return new Oo;YV.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zd.inherits(Oo,YV);var Jge=Oo;Oo.blockSize=512;Oo.outSize=160;Oo.hmacStrength=80;Oo.padLength=64;Oo.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),jbe(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function s(o){return o.length===1?"0"+o:o}r.zero2=s;function i(o){for(var a="",l=0;l(d>>1)-1?y=(d>>1)-g:y=g,h.isubn(y)):y=0,u[v]=y,h.iushrn(1)}return u}r.getNAF=n;function s(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var v=l.andln(3)+u&3,y=c.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var g;v&1?(h=l.andln(7)+u&7,(h===3||h===5)&&y===2?g=-v:g=v):g=0,f[0].push(g);var b;y&1?(h=c.andln(7)+d&7,(h===3||h===5)&&v===2?b=-y:b=y):b=0,f[1].push(b),2*u===g+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=s;function i(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=i;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Te(l,"hex","le")}r.intFromLE=a}),fb=Ls.getNAF,Ube=Ls.getJSF,ub=Ls.assert;function dc(t,e){this.type=t,this.p=new Te(e.p,16),this.red=e.prime?Te.red(e.prime):Te.mont(this.p),this.zero=new Te(0).toRed(this.red),this.one=new Te(1).toRed(this.red),this.two=new Te(2).toRed(this.red),this.n=e.n&&new Te(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Wf=dc;dc.prototype.point=function(){throw new Error("Not implemented")};dc.prototype.validate=function(){throw new Error("Not implemented")};dc.prototype._fixedNafMul=function(e,r){ub(e.precomputed);var n=e._getDoubles(),s=fb(r,1,this._bitLength),i=(1<=a;c--)l=(l<<1)+s[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];ub(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(i[f-1>>1]):a=a.mixedAdd(i[-f-1>>1].neg()):f>0?a=a.add(i[f-1>>1]):a=a.add(i[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};dc.prototype._wnafMulAdd=function(e,r,n,s,i){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var v=f-1,y=f;if(o[v]!==1||o[y]!==1){l[v]=fb(n[v],o[v],this._bitLength),l[y]=fb(n[y],o[y],this._bitLength),c=Math.max(l[v].length,c),c=Math.max(l[y].length,c);continue}var g=[r[v],null,null,r[y]];r[v].y.cmp(r[y].y)===0?(g[1]=r[v].add(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg())):r[v].y.cmp(r[y].y.redNeg())===0?(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].add(r[y].neg())):(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],p=Ube(n[v],n[y]);for(c=Math.max(p[0].length,c),l[v]=new Array(c),l[y]=new Array(c),u=0;u=0;f--){for(var x=0;f>=0;){var T=!0;for(u=0;u=0&&x++,k=k.dblp(x),f<0)break;for(u=0;u0?d=a[u][B-1>>1]:B<0&&(d=a[u][-B-1>>1].neg()),d.type==="affine"?k=k.mixedAdd(d):k=k.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};fi.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(h=c,v=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),v=v.neg()),[{a:u,b:d},{a:h,b:v}]};ui.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),l=o.mul(s.a),c=i.mul(n.b),f=o.mul(s.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};ui.prototype.pointFromX=function(e,r){e=new Te(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};ui.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};ui.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""};rn.prototype.isInfinity=function(){return this.inf};rn.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};rn.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};rn.prototype.getX=function(){return this.x.fromRed()};rn.prototype.getY=function(){return this.y.fromRed()};rn.prototype.mul=function(e){return e=new Te(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};rn.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};rn.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};rn.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};rn.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};rn.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function hn(t,e,r,n){Wf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Te(0)):(this.x=new Te(e,16),this.y=new Te(r,16),this.z=new Te(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}M4(hn,Wf.BasePoint);ui.prototype.jpoint=function(e,r,n){return new hn(this,e,r,n)};hn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};hn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};hn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=s.redSub(i),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=s.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),v=c.redMul(d.redISub(h)).redISub(o.redMul(u)),y=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,v,y)};hn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(s),l=i.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(i.redMul(f)),v=this.z.redMul(a);return this.curve.jpoint(d,h,v)};hn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};hn.prototype.inspect=function(){return this.isInfinity()?"":""};hn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ip=Ih(function(t,e){var r=e;r.base=Wf,r.short=Vbe,r.mont=null,r.edwards=null}),Op=Ih(function(t,e){var r=e,n=Ls.assert;function s(a){a.type==="short"?this.curve=new Ip.short(a):a.type==="edwards"?this.curve=new Ip.edwards(a):this.curve=new Ip.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=s;function i(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new s(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ln.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ln.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ln.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ln.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ln.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ln.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ln.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ln.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Gl(t){if(!(this instanceof Gl))return new Gl(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ri.toArray(t.entropy,t.entropyEnc||"hex"),r=Ri.toArray(t.nonce,t.nonceEnc||"hex"),n=Ri.toArray(t.pers,t.persEnc||"hex");O4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var lq=Gl;Gl.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Gl.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=Ri.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var qbe=Ls.assert;function Dw(t,e){if(t instanceof Dw)return t;this._importDER(t,e)||(qbe(t.r&&t.s,"Signature without r or s"),this.r=new Te(t.r,16),this.s=new Te(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Nw=Dw;function Wbe(){this.place=0}function $E(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,o=e.place;i>>=0;return s<=127?!1:(e.place=o,s)}function w9(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Dw.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=w9(r),n=w9(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];AE(s,r.length),s=s.concat(r),s.push(2),AE(s,n.length);var i=s.concat(n),o=[48];return AE(o,i.length),o=o.concat(i),Ls.encode(o,e)};var Hbe=function(){throw new Error("unsupported")},cq=Ls.assert;function ii(t){if(!(this instanceof ii))return new ii(t);typeof t=="string"&&(cq(Object.prototype.hasOwnProperty.call(Op,t),"Unknown curve "+t),t=Op[t]),t instanceof Op.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Gbe=ii;ii.prototype.keyPair=function(e){return new D4(this,e)};ii.prototype.keyFromPrivate=function(e,r){return D4.fromPrivate(this,e,r)};ii.prototype.keyFromPublic=function(e,r){return D4.fromPublic(this,e,r)};ii.prototype.genKeyPair=function(e){e||(e={});for(var r=new lq({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Hbe(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new Te(2));;){var i=new Te(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};ii.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};ii.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Te(e,16));for(var i=this.n.byteLength(),o=r.getPrivate().toArray("be",i),a=e.toArray("be",i),l=new lq({hash:this.hash,entropy:o,nonce:a,pers:s.pers,persEnc:s.persEnc||"utf8"}),c=this.n.sub(new Te(1)),f=0;;f++){var u=s.k?s.k(f):new Te(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),v=h.umod(this.n);if(v.cmpn(0)!==0){var y=u.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var g=(d.getY().isOdd()?1:0)|(h.cmp(v)!==0?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new Nw({r:v,s:y,recoveryParam:g})}}}}}};ii.prototype.verify=function(e,r,n,s){e=this._truncateToN(new Te(e,16)),n=this.keyFromPublic(n,s),r=new Nw(r,"hex");var i=r.r,o=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(i).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(i)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(i)===0)};ii.prototype.recoverPubKey=function(t,e,r,n){cq((3&r)===r,"The recovery param is more than two bits"),e=new Nw(e,n);var s=this.n,i=new Te(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(s),u=s.sub(i).mul(f).umod(s),d=a.mul(f).umod(s);return this.g.mulAdd(u,o,d)};ii.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Nw(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var Kbe=Ih(function(t,e){var r=e;r.version="6.5.4",r.utils=Ls,r.rand=function(){throw new Error("unsupported")},r.curve=Ip,r.curves=Op,r.ec=Gbe,r.eddsa=null}),Qbe=Kbe.ec;const Ybe="signing-key/5.7.0",G3=new ee(Ybe);let _E=null;function oo(){return _E||(_E=new Qbe("secp256k1")),_E}class db{constructor(e){oe(this,"curve","secp256k1"),oe(this,"privateKey",te(e)),Io(this.privateKey)!==32&&G3.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=oo().keyFromPrivate(ne(this.privateKey));oe(this,"publicKey","0x"+r.getPublic(!1,"hex")),oe(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),oe(this,"_isSigningKey",!0)}_addPoint(e){const r=oo().keyFromPublic(ne(this.publicKey)),n=oo().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=oo().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&G3.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return qf({recoveryParam:s.recoveryParam,r:ht("0x"+s.r.toString(16),32),s:ht("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=oo().keyFromPrivate(ne(this.privateKey)),n=oo().keyFromPublic(ne(N4(e)));return ht("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function fq(t,e){const r=qf(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+oo().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function N4(t,e){const r=ne(t);if(r.length===32){const n=new db(r);return e?"0x"+oo().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+oo().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+oo().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return G3.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Jbe="transactions/5.7.0",Cn=new ee(Jbe);var K3;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(K3||(K3={}));function L4(t){return t==="0x"?null:Ye(t)}function xn(t){return t==="0x"?rr:Z.from(t)}const Xbe=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Zbe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function j4(t){const e=N4(t);return Ye(Sr(Ue(Sr(e,1)),12))}function $f(t,e){return j4(fq(ne(t),e))}function bs(t,e){const r=Eo(Z.from(t).toHexString());return r.length>32&&Cn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function PE(t,e){return{address:Ye(t),storageKeys:(e||[]).map((r,n)=>(Io(r)!==32&&Cn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Hf(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Cn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),PE(r[0],r[1])):PE(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return PE(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function uq(t){return Hf(t).map(e=>[e.address,e.storageKeys])}function dq(t,e){if(t.gasPrice!=null){const n=Z.from(t.gasPrice),s=Z.from(t.maxFeePerGas||0);n.eq(s)||Cn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),bs(t.maxFeePerGas||0,"maxFeePerGas"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x02",Ef(r)])}function hq(t,e){const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.gasPrice||0,"gasPrice"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x01",Ef(r)])}function e2e(t,e){w4(t,Zbe);const r=[];Xbe.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=ne(te(a,l)),o.length&&a.length!==o.length&&a.length>0&&Cn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Eo(a),a.length>o.maxLength&&Cn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(te(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Cn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!ma(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(te(n)),r.push("0x"),r.push("0x")),!e)return Ef(r);const s=qf(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(i)),r.push(Eo(ne(s.r))),r.push(Eo(ne(s.s))),Ef(r)}function t2e(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Cn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),e2e(t,e);switch(t.type){case 1:return hq(t,e);case 2:return dq(t,e)}return Cn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function vq(t,e,r){try{const n=xn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Cn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ht(e[1],32),t.s=ht(e[2],32);try{const n=Ue(r(t));t.from=$f(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function r2e(t){const e=Iw(t.slice(1));e.length!==9&&e.length!==12&&Cn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=xn(e[2]),n=xn(e[3]),s={type:2,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:xn(e[4]),to:L4(e[5]),value:xn(e[6]),data:e[7],accessList:Hf(e[8])};return e.length===9||(s.hash=Ue(t),vq(s,e.slice(9),dq)),s}function n2e(t){const e=Iw(t.slice(1));e.length!==8&&e.length!==11&&Cn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),gasPrice:xn(e[2]),gasLimit:xn(e[3]),to:L4(e[4]),value:xn(e[5]),data:e[6],accessList:Hf(e[7])};return e.length===8||(r.hash=Ue(t),vq(r,e.slice(8),hq)),r}function s2e(t){const e=Iw(t);e.length!==9&&e.length!==6&&Cn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:xn(e[0]).toNumber(),gasPrice:xn(e[1]),gasLimit:xn(e[2]),to:L4(e[3]),value:xn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Z.from(e[6]).toNumber()}catch{return r}if(r.r=ht(e[7],32),r.s=ht(e[8],32),Z.from(r.r).isZero()&&Z.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const s=e.slice(0,6);r.chainId!==0&&(s.push(te(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Ue(Ef(s));try{r.from=$f(i,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Ue(t)}return r.type=null,r}function yq(t){const e=ne(t);if(e[0]>127)return s2e(e);switch(e[0]){case 1:return n2e(e);case 2:return r2e(e)}return Cn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const i2e="contracts/5.7.0";var Af=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Er=new ee(i2e);function hb(t,e){return Af(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Er.throwArgumentError("invalid address or ENS name","name",r);try{return Ye(r)}catch{}t||Er.throwError("a provider or signer is needed to resolve ENS names",ee.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Er.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Mp(t,e,r){return Af(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>Mp(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield hb(t,e):r.type==="tuple"?yield Mp(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Mp(t,n,r.arrayChildren))):Promise.reject(Er.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Lw(t,e,r){return Af(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),Er.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=mt({override:hb(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Af(this,void 0,void 0,function*(){return Ye(c.signer)!==c.override&&Er.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=hb(t.provider,n.from));const s=yield mt({args:Mp(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:mt(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),o={data:i,to:s.address},a=s.overrides;if(a.nonce!=null&&(o.nonce=Z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=Z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=Z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=Z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=Z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Hf(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=ne(i);for(let u=0;un[c]!=null);return l.length&&Er.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function o2e(t,e){return function(...r){return Lw(t,e,r)}}function a2e(t,e){const r=t.signer||t.provider;return function(...n){return Af(this,void 0,void 0,function*(){r||Er.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield Lw(t,e,n);return yield r.estimateGas(s)})}}function l2e(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let o=_s(i),a=null;try{a=t.interface.parseLog(i)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(s.blockHash),o.getTransaction=()=>t.provider.getTransaction(s.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(s),o}),s))}function mq(t,e,r){const n=t.signer||t.provider;return function(...s){return Af(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const l=Gt(s.pop());l.blockTag!=null&&(i=yield l.blockTag),delete l.blockTag,s.push(l)}t.deployTransaction!=null&&(yield t._deployed(i));const o=yield Lw(t,e,s),a=yield n.call(o,i);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===ee.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=s,l.transaction=o),l}})}}function c2e(t,e){return function(...r){return Af(this,void 0,void 0,function*(){t.signer||Er.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Lw(t,e,r),s=yield t.signer.sendTransaction(n);return l2e(t,s),s})}}function x9(t,e,r){return e.constant?mq(t,e,r):c2e(t,e)}function pq(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class _y{constructor(e,r){oe(this,"tag",e),oe(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class f2e extends _y{constructor(){super("error",null)}}class C9 extends _y{constructor(e,r,n,s){const i={address:e};let o=r.getEventTopic(n);s?(o!==s[0]&&Er.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[o],super(pq(i),i),oe(this,"address",e),oe(this,"interface",r),oe(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=mV(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class E9 extends _y{constructor(e,r){super("*",{address:e}),oe(this,"address",e),oe(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class u2e{constructor(e,r,n){oe(this,"interface",Ti(new.target,"getInterface")(r)),n==null?(oe(this,"provider",null),oe(this,"signer",null)):Sf.isSigner(n)?(oe(this,"provider",n.provider||null),oe(this,"signer",n)):uc.isProvider(n)?(oe(this,"provider",n),oe(this,"signer",null)):Er.throwArgumentError("invalid signer or provider","signerOrProvider",n),oe(this,"callStatic",{}),oe(this,"estimateGas",{}),oe(this,"functions",{}),oe(this,"populateTransaction",{}),oe(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];oe(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?oe(this.filters,a,this.filters[l[0]]):Er.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(oe(this,"_runningEvents",{}),oe(this,"_wrappedEmits",{}),e==null&&Er.throwArgumentError("invalid contract address or ENS name","addressOrName",e),oe(this,"address",e),this.provider)oe(this,"resolvedAddress",hb(this.provider,e));else try{oe(this,"resolvedAddress",Promise.resolve(Ye(e)))}catch{Er.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const s={},i={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(i[o]){Er.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}i[o]=!0;{const l=a.name;s[`%${l}`]||(s[`%${l}`]=[]),s[`%${l}`].push(o)}this[o]==null&&oe(this,o,x9(this,a,!0)),this.functions[o]==null&&oe(this.functions,o,x9(this,a,!1)),this.callStatic[o]==null&&oe(this.callStatic,o,mq(this,a,!0)),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,o2e(this,a)),this.estimateGas[o]==null&&oe(this.estimateGas,o,a2e(this,a))}),Object.keys(s).forEach(o=>{const a=s[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&oe(this,o,this[l])}catch{}this.functions[o]==null&&oe(this.functions,o,this.functions[l]),this.callStatic[o]==null&&oe(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&oe(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return E4(e)}static getInterface(e){return en.isInterface(e)?e:new en(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Er.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Er.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Er.throwError("cannot override "+n,ee.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new I4(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&oe(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return cb.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new f2e);if(e==="event")return this._normalizeRunningEvent(new _y("event",null));if(e==="*")return this._normalizeRunningEvent(new E9(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new C9(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const s=this.interface.getEvent(n);return this._normalizeRunningEvent(new C9(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _y(pq(r),r))}return this._normalizeRunningEvent(new E9(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const s=_s(r);return s.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||Er.throwError("events require a provider or a signer with a provider",ee.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const s=i=>{let o=this._wrapEvent(e,i,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=Gt(s.filter);return typeof r=="string"&&ze(r,32)?(n!=null&&Er.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(o=>o.map(a=>this._wrapEvent(s,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),s=n.run(r)>0;return this._checkRunningEvents(n),s}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Oh extends u2e{}class gq{constructor(e){oe(this,"alphabet",e),oe(this,"base",e.length),oe(this,"_alphabetMap",{}),oe(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=ne(Py(s,t,l));i||(i=d.length,f=new Uint8Array(i),o=Math.ceil(n/i),c=n-(o-1)*i),f.set(d);for(let y=1;y=256)throw new Error("Depth too large!");return $R(Ht([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ht(te(this.index),4),this.chainCode,this.privateKey!=null?Ht(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ho(cu,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~$u));const n=new Uint8Array(37);if(e&$u){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ne(this.privateKey),1),r&&(r+="'")}else n.set(ne(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const s=ne(Py(Hd.sha512,this.chainCode,n)),i=s.slice(0,32),o=s.slice(32);let a=null,l=null;this.privateKey?a=Rm(Z.from(i).add(this.privateKey).mod(E2e)):l=new db(te(i))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new Ho(cu,a,l,this.fingerprint,Rm(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let s=0;s=$u)throw new Error("invalid path index - "+i);n=n._derive($u+o)}else if(i.match(/^[0-9]+$/)){const o=parseInt(i);if(o>=$u)throw new Error("invalid path index - "+i);n=n._derive(o)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=ne(Py(Hd.sha512,S2e,n));return new Ho(cu,Rm(s.slice(0,32)),null,"0x00000000",Rm(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=F4(n),e=Eq(B4(e,n),n),Ho._fromSeed(Cq(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ho._fromSeed(e,null)}static fromExtendedKey(e){const r=Wd.decode(e);(r.length!==82||$R(r.slice(0,78))!==e)&&Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=te(r.slice(5,9)),i=parseInt(te(r.slice(9,13)).substring(2),16),o=te(r.slice(13,45)),a=r.slice(45,78);switch(te(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ho(cu,null,te(a),s,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Ho(cu,te(a.slice(1)),null,s,o,i,n,null)}return Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Cq(t,e){e||(e="");const r=xt("mnemonic"+e,pa.NFKD);return p2e(xt(t,pa.NFKD),r,2048,64,"sha512")}function B4(t,e){e=F4(e),Ty.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ne(new Uint8Array(Math.ceil(11*r.length/8)));let s=0;for(let c=0;c>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=xq(o);if((ne(wa(n.slice(0,i/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,i/8))}function Eq(t,e){if(e=F4(e),t=ne(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&k2e(8-n)),n+=3);const s=t.length/4,i=ne(wa(t))[0]&xq(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}function A2e(t,e){try{return B4(t,e),!0}catch{}return!1}function _2e(t){return(typeof t!="number"||t<0||t>=$u||t%1)&&Ty.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const P2e="random/5.7.0",Q3=new ee(P2e);function T2e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const AR=T2e();let Dp=AR.crypto||AR.msCrypto;(!Dp||!Dp.getRandomValues)&&(Q3.warn("WARNING: Missing strong random number source"),Dp={getRandomValues:function(t){return Q3.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function jw(t){(t<=0||t>1024||t%1||t!=t)&&Q3.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Dp.getRandomValues(e),ne(e)}function Sq(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function R2e(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function I2e(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function O2e(t){if(R2e(t))try{return Ye(JSON.parse(t).ethaddr)}catch{return null}if(I2e(t))try{return Ye(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function kq(t,e){return $f(R4(t),e)}function M2e(t,e,r,n){return $f(Yr.hash(t,e,r),n)}const D2e="networks/5.7.1",_R=new ee(D2e);function N2e(t){return t&&typeof t.renetwork=="function"}function Yo(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Yo(r)},e}function vb(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return vb(t,n)},r}const PR={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Yo("homestead")},TR={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Yo("ropsten")},RR={chainId:63,name:"classicMordor",_defaultProvider:vb("https://www.ethercluster.com/mordor","classicMordor")},Im={unspecified:{chainId:0,name:"unspecified"},homestead:PR,mainnet:PR,morden:{chainId:2,name:"morden"},ropsten:TR,testnet:TR,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Yo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Yo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Yo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Yo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:vb("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:RR,classicTestnet:RR,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:vb("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Yo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Yo("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function L2e(t){if(t==null)return null;if(typeof t=="number"){for(const n in Im){const s=Im[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Im[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Im[t.name];if(!e)return typeof t.chainId!="number"&&_R.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&_R.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(N2e(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const j2e="web/5.7.1";var F2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function B2e(t,e){return F2e(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((o,a)=>{i[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{i[o.toLowerCase()]=n.headers.get(o)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(s))}})}var U2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const xi=new ee(j2e);function IR(t){return new Promise(e=>{setTimeout(e,t)})}function Ha(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ma(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Ia(t)}catch{}return te(t)}return t}function z2e(t){return xt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function $q(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;xi.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;xi.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&xi.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&xi.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+P4(xt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?_4(h[3]):z2e(h[3])};let p=b.body;return r&&(p=r(b.body,b)),Promise.resolve(p)}catch(b){xi.throwError("processing response error",ee.errors.SERVER_ERROR,{body:Ha(h[1],h[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const v={};Object.keys(a).forEach(b=>{const p=a[b];v[p.key]=p.value}),c.headers=v;const y=function(){let b=null;return{promise:new Promise(function(E,k){u&&(b=setTimeout(()=>{b!=null&&(b=null,k(xi.makeError("timeout",ee.errors.TIMEOUT,{requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),g=function(){return U2e(this,void 0,void 0,function*(){for(let b=0;b=300)&&(y.cancel(),xi.throwError("bad response",ee.errors.SERVER_ERROR,{status:p.statusCode,headers:p.headers,body:Ha(w,p.headers?p.headers["content-type"]:null),requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,url:l})),r)try{const E=yield r(w,p);return y.cancel(),E}catch(E){if(E.throttleRetry&&b{let a=null;if(i!=null)try{a=JSON.parse(Ia(i))}catch(l){xi.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:i,error:l})}return r&&(a=r(a,o)),a},s=null;if(e!=null){s=xt(e);const i=typeof t=="string"?{url:t}:Gt(t);i.headers?Object.keys(i.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(i.headers=Gt(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return $q(t,s,n)}function yl(t,e){return e||(e={}),e=Gt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let s=null,i=!1;const o=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!i){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var yb="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Y3={};for(var Om=0;Om>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Aq(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=md(e)^n>>5}for(e=md(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Aq(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=md(n)^o,s+=yb.charAt(o)}for(i=0;i<6;++i)n=md(n);for(n^=1,i=0;i<6;++i){var a=n>>(5-i)*5&31;s+=yb.charAt(a)}return s}function _q(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),o=t.slice(s+1);if(o.length<6)return"Data too short";var a=Aq(i);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:i,words:l}}function q2e(){var t=_q.apply(null,arguments);if(typeof t=="object")return t}function W2e(t){var e=_q.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fw(t,e,r,n){for(var s=0,i=0,o=(1<=r;)i-=r,a.push(s>>i&o);if(n)i>0&&a.push(s<=e)return"Excess padding";if(s<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:ve.allowNull(this.accessList.bind(this),null),blockHash:ve.allowNull(o,null),blockNumber:ve.allowNull(l,null),transactionIndex:ve.allowNull(l,null),confirmations:ve.allowNull(l,null),from:r,gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),gasLimit:n,to:ve.allowNull(r,null),value:n,nonce:l,data:i,r:ve.allowNull(this.uint256),s:ve.allowNull(this.uint256),v:ve.allowNull(l),creates:ve.allowNull(r,null),raw:ve.allowNull(i)},e.transactionRequest={from:ve.allowNull(r),nonce:ve.allowNull(l),gasLimit:ve.allowNull(n),gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),to:ve.allowNull(r),value:ve.allowNull(n),data:ve.allowNull(f),type:ve.allowNull(l),accessList:ve.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ve.arrayOf(o),data:i,logIndex:l,blockHash:o},e.receipt={to:ve.allowNull(this.address,null),from:ve.allowNull(this.address,null),contractAddress:ve.allowNull(r,null),transactionIndex:l,root:ve.allowNull(a),gasUsed:n,logsBloom:ve.allowNull(i),blockHash:o,transactionHash:o,logs:ve.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ve.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ve.allowNull(n),status:ve.allowNull(l),type:c},e.block={hash:ve.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ve.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ve.allowNull(r),extraData:i,transactions:ve.allowNull(ve.arrayOf(o)),baseFeePerGas:ve.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=ve.allowNull(ve.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ve.allowNull(s,void 0),toBlock:ve.allowNull(s,void 0),blockHash:ve.allowNull(o,void 0),address:ve.allowNull(r,void 0),topics:ve.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ve.allowNull(l),blockHash:ve.allowNull(o),transactionIndex:l,removed:ve.allowNull(this.boolean.bind(this)),address:r,data:ve.allowFalsish(i,"0x"),topics:ve.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Hf(e||[])}number(e){return e==="0x"?0:Z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Z.from(e).toNumber()}bigNumber(e){return Z.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),ze(e))?e.toLowerCase():y1.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Ye(e)}callAddress(e){if(!ze(e,32))return null;const r=Ye(Sr(e,12));return r===Ar?null:r}contractAddress(e){return E4(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ze(e))return Hl(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Io(n)!==32?y1.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!ze(e))throw new Error("invalid uint256");return ht(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=ve.check(r,e);return s._difficulty=n==null?null:Z.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ve.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Z.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=ve.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ze(n)&&(n=Z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),ze(n)&&(n=Z.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return yq(e)}receiptLog(e){return ve.check(this.formats.receiptLog,e)}receipt(e){const r=ve.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&y1.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):y1.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&y1.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return ve.check(this.formats.filter,e)}filterLog(e){return ve.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(s){n.push(e(s))}),n}}}function Y2e(t){return t&&typeof t.isCommunityResource=="function"}function MR(t){return Y2e(t)&&t.isCommunityResource()}var Pe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ge=new ee(Mh),J2e=10;function DR(t){return t==null?"null":(Io(t)!==32&&Ge.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function NR(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(s=>{r[DR(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return DR(e)}).join("&")}function X2e(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function fu(t){if(typeof t=="string"){if(t=t.toLowerCase(),Io(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+NR(t);if(dge.isForkEvent(t))throw Ge.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+NR(t.topics||[])}throw new Error("invalid event - "+t)}function m1(){return new Date().getTime()}function LR(t){return new Promise(e=>{setTimeout(e,t)})}const Z2e=["block","network","pending","poll"];let ewe=class{constructor(e,r,n){oe(this,"tag",e),oe(this,"listener",r),oe(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=X2e(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||Z2e.indexOf(this.tag)>=0}};const twe={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function RE(t){return ht(Z.from(t).toHexString(),32)}function jR(t){return Wd.encode(Ht([t,Sr(wa(wa(t)),0,4)]))}const Pq=new RegExp("^(ipfs)://(.*)$","i"),FR=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Pq,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Np(t,e){try{return Ia(Ry(t,e))}catch{}return null}function Ry(t,e){if(t==="0x")return null;const r=Z.from(Sr(t,e,e+32)).toNumber(),n=Z.from(Sr(t,r,r+32)).toNumber();return Sr(t,r+32,r+32+n)}function IE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ge.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function BR(t){const e=ne(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function rwe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Tq(t){const e=[];let r=0;for(let n=0;nZ.from(e).eq(1)).catch(e=>{if(e.code===ee.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Pe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:jn([e,av(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=jn(["0x9061b923",Tq([NV(this.name),n.data])]));try{let i=yield this.provider.call(n);return ne(i).length%32===4&&Ge.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=Ry(i,0)),i}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return Pe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Ry(n,0):null})}_getAddress(e,r){const n=twe[String(e)];if(n==null&&Ge.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=ne(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return jR(Ht([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return jR(Ht([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let o=s[0];if(o===0?i!==20&&i!==32&&(o=-1):o=-1,o>=0&&s.length===2+i&&i>=1&&i<=75){const a=OR.toWords(s.slice(2));return a.unshift(o),OR.encode(n.prefix,a)}}return null}getAddress(e){return Pe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===ob?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",RE(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ge.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Pe(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ge.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Pe(this,void 0,void 0,function*(){let r=xt(e);r=Ht([RE(64),RE(r.length),r]),r.length%32!==0&&(r=Ht([r,ht("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:Ia(n)})}}let OE=null,nwe=1;class Bw extends uc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),oe(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Ti(new.target,"getNetwork")(e);r?(oe(this,"_network",r),this.emit("network",r,null)):Ge.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Pe(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ge.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:oe(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return yl(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return OE==null&&(OE=new ve),OE}static getNetwork(e){return L2e(e??"homestead")}ccipReadFetch(e,r,n){return Pe(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:i,sender:s}),u=yield k0({url:c,errorPassThrough:!0},f,(h,v)=>(h.status=v.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ge.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ge.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Pe(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(m1()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=m1(),n=mt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const o=m1();return s=Z.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Pe(this,void 0,void 0,function*(){const e=nwe++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ge.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ge.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let o=this.getTransactionReceipt(i).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+i]=a.blockNumber,this.emit(i,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const o=i.toBlock-this._maxFilterBlockRange;o>i.fromBlock&&(i.fromBlock=o),i.fromBlock<0&&(i.fromBlock=0);const a=this.getLogs(i).then(l=>{s._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(i,c)})}).catch(l=>{this.emit("error",l),s._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Pe(this,void 0,void 0,function*(){return Ge.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Pe(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield LR(0),this._network;const n=Ge.makeError("underlying network changed",ee.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=m1();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Pe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return Pe(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),s){let d=s.startBlock,h=null;const v=y=>Pe(this,void 0,void 0,function*(){c||(yield LR(1e3),this.getTransactionCount(s.from).then(g=>Pe(this,void 0,void 0,function*(){if(!c){if(g<=s.nonce)d=y;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",v)}))});if(c)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ge.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Pe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Z.from(e)}catch(r){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Z.from(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Z.from(s).toNumber()}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return te(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Hl(o))}),i=yield this.perform("getStorageAt",s);try{return te(i)}catch(o){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Io(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&Ge.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,o)=>Pe(this,void 0,void 0,function*(){i==null&&(i=1),o==null&&(o=0);let a;i!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,i,o,a);return l==null&&i===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ge.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),s}sendTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>te(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return Pe(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Z.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?te(i):null))}),this.formatter.transactionRequest(yield mt(n))})}_getFilter(e){return Pe(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield mt(r))})}_call(e,r,n){return Pe(this,void 0,void 0,function*(){n>=J2e&&Ge.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Io(i)%32===4)try{const o=Sr(i,4),a=Sr(o,0,32);Z.from(a).eq(s)||Ge.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=Z.from(Sr(o,32,64)).toNumber(),f=Z.from(Sr(o,c,c+32)).toNumber(),u=Sr(o,c+32);for(let b=0;bPe(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return s}),{oncePoll:this})})}getLogs(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield mt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),ve.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Pe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Pe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ge.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Pe(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const s=new J3(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Pe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ge.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+av(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return Pe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ze(e))throw n}typeof e!="string"&&Ge.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Pe(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const s=Np(yield this.call({to:n,data:"0x691f3431"+av(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return Pe(this,void 0,void 0,function*(){let r=null;if(ze(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(i,"getAvatar");if(!o)return null;r=new J3(this,o,i);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a}try{const a=Np(yield this.call({to:o,data:"0x691f3431"+av(i).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ge.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const s=new ewe(fu(e),r,n);return this._events.push(s),this._startEvent(s),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,s=[],i=fu(e);return this._events=this._events.filter(o=>o.tag!==i?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(s.push(o),!1):!0)),s.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=fu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=fu(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let s=!1,i=fu(e);return this._events=this._events.filter(o=>o.tag!==i||o.listener!=r||s?!0:(s=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=fu(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Go=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Tr=new ee(Mh),swe=["call","estimateGas"];function cv(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=ze(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=cv(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return cv(JSON.parse(t),e)}catch{}return null}function Rq(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=cv(e,!0);if(i)return i.data;Tr.throwError("missing revert data in call exception; Transaction reverted without a reason string",ee.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=cv(e.body,!1);i==null&&(i=cv(e,!1)),i&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Tr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&Tr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Tr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&Tr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),swe.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function UR(t){return new Promise(function(e){setTimeout(e,t)})}function iwe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function p1(t){return t&&t.toLowerCase()}const X3={};class Iq extends Sf{constructor(e,r,n){if(super(),e!==X3)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");oe(this,"provider",r),n==null&&(n=0),typeof n=="string"?(oe(this,"_address",this.provider.formatter.address(n)),oe(this,"_index",null)):typeof n=="number"?(oe(this,"_index",n),oe(this,"_address",null)):Tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Tr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new owe(X3,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Tr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Go(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&Tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),mt({tx:mt(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&Tr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Rq("sendTransaction",o,i)))})}signTransaction(e){return Tr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Go(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield yl(()=>Go(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Go(this,void 0,void 0,function*(){const s=yield Yr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Yr.getPayload(s.domain,r,s.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),o}})}unlock(e){return Go(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class owe extends Iq{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const awe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let xa=class extends Bw{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(o=>{s(o)},o=>{i(o)})},0)})),super(n),e||(e=Ti(this.constructor,"defaultUrl")()),typeof e=="string"?oe(this,"connection",Object.freeze({url:e})):oe(this,"connection",Object.freeze(Gt(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Go(this,void 0,void 0,function*(){yield UR(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Ti(this.constructor,"getNetwork");try{return r(Z.from(e).toNumber())}catch(n){return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Iq(X3,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:_s(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=k0(this.connection,JSON.stringify(n),iwe).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[p1(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[p1(r.address),r.blockTag]];case"getCode":return["eth_getCode",[p1(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[p1(r.address),ht(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=p1(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Go(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Z.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Tr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return Rq(e,s,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return i.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return UR(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(awe);if(r)for(const i in r)r[i]&&(n[i]=!0);w4(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const o=Hl(Z.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=o}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=te(e[i]))}),e.accessList&&(s.accessList=Hf(e.accessList)),s}};var lwe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const cwe=new ee(Mh);class mb extends xa{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return lwe(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||cwe.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(oe(this,"_network",r),this.emit("network",r,null))),r})}}var pb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Fc=new ee(Mh);function Mm(){return new Date().getTime()}function zR(t){let e=null;for(let r=0;re?null:(n+s)/2}function Hu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Z.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Hu(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=Hu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let fwe=1;function qR(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const s=o=>(n=n.then(o),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const uwe=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],dwe=["address","args","errorArgs","errorSignature","method","transaction"];function Dm(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function hwe(t,e){return function(r){const n={};r.forEach(i=>{const o=t(i.result);n[o]||(n[o]={count:0,result:i.result}),n[o].count++});const s=Object.keys(n);for(let i=0;i=e)return o.result}}}function vwe(t,e,r){let n=Hu;switch(e){case"getBlockNumber":return function(s){const i=s.map(a=>a.result);let o=VR(s.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),i.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(o=>o.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return VR(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=Gt(s),s.confirmations=-1,Hu(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=Gt(s),s.transactions=s.transactions.map(i=>(i=Gt(i),i.confirmations=-1,i)),Hu(s))}:n=function(s){return s==null?null:Hu(s)};break;default:throw new Error("unknown method: "+e)}return hwe(n,t.quorum)}function g1(t,e){return pb(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:yl(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function ywe(t,e,r,n){return pb(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&ze(i.fromBlock)||i.toBlock&&ze(i.toBlock))&&(s=yield g1(t,e)),s.getLogs(i)}}return Fc.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class mwe extends Bw{constructor(e,r){e.length===0&&Fc.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(uc.isProvider(o)){const f=MR(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:f,priority:1})}const l=Gt(o);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=MR(o)?2e3:750),l.weight==null&&(l.weight=1);const c=l.weight;return(c%1||c>512||c<1)&&Fc.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,c),Object.freeze(l)}),s=n.reduce((o,a)=>o+a.weight,0);r==null?r=s/2:r>s&&Fc.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=zR(n.map(o=>o.provider.network));i==null&&(i=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(i),oe(this,"providerConfigs",Object.freeze(n)),oe(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return pb(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return zR(e)})}perform(e,r){return pb(this,void 0,void 0,function*(){if(e==="sendTransaction"){const l=yield Promise.all(this.providerConfigs.map(c=>c.provider.sendTransaction(r.signedTransaction).then(f=>f.hash,f=>f)));for(let c=0;cl.priority-c.priority);const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const l=Mm();let c=s.filter(h=>h.runner&&l-h.starth+v.weight,0);for(;c{h.staller=null}),h.runner=ywe(h,i,e,r).then(y=>{h.done=!0,h.result=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})},y=>{h.done=!0,h.error=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,null),request:{method:e,params:_s(r)},provider:this}),c+=h.weight}const f=[];s.forEach(h=>{h.done||!h.runner||(f.push(h.runner),h.staller&&f.push(h.staller.getPromise()))}),f.length&&(yield Promise.race(f));const u=s.filter(h=>h.done&&h.error==null);if(u.length>=this.quorum){const h=n(u);if(h!==void 0)return s.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),h;a||(yield qR(100).getPromise()),a=!1}const d=s.reduce((h,v)=>{if(!v.done||v.error==null)return h;const y=v.error.code;return uwe.indexOf(y)>=0&&(h[y]||(h[y]={error:v.error,weight:0}),h[y].weight+=v.weight),h},{});if(Object.keys(d).forEach(h=>{const v=d[h];if(v.weight{b.staller&&b.staller.cancel(),b.cancelled=!0});const y=v.error,g={};dwe.forEach(b=>{y[b]!=null&&(g[b]=y[b])}),Fc.throwError(y.reason||y.message,h,g)}),s.filter(h=>!h.done).length===0)break}return s.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Fc.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:s.map(l=>Dm(l)),provider:this})})}}const WR=new ee(Mh);let pwe=1;function HR(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:pwe++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:_s(i),provider:this}),e(i,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:i,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function gwe(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:_s(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class Oq extends xa{constructor(e,r){e==null&&WR.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=gwe(e)):e.sendAsync?s=HR(e,e.sendAsync.bind(e)):e.send?s=HR(e,e.send.bind(e)):WR.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),oe(this,"jsonRpcFetchFunc",s),oe(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const bwe="solidity/5.7.0",wwe=new RegExp("^bytes([0-9]+)$"),xwe=new RegExp("^(u?int)([0-9]*)$"),Cwe=new RegExp("^(.*)\\[([0-9]*)\\]$"),Ewe="0000000000000000000000000000000000000000000000000000000000000000",Au=new ee(bwe);function Mq(t,e,r){switch(t){case"address":return r?sv(e,32):ne(e);case"string":return xt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?sv(e,32):ne(e)}let n=t.match(xwe);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&Au.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Z.from(e).toTwos(s),sv(e,s/8)}if(n=t.match(wwe),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&Au.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==s&&Au.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+Ewe).substring(0,66)):e}if(n=t.match(Cwe),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&Au.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(Mq(s,a,!0))}),Ht(o)}return Au.throwArgumentError("invalid type","type",t)}function He(t,e){t.length!=e.length&&Au.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(Mq(n,e[s]))}),te(Ht(r))}function aa(t,e){return Ue(He(t,e))}function Swe(t,e){return wa(He(t,e))}const kwe="units/5.7.0",Dq=new ee(kwe),Nq=["wei","kwei","mwei","gwei","szabo","finney","ether"];function $we(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&Dq.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+s}function _r(t,e){if(typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return Tp(t,e??18)}function Gd(t,e){if(typeof t!="string"&&Dq.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return to(t,e??18)}function Awe(t){return _r(t,18)}function _we(t){return Gd(t,18)}const Pwe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:A4,ConstructorFragment:_i,ErrorFragment:Xo,EventFragment:yo,FormatTypes:it,Fragment:po,FunctionFragment:Pi,HDNode:Ho,Indexed:cb,Interface:en,LogDescription:BV,Logger:ee,ParamType:qr,RLP:qme,SigningKey:db,get SupportedAlgorithm(){return Hd},TransactionDescription:UV,get TransactionTypes(){return K3},get UnicodeNormalizationForm(){return pa},Utf8ErrorFuncs:_V,get Utf8ErrorReason(){return es},_TypedDataEncoder:Yr,_fetchData:$q,_toEscapedUtf8String:cpe,accessListify:Hf,arrayify:ne,base58:Wd,base64:_pe,checkProperties:w4,checkResultErrors:mV,commify:$we,computeAddress:j4,computeHmac:Py,computePublicKey:N4,concat:Ht,deepCopy:_s,defaultAbiCoder:Gn,defaultPath:$2e,defineReadOnly:oe,dnsEncode:NV,entropyToMnemonic:Eq,fetchJson:k0,formatBytes32String:fpe,formatEther:Awe,formatUnits:_r,getAccountPath:_2e,getAddress:Ye,getContractAddress:E4,getCreate2Address:Qme,getIcapAddress:Kme,getJsonWalletAddress:O2e,getStatic:Ti,hashMessage:R4,hexConcat:jn,hexDataLength:Io,hexDataSlice:Sr,hexStripZeros:aV,hexValue:Hl,hexZeroPad:ht,hexlify:te,id:vl,isAddress:wV,isBytes:Ta,isBytesLike:ma,isHexString:ze,isValidMnemonic:A2e,isValidName:Xpe,joinSignature:Ame,keccak256:Ue,mnemonicToEntropy:B4,mnemonicToSeed:Cq,namehash:av,nameprep:Spe,parseBytes32String:upe,parseEther:_we,parseTransaction:yq,parseUnits:Gd,poll:yl,randomBytes:jw,recoverAddress:$f,recoverPublicKey:fq,resolveProperties:mt,ripemd160:bq,serializeTransaction:n2e,sha256:wa,sha512:m2e,shallowCopy:Gt,shuffled:Sq,solidityKeccak256:aa,solidityPack:He,soliditySha256:Swe,splitSignature:qf,stripZeros:Eo,toUtf8Bytes:xt,toUtf8CodePoints:ab,toUtf8String:Ia,verifyMessage:kq,verifyTypedData:M2e,zeroPad:sv},Symbol.toStringTag,{value:"Module"})),Lq="3.7.5",Twe=Lq,Rwe=typeof atob=="function",Iwe=typeof btoa=="function",Dh=typeof Buffer=="function",GR=typeof TextDecoder=="function"?new TextDecoder:void 0,KR=typeof TextEncoder=="function"?new TextEncoder:void 0,Owe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N1=Array.prototype.slice.call(Owe),Nm=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(N1),Mwe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ln=String.fromCharCode.bind(String),QR=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),jq=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Fq=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Bq=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=N1[e>>18&63]+N1[e>>12&63]+N1[e>>6&63]+N1[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},U4=Iwe?t=>btoa(t):Dh?t=>Buffer.from(t,"binary").toString("base64"):Bq,Z3=Dh?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?jq(Z3(t)):Z3(t),Dwe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?ln(192|e>>>6)+ln(128|e&63):ln(224|e>>>12&15)+ln(128|e>>>6&63)+ln(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return ln(240|e>>>18&7)+ln(128|e>>>12&63)+ln(128|e>>>6&63)+ln(128|e&63)}},Nwe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Uq=t=>t.replace(Nwe,Dwe),YR=Dh?t=>Buffer.from(t,"utf8").toString("base64"):KR?t=>Z3(KR.encode(t)):t=>U4(Uq(t)),pd=(t,e=!1)=>e?jq(YR(t)):YR(t),JR=t=>pd(t,!0),Lwe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jwe=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return ln((r>>>10)+55296)+ln((r&1023)+56320);case 3:return ln((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ln((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},zq=t=>t.replace(Lwe,jwe),Vq=t=>{if(t=t.replace(/\s+/g,""),!Mwe.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?ln(e>>16&255,e>>8&255):ln(e>>16&255,e>>8&255,e&255);return r},z4=Rwe?t=>atob(Fq(t)):Dh?t=>Buffer.from(t,"base64").toString("binary"):Vq,qq=Dh?t=>QR(Buffer.from(t,"base64")):t=>QR(z4(t).split("").map(e=>e.charCodeAt(0))),Wq=t=>qq(Hq(t)),Fwe=Dh?t=>Buffer.from(t,"base64").toString("utf8"):GR?t=>GR.decode(qq(t)):t=>zq(z4(t)),Hq=t=>Fq(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),eS=t=>Fwe(Hq(t)),Bwe=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Gq=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Kq=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,Gq(r));t("fromBase64",function(){return eS(this)}),t("toBase64",function(e){return pd(this,e)}),t("toBase64URI",function(){return pd(this,!0)}),t("toBase64URL",function(){return pd(this,!0)}),t("toUint8Array",function(){return Wq(this)})},Qq=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Gq(r));t("toBase64",function(e){return Lp(this,e)}),t("toBase64URI",function(){return Lp(this,!0)}),t("toBase64URL",function(){return Lp(this,!0)})},Uwe=()=>{Kq(),Qq()},_f={version:Lq,VERSION:Twe,atob:z4,atobPolyfill:Vq,btoa:U4,btoaPolyfill:Bq,fromBase64:eS,toBase64:pd,encode:pd,encodeURI:JR,encodeURL:JR,utob:Uq,btou:zq,decode:eS,isValid:Bwe,fromUint8Array:Lp,toUint8Array:Wq,extendString:Kq,extendUint8Array:Qq,extendBuiltins:Uwe};var tS=function(){return tS=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),Vwe=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},qwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s;return Uc(this,function(i){return n=r.messageDigest(),s=kq(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Wwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s,i,o,a;return Uc(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=l.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Oh(r.address,i,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=l.sent(),a===Hwe?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},Hwe="0x1626ba7e",Yq="1",rS="eth",Gwe={name:"ETHAuth",version:Yq},Iy=function(){function t(){for(var e=[],r=0;r0&&(l+="."+s.extra),[2,l]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a,l,c,f,u,d,h,v,y;return Uc(this,function(g){switch(g.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==rS)throw new Error("ethauth: not an ethauth proof");return d=_f.decode(c),h=JSON.parse(d),v=new Uw({address:l,claims:h,signature:f,extra:u}),[4,this.validateProof(v,i)];case 1:if(y=g.sent(),!y)throw new Error("ethauth: proof is invalid");return[2,v]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a;return Uc(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return Bc(n,void 0,void 0,function(){var i,l,o,a,l;return Uc(this,function(c){switch(c.label){case 0:i=[],l=0,c.label=1;case 1:if(!(l_f.encode(t,!0),V4=t=>_f.encode(JSON.stringify(t),!0),Qwe=t=>{if(t!=null)return _f.decode(t)},q4=t=>{if(t!=null)return JSON.parse(_f.decode(t))};function Jq(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}const W4=t=>ne(Ue(typeof t=="string"?xt(t):t)),Xq=(t,e,r)=>He(["string","uint256","address","bytes32"],["",e,t,r]),nS=(t,e,r)=>Ue(Xq(t,e,r)),Zq=()=>typeof window>"u"&&typeof process=="object",Ywe=()=>!Zq(),eW=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(_f.decode(e[1]))};function gb(){return gb=Object.assign?Object.assign.bind():function(t){for(var e=1;exe.configure(t),Oy=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let Xwe=class{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,Zwe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Zwe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function H4(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function exe(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function txe(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const G4=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),rW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},nW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},sW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},rxe=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),iW=t=>{const e=gb({},t.types);return delete e.EIP712Domain,Yr.hash(t.domain,e,t.message)},zw=t=>ne(iW(t)),{defineReadOnly:nxe,getStatic:sxe,resolveProperties:ixe,checkProperties:oxe,shallowCopy:axe,deepCopy:lxe}=Pwe,cxe=t=>t.replace(/([^:]\/)\/+/g,"$1"),fxe=Object.freeze(Object.defineProperty({__proto__:null,Logger:tW,PromiseCache:Xwe,base64Decode:Qwe,base64DecodeObject:q4,base64Encode:Kwe,base64EncodeObject:V4,checkProperties:oxe,configureLogger:Jwe,deepCopy:lxe,defineReadOnly:nxe,encodeMessageDigest:W4,encodeTypedDataDigest:zw,encodeTypedDataHash:iW,getDefaultConnectionInfo:Oy,getRandomInt:G4,getStatic:sxe,isBigNumberish:Jq,isBrowser:Ywe,isNode:Zq,jwtDecodeClaims:eW,logger:xe,packMessageData:Xq,promisify:H4,queryStringFromObject:exe,queryStringToObject:txe,resolveProperties:ixe,sanitizeAlphanumeric:nW,sanitizeHost:sW,sanitizeNumberString:rW,shallowCopy:axe,sleep:rxe,subDigestOf:nS,urlClean:cxe},Symbol.toStringTag,{value:"Module"}));function sr(){return sr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Z.from(t).toNumber(),dxe=t=>{if(t)return oW(t)},aW=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const s=n.map(c=>c.chainId).sort(),i=s.filter((c,f)=>s.indexOf(c)!==f);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aW(t,!0,e),t),hxe=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},vxe=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},cW=t=>lW(fW(t)),Li=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Z.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(Z.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},yxe=(t,e)=>t?t.name===e||t.chainId===e:!1,mxe=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Vw=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",qw=t=>Vw("https://${network}-indexer.sequence.app",{network:t}),uW=t=>Vw("https://${network}-relayer.sequence.app",{network:t}),dW=t=>Vw("https://nodes.sequence.app/${network}",{network:t});function K4(t){return Li(Kd,t)}function hW(t){return Z.isBigNumber(t)?t:Jq(t)?Z.from(t):Z.from(t.chainId)}const Dr=t=>{const e=dW(t);return{rpcUrl:e,relayer:{url:uW(t),provider:{url:e}},indexerUrl:qw(t)}},Kd=cW([sr({},zt[ce.POLYGON],Dr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),sr({},zt[ce.MAINNET],Dr("mainnet")),sr({},zt[ce.BSC],Dr("bsc")),sr({},zt[ce.AVALANCHE],Dr("avalanche")),sr({},zt[ce.ARBITRUM],Dr("arbitrum")),sr({},zt[ce.ARBITRUM_NOVA],Dr("arbitrum-nova")),sr({},zt[ce.OPTIMISM],Dr("optimism")),sr({},zt[ce.POLYGON_ZKEVM],Dr("polygon-zkevm")),sr({},zt[ce.GNOSIS],Dr("gnosis")),sr({},zt[ce.RINKEBY],Dr("rinkeby"),{disabled:!0}),sr({},zt[ce.GOERLI],Dr("goerli")),sr({},zt[ce.SEPOLIA],Dr("sepolia")),sr({},zt[ce.POLYGON_MUMBAI],Dr("mumbai")),sr({},zt[ce.BSC_TESTNET],Dr("bsc-testnet")),sr({},zt[ce.ARBITRUM_GOERLI],Dr("arbitrum-goerli")),sr({},zt[ce.BASE],Dr("base")),sr({},zt[ce.BASE_GOERLI],Dr("base-goerli")),sr({},zt[ce.HOMEVERSE_TESTNET],Dr("homeverse-testnet")),sr({},zt[ce.AVALANCHE_TESTNET],Dr("avalanche-testnet")),sr({},zt[ce.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),sr({},zt[ce.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Qd="2.0";class Q4{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=vW(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(s){r(s,void 0)}}}const vW=(t,e)=>{if(t.length===0)return e;const r=s=>s.sendAsyncMiddleware?s.sendAsyncMiddleware:s;let n;n=r(t[t.length-1])(e);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return n};function yW(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function mW(t){return t!==void 0&&t.sendAsync!==void 0}let pxe=0;class bb{constructor(e,r){this.sendAsync=(n,s,i)=>{this.send(n.method,n.params,i||this.defaultChainId).then(o=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{s(o,void 0)})},this.defaultChainId=r,yW(e)?this.send=e.send.bind(e):mW(e)?this.send=(n,s,i)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Qd,id:++pxe,method:n,params:s},(l,c)=>{l?a(l):o(c?c.result:void 0)},i||this.defaultChainId)}):this.send=e,this.request=(n,s)=>this.send(n.method,n.params,s)}}class gxe{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(s=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:s})}).catch(s=>{n(s,void 0)})},this.send=this.sendAsync,this.provider=e}}class bxe{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}}const sS=t=>e=>(r,n,s)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,s)};class Y4{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,s,i)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,i||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){s(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}s(o,a)},i||this.defaultChainId)},this.cacheKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class pW{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){s(void 0,{jsonrpc:"2.0",id:o,result:[Ye(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){s(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,s,i)},this.options=e}}const gW=t=>(e,r,n)=>{t(e,(s,i)=>{if(!s&&i&&i.error)throw typeof i.error=="string"?new Error(i.error):new Error(i.error.message);r(s,i)},n)},bW=t=>(e,r,n)=>{const s=n?` chainId:${n}`:"";xe.info(`[provider request]${s} id:${e.id} method:${e.method} params:`,e.params),t(e,(i,o)=>{i?xe.warn(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"error:",i):xe.info(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(i,o)},n)},wxe=t=>e=>(r,n,s)=>{const i=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${i}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(i)});return}e(r,n,s)},wW=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class xxe{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{if(wW.includes(n.method)){this.provider.sendAsync(n,s,i);return}r(n,s,i)},this.provider=e}}class Cxe{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wW],this.sendAsyncMiddleware=r=>(n,s)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(i=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:i})}).catch(i=>s(i));return}xe.debug("[public-provider] sending request to signer window",n.method),r(n,s)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new xa(e))}}class xW{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.sendAsyncMiddleware=e=>(r,n,s)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,s);return}const i=this.requestKey(r.method,r.params||[],s);if(!this.inflight[i])this.inflight[i]=[];else{this.inflight[i].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let s="";return n?s=`${n}:${e}:`:s=`:${e}:`,!r||r.length===0?s+"[]":s+JSON.stringify(r)},this.inflight={}}}class Exe extends xa{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return k0(this.connection,JSON.stringify(c),Sxe).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,s=r==null?void 0:r.middlewares,i=r==null?void 0:r.blockCache;this._chainId=n;const o=new Q4(s??[new pW({chainId:n}),new xW,new Y4({defaultChainId:n,blockCache:i})],new bb(this.fetch,n));this._sender=new bb(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=zt[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:s}}else{const r=await this.send("eth_chainId",[]);return this._chainId=Z.from(r).toNumber(),this.getNetwork()}}}function Sxe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const kxe=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:bxe,CachedProvider:Y4,ChainId:ce,EagerProvider:pW,JsonRpcExternalProvider:gxe,JsonRpcProvider:Exe,JsonRpcRouter:Q4,JsonRpcSender:bb,JsonRpcVersion:Qd,NetworkType:ut,PublicProvider:Cxe,SigningProvider:xxe,SingleflightMiddleware:xW,allNetworks:Kd,allowProviderMiddleware:sS,checkNetworkConfig:yxe,createJsonRpcMiddlewareStack:vW,ensureUniqueNetworks:hxe,ensureValidNetworks:lW,exceptionProviderMiddleware:gW,findNetworkConfig:Li,findSupportedNetwork:K4,getChainId:oW,indexerURL:qw,isJsonRpcHandler:mW,isJsonRpcProvider:yW,isNetworkConfig:uxe,isValidNetworkConfig:aW,loggingProviderMiddleware:bW,maybeChainId:dxe,networkProviderMiddleware:wxe,networks:zt,networksIndex:mxe,nodesURL:dW,relayerURL:uW,sortNetworks:fW,stringTemplate:Vw,toChainIdNumber:hW,updateNetworkConfig:vxe,validateAndSortNetworks:cW},Symbol.toStringTag,{value:"Module"}));function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(X4(s))return He(["uint8","uint8","address"],[sf.Address,s.weight,s.address]);if(s.isDynamic){const i=ne(s.signature);return He(["uint8","uint8","address","uint16","bytes"],[sf.DynamicSignature,s.weight,s.address,i.length,i])}return He(["uint8","uint8","bytes"],[sf.EOASignature,s.weight,s.signature])});return He(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function AW(t,e,r){const n=$0(e),s=await Promise.all(t.signers.map(async i=>{if(X4(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!J4(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:A0(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function fv(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=Z.from(0);const i=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=ne(l.signature);return s=s.add(a.weight),l.isDynamic||c.length!==66?kn({},a,{isDynamic:!0,signature:l.signature,address:a.address}):kn({},a,{isDynamic:!1,signature:l.signature})});return{encoded:Z4({version:1,threshold:t.threshold,signers:i}),weight:s}}const eA={decode:t=>$W(t),encode:t=>Z4(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>AW(t,e,r),encodeSigners:(t,e,r,n)=>fv(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=eA.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var Mxe=Object.freeze({__proto__:null,SignaturePartType:sf,isAddressMember:X4,isUnrecoveredSignatureMember:SW,isUnrecoveredSignature:kW,decodeSignature:$W,encodeSignature:Z4,recoverSignature:AW,encodeSigners:fv,SignatureCoder:eA});const tA={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Ue(Gn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),He(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>Z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:Z.from(e.weight).toNumber()})),fromSimple:t=>{if(!rr.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en([...$n.mainModule.abi,...$n.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[tA.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:Z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:Z.from(n.weight),address:n.address}));return{version:e.version,threshold:Z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!rr.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Z.from(i).sub(o).toNumber())){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}return fv(t,r,[]).encoded}};var Dxe=Object.freeze({__proto__:null,ConfigCoder:tA});const _W=1,PW={version:_W,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Zo=Object.freeze({__proto__:null,config:Dxe,signature:Mxe,version:_W,DeployedWalletContext:PW});const rA="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function TW(t){return Ue(RW(t))}function RW(t){return He(["bytes32","bytes32"],[rA,t])}function IW(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===rA)return te(e.slice(32,64))}function Nxe(t){return IW(t)!==void 0}var Lxe=Object.freeze({__proto__:null,SetImageHashPrefix:rA,hashSetImageHash:TW,messageSetImageHash:RW,decodeMessageSetImageHash:IW,isMessageSetImageHash:Nxe});let Xr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),gr=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const wb=66;function Pf(t){return t.left!==void 0&&t.right!==void 0}function Nh(t){return t.tree!==void 0}function _0(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function xb(t){let e=ne(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case gr.Signature:{const i=e[0],o=te(e.slice(1,wb+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(wb+1)}break;case gr.Address:{const i=e[0],o=Ye(te(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case gr.DynamicSignature:{const i=e[0],o=Ye(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=te(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case gr.Node:{const i=te(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case gr.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=xb(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case gr.Subdigest:{const i=te(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case gr.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=xb(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class OW extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function of(t,e,r){if(Pf(t)){const[n,s]=await Promise.all([of(t.left,e,r),of(t.right,e,r)]);return{left:n,right:s}}if(Nh(t))return{weight:t.weight,threshold:t.threshold,tree:await of(t.tree,e,r)};if(_0(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await J4(t.address,e,t.signature,r))throw new OW(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:A0(e,t.signature),signature:t.signature,subdigest:e};return t}const gn={concat:(t,e)=>He(["bytes","bytes"],[t,e]),node:t=>He(["uint8","bytes32"],[gr.Node,t]),branch:t=>{const e=ne(t);return He(["uint8","uint24","bytes"],[gr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t,e,n.length,n])},subdigest:t=>He(["uint8","bytes32"],[gr.Subdigest,t]),signature:(t,e)=>He(["uint8","uint8","bytes"],[gr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>He(["uint8","uint8","address"],[gr.Address,t,e])};function uv(t,e,r,n,s={}){const i=dv(t.tree,e,r,s);return Z.from(n).isZero()?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:Z.from(t.threshold).gt(255)?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:He(["uint8","uint8","uint32","bytes"],[Xr.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function dv(t,e,r,n={}){const s=!n.disableTrim;if(qi(t)){const i=dv(t.left,e,r),o=dv(t.right,e,r),a=Wn(t.left),l=Wn(t.right);return s&&i.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:gn.node(ws(t)),weight:rr}:s&&o.weight.eq(0)&&!l?{encoded:gn.concat(i.encoded,gn.node(ws(t.right))),weight:i.weight}:s&&i.weight.eq(0)&&!a?{encoded:gn.concat(gn.node(ws(t.left)),gn.branch(o.encoded)),weight:o.weight}:{encoded:gn.concat(i.encoded,gn.branch(o.encoded)),weight:i.weight.add(o.weight)}}if(Ma(t)){const i=dv(t.tree,e,r);return s&&i.weight.eq(0)?{encoded:gn.node(ws(t)),weight:rr}:{encoded:gn.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(Da(t))return{encoded:gn.node(ws(t)),weight:rr};if(Oa(t)){const i=r.includes(t.subdigest);return{encoded:gn.node(ws(t)),weight:i?kV:rr}}if(Wn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:gn.dynamicSignature(t.weight,t.address,a),weight:Z.from(t.weight)}:{encoded:gn.signature(t.weight,a),weight:Z.from(t.weight)}}else return{encoded:gn.address(t.weight,t.address),weight:rr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function nA(t){return iA(t)?nA(t.suffix[t.suffix.length-1]):t.config}function sA(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function P0(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(sA)}function MW(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function iA(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(MW)}function Ww(t){const e=ne(t),r=e[0];switch(r){case Xr.Legacy:return{version:2,type:Xr.Legacy,decoded:jp(e)};case Xr.Dynamic:return{version:2,type:Xr.Dynamic,decoded:jp(e.slice(1))};case Xr.NoChainIdDynamic:return{version:2,type:Xr.NoChainIdDynamic,decoded:jp(e.slice(1))};case Xr.Chained:return DW(e);default:throw new Error(`Invalid signature type: ${r}`)}}function jp(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=xb(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function DW(t){const e=ne(t),r=e[0];if(r!==Xr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sne(Il(i))),s=He(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return He(["uint8","bytes"],[Xr.Chained,s])}function Il(t){if(ma(t))return te(t);if(P0(t)||iA(t))return Hw(Il(t),(t.suffix||[]).map(Il));const e=sA(t)?t.decoded:t.config;switch(t.type){case Xr.Legacy:if(Z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return iS(e);case Xr.NoChainIdDynamic:case Xr.Dynamic:return He(["uint8","bytes"],[t.type,iS(e)]);case Xr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function iS(t){return He(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,hv(t.tree)])}function hv(t){if(qi(t)||Pf(t)){const e=ne(hv(t.right)),r=ne(hv(t.left));return qi(t.right)||Pf(t.right)?He(["bytes","uint8","uint24","bytes"],[r,gr.Branch,e.length,e]):He(["bytes","bytes"],[r,e])}if(Ma(t)||Nh(t)){const e=ne(hv(t.tree));return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t.weight,t.threshold,e.length,e])}if(_0(t)||Wn(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==wb){if(!t.address)throw new Error("Dynamic signature leaf must have address");return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t.weight,t.address,e.length,e])}else return He(["uint8","uint8","bytes"],[gr.Signature,t.weight,e])}if(Wn(t))return He(["uint8","uint8","address"],[gr.Address,t.weight,t.address]);if(Da(t))return He(["uint8","bytes32"],[gr.Node,t.nodeHash]);if(Oa(t))return He(["uint8","bytes32"],[gr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function vv(t){return qi(t)?[...vv(t.left),...vv(t.right)]:Ma(t)?vv(t.tree):Wn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function yv(t){return Pf(t)?[...yv(t.left),...yv(t.right)]:Nh(t)?yv(t.tree):_0(t)?[t.signature]:[]}function Fp(t){return Pf(t)?[...Fp(t.left),...Fp(t.right)]:Nh(t)?Fp(t.tree):Oa(t)?[t.subdigest]:[]}async function Cb(t){const e=typeof t=="string"?Ww(t):t;if(P0(e)){const n=await Promise.all([Cb(kn({},e,{suffix:void 0})),...e.suffix.map(s=>Cb(s))]);return Hw(n[0],n.slice(1))}const{trimmed:r}=await mv(e.decoded.tree);return Il(kn({},e,{decoded:kn({},e.decoded,{tree:r})}))}async function mv(t,e=!0){if(Pf(t)){const[r,n]=await Promise.all([mv(t.left),mv(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Nh(t)){const r=await mv(t.tree);if(r.weight===0)try{const n=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Da(t)&&FW(t.nodeHash)?{weight:0,trimmed:kn({},jW(t.nodeHash))}:_0(t)||Wn(t)&&t.signature!==void 0?{weight:Z.from(t.weight).toNumber(),trimmed:t}:!e&&Oa(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Gw={decode:t=>Ww(t),encode:t=>Il(t),trim:t=>Cb(t),supportsNoChainId:!0,recover:(t,e,r)=>oA(t,e,r),encodeSigners:(t,e,r,n)=>uv(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Gw.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=ma(t)?t:Il(t),s=r.map(i=>ma(i)?i:Il(i));return Hw(n,s)},hashSetImageHash:function(t){return TW(t)},signaturesOf(t){return vv(t.tree)},signaturesOfDecoded:function(t){return yv(t.decoded.tree)}};var jxe=Object.freeze({__proto__:null,SignatureType:Xr,SignaturePartType:gr,SignaturePartTypeLength:wb,isUnrecoveredNode:Pf,isUnrecoveredNestedLeaf:Nh,isUnrecoveredSignatureLeaf:_0,decodeSignatureTree:xb,InvalidSignatureLeafError:OW,recoverTopology:of,partEncoder:gn,encodeSigners:uv,encodeTree:dv,deepestConfigOfSignature:nA,isUnrecoveredSignature:sA,isUnrecoveredChainedSignature:P0,isSignature:MW,isChainedSignature:iA,decodeSignature:Ww,decodeSignatureBody:jp,decodeChainedSignature:DW,setImageHashStruct:NW,recoverSignature:oA,encodeChain:Hw,encodeSignature:Il,encodeSignatureBody:iS,encodeSignatureTree:hv,signaturesOf:vv,signaturesOfDecoded:yv,subdigestsOfDecoded:Fp,trimSignature:Cb,trimUnrecoveredTree:mv,SignatureCoder:Gw});function Wn(t){return t.address!==void 0&&t.weight!==void 0}function Oa(t){return t.subdigest!==void 0&&t.address===void 0}function pv(t){return qi(t)?JSON.stringify({left:pv(t.left),right:pv(t.right)}):Ma(t)?JSON.stringify({weight:Z.from(t.weight).toString(),threshold:Z.from(t.threshold).toString(),tree:pv(t.tree)}):Wn(t)?JSON.stringify({address:t.address,weight:Z.from(t.weight).toString()}):JSON.stringify(t)}function gv(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:gv(e.left),right:gv(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:Z.from(e.weight),threshold:Z.from(e.threshold),tree:gv(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:Z.from(e.weight)}:e}function Ma(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Da(t){return t.nodeHash!==void 0}function aA(t){return Wn(t)||Oa(t)||Ma(t)||Da(t)}function qi(t){return t.left!==void 0&&t.right!==void 0}function Fxe(t){return qi(t)||aA(t)}function LW(t){return He(["uint96","address"],[t.weight,t.address])}function jW(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=Z.from(e.slice(0,12)),n=Ye(te(e.slice(12)));return{weight:r,address:n}}function FW(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ws(t){if(Wn(t))return LW(t);if(Oa(t))return aa(["string","bytes32"],[`Sequence static digest: +`)}static register(e,r){r||(r=e.locale)}}const g2e="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let lv=null;function S9(t){if(lv==null&&(lv=g2e.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),S0.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw lv=null,new Error("BIP39 Wordlist for en (English) FAILED")}class b2e extends S0{constructor(){super("en")}getWord(e){return S9(this),lv[e]}getWordIndex(e){return S9(this),lv.indexOf(e)}}const wq=new b2e;S0.register(wq);const k9={en:wq},w2e="hdnode/5.7.0",Ty=new ee(w2e),x2e=Z.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),C2e=xt("Bitcoin seed"),$u=2147483648;function xq(t){return(1<=256)throw new Error("Depth too large!");return $9(Ht([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ht(te(this.index),4),this.chainCode,this.privateKey!=null?Ht(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ho(cu,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~$u));const n=new Uint8Array(37);if(e&$u){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ne(this.privateKey),1),r&&(r+="'")}else n.set(ne(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const s=ne(Py(Hd.sha512,this.chainCode,n)),i=s.slice(0,32),o=s.slice(32);let a=null,l=null;this.privateKey?a=Rm(Z.from(i).add(this.privateKey).mod(x2e)):l=new db(te(i))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new Ho(cu,a,l,this.fingerprint,Rm(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let s=0;s=$u)throw new Error("invalid path index - "+i);n=n._derive($u+o)}else if(i.match(/^[0-9]+$/)){const o=parseInt(i);if(o>=$u)throw new Error("invalid path index - "+i);n=n._derive(o)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=ne(Py(Hd.sha512,C2e,n));return new Ho(cu,Rm(s.slice(0,32)),null,"0x00000000",Rm(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=F4(n),e=Eq(B4(e,n),n),Ho._fromSeed(Cq(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ho._fromSeed(e,null)}static fromExtendedKey(e){const r=Wd.decode(e);(r.length!==82||$9(r.slice(0,78))!==e)&&Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=te(r.slice(5,9)),i=parseInt(te(r.slice(9,13)).substring(2),16),o=te(r.slice(13,45)),a=r.slice(45,78);switch(te(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ho(cu,null,te(a),s,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Ho(cu,te(a.slice(1)),null,s,o,i,n,null)}return Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Cq(t,e){e||(e="");const r=xt("mnemonic"+e,pa.NFKD);return y2e(xt(t,pa.NFKD),r,2048,64,"sha512")}function B4(t,e){e=F4(e),Ty.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ne(new Uint8Array(Math.ceil(11*r.length/8)));let s=0;for(let c=0;c>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=xq(o);if((ne(wa(n.slice(0,i/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,i/8))}function Eq(t,e){if(e=F4(e),t=ne(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&E2e(8-n)),n+=3);const s=t.length/4,i=ne(wa(t))[0]&xq(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}function k2e(t,e){try{return B4(t,e),!0}catch{}return!1}function $2e(t){return(typeof t!="number"||t<0||t>=$u||t%1)&&Ty.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const A2e="random/5.7.0",Q3=new ee(A2e);function _2e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const A9=_2e();let Dp=A9.crypto||A9.msCrypto;(!Dp||!Dp.getRandomValues)&&(Q3.warn("WARNING: Missing strong random number source"),Dp={getRandomValues:function(t){return Q3.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function jw(t){(t<=0||t>1024||t%1||t!=t)&&Q3.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Dp.getRandomValues(e),ne(e)}function Sq(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function P2e(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function T2e(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function R2e(t){if(P2e(t))try{return Ye(JSON.parse(t).ethaddr)}catch{return null}if(T2e(t))try{return Ye(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function kq(t,e){return $f(R4(t),e)}function I2e(t,e,r,n){return $f(Yr.hash(t,e,r),n)}const O2e="networks/5.7.1",_9=new ee(O2e);function M2e(t){return t&&typeof t.renetwork=="function"}function Yo(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Yo(r)},e}function vb(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return vb(t,n)},r}const P9={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Yo("homestead")},T9={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Yo("ropsten")},R9={chainId:63,name:"classicMordor",_defaultProvider:vb("https://www.ethercluster.com/mordor","classicMordor")},Im={unspecified:{chainId:0,name:"unspecified"},homestead:P9,mainnet:P9,morden:{chainId:2,name:"morden"},ropsten:T9,testnet:T9,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Yo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Yo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Yo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Yo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:vb("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:R9,classicTestnet:R9,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:vb("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Yo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Yo("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function D2e(t){if(t==null)return null;if(typeof t=="number"){for(const n in Im){const s=Im[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Im[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Im[t.name];if(!e)return typeof t.chainId!="number"&&_9.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&_9.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(M2e(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const N2e="web/5.7.1";var L2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function j2e(t,e){return L2e(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((o,a)=>{i[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{i[o.toLowerCase()]=n.headers.get(o)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(s))}})}var F2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const xi=new ee(N2e);function I9(t){return new Promise(e=>{setTimeout(e,t)})}function Ha(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ma(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Ia(t)}catch{}return te(t)}return t}function B2e(t){return xt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function $q(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;xi.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;xi.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&xi.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&xi.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+P4(xt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?_4(h[3]):B2e(h[3])};let p=b.body;return r&&(p=r(b.body,b)),Promise.resolve(p)}catch(b){xi.throwError("processing response error",ee.errors.SERVER_ERROR,{body:Ha(h[1],h[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const v={};Object.keys(a).forEach(b=>{const p=a[b];v[p.key]=p.value}),c.headers=v;const y=function(){let b=null;return{promise:new Promise(function(E,k){u&&(b=setTimeout(()=>{b!=null&&(b=null,k(xi.makeError("timeout",ee.errors.TIMEOUT,{requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),g=function(){return F2e(this,void 0,void 0,function*(){for(let b=0;b=300)&&(y.cancel(),xi.throwError("bad response",ee.errors.SERVER_ERROR,{status:p.statusCode,headers:p.headers,body:Ha(w,p.headers?p.headers["content-type"]:null),requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,url:l})),r)try{const E=yield r(w,p);return y.cancel(),E}catch(E){if(E.throttleRetry&&b{let a=null;if(i!=null)try{a=JSON.parse(Ia(i))}catch(l){xi.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:i,error:l})}return r&&(a=r(a,o)),a},s=null;if(e!=null){s=xt(e);const i=typeof t=="string"?{url:t}:Gt(t);i.headers?Object.keys(i.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(i.headers=Gt(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return $q(t,s,n)}function yl(t,e){return e||(e={}),e=Gt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let s=null,i=!1;const o=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!i){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var yb="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Y3={};for(var Om=0;Om>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Aq(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=md(e)^n>>5}for(e=md(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Aq(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=md(n)^o,s+=yb.charAt(o)}for(i=0;i<6;++i)n=md(n);for(n^=1,i=0;i<6;++i){var a=n>>(5-i)*5&31;s+=yb.charAt(a)}return s}function _q(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),o=t.slice(s+1);if(o.length<6)return"Data too short";var a=Aq(i);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:i,words:l}}function z2e(){var t=_q.apply(null,arguments);if(typeof t=="object")return t}function V2e(t){var e=_q.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fw(t,e,r,n){for(var s=0,i=0,o=(1<=r;)i-=r,a.push(s>>i&o);if(n)i>0&&a.push(s<=e)return"Excess padding";if(s<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:ve.allowNull(this.accessList.bind(this),null),blockHash:ve.allowNull(o,null),blockNumber:ve.allowNull(l,null),transactionIndex:ve.allowNull(l,null),confirmations:ve.allowNull(l,null),from:r,gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),gasLimit:n,to:ve.allowNull(r,null),value:n,nonce:l,data:i,r:ve.allowNull(this.uint256),s:ve.allowNull(this.uint256),v:ve.allowNull(l),creates:ve.allowNull(r,null),raw:ve.allowNull(i)},e.transactionRequest={from:ve.allowNull(r),nonce:ve.allowNull(l),gasLimit:ve.allowNull(n),gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),to:ve.allowNull(r),value:ve.allowNull(n),data:ve.allowNull(f),type:ve.allowNull(l),accessList:ve.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ve.arrayOf(o),data:i,logIndex:l,blockHash:o},e.receipt={to:ve.allowNull(this.address,null),from:ve.allowNull(this.address,null),contractAddress:ve.allowNull(r,null),transactionIndex:l,root:ve.allowNull(a),gasUsed:n,logsBloom:ve.allowNull(i),blockHash:o,transactionHash:o,logs:ve.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ve.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ve.allowNull(n),status:ve.allowNull(l),type:c},e.block={hash:ve.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ve.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ve.allowNull(r),extraData:i,transactions:ve.allowNull(ve.arrayOf(o)),baseFeePerGas:ve.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=ve.allowNull(ve.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ve.allowNull(s,void 0),toBlock:ve.allowNull(s,void 0),blockHash:ve.allowNull(o,void 0),address:ve.allowNull(r,void 0),topics:ve.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ve.allowNull(l),blockHash:ve.allowNull(o),transactionIndex:l,removed:ve.allowNull(this.boolean.bind(this)),address:r,data:ve.allowFalsish(i,"0x"),topics:ve.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Hf(e||[])}number(e){return e==="0x"?0:Z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Z.from(e).toNumber()}bigNumber(e){return Z.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),ze(e))?e.toLowerCase():y1.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Ye(e)}callAddress(e){if(!ze(e,32))return null;const r=Ye(Sr(e,12));return r===Ar?null:r}contractAddress(e){return E4(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ze(e))return Hl(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Io(n)!==32?y1.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!ze(e))throw new Error("invalid uint256");return ht(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=ve.check(r,e);return s._difficulty=n==null?null:Z.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ve.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Z.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=ve.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ze(n)&&(n=Z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),ze(n)&&(n=Z.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return yq(e)}receiptLog(e){return ve.check(this.formats.receiptLog,e)}receipt(e){const r=ve.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&y1.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):y1.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&y1.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return ve.check(this.formats.filter,e)}filterLog(e){return ve.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(s){n.push(e(s))}),n}}}function K2e(t){return t&&typeof t.isCommunityResource=="function"}function M9(t){return K2e(t)&&t.isCommunityResource()}var Pe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ge=new ee(Mh),Q2e=10;function D9(t){return t==null?"null":(Io(t)!==32&&Ge.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function N9(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(s=>{r[D9(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return D9(e)}).join("&")}function Y2e(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function fu(t){if(typeof t=="string"){if(t=t.toLowerCase(),Io(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+N9(t);if(fge.isForkEvent(t))throw Ge.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+N9(t.topics||[])}throw new Error("invalid event - "+t)}function m1(){return new Date().getTime()}function L9(t){return new Promise(e=>{setTimeout(e,t)})}const J2e=["block","network","pending","poll"];let X2e=class{constructor(e,r,n){oe(this,"tag",e),oe(this,"listener",r),oe(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=Y2e(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||J2e.indexOf(this.tag)>=0}};const Z2e={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function RE(t){return ht(Z.from(t).toHexString(),32)}function j9(t){return Wd.encode(Ht([t,Sr(wa(wa(t)),0,4)]))}const Pq=new RegExp("^(ipfs)://(.*)$","i"),F9=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Pq,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Np(t,e){try{return Ia(Ry(t,e))}catch{}return null}function Ry(t,e){if(t==="0x")return null;const r=Z.from(Sr(t,e,e+32)).toNumber(),n=Z.from(Sr(t,r,r+32)).toNumber();return Sr(t,r+32,r+32+n)}function IE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ge.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function B9(t){const e=ne(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function ewe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Tq(t){const e=[];let r=0;for(let n=0;nZ.from(e).eq(1)).catch(e=>{if(e.code===ee.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Pe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:jn([e,av(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=jn(["0x9061b923",Tq([NV(this.name),n.data])]));try{let i=yield this.provider.call(n);return ne(i).length%32===4&&Ge.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=Ry(i,0)),i}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return Pe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Ry(n,0):null})}_getAddress(e,r){const n=Z2e[String(e)];if(n==null&&Ge.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=ne(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return j9(Ht([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return j9(Ht([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let o=s[0];if(o===0?i!==20&&i!==32&&(o=-1):o=-1,o>=0&&s.length===2+i&&i>=1&&i<=75){const a=O9.toWords(s.slice(2));return a.unshift(o),O9.encode(n.prefix,a)}}return null}getAddress(e){return Pe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===ob?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",RE(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ge.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Pe(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ge.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Pe(this,void 0,void 0,function*(){let r=xt(e);r=Ht([RE(64),RE(r.length),r]),r.length%32!==0&&(r=Ht([r,ht("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:Ia(n)})}}let OE=null,twe=1;class Bw extends uc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),oe(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Ti(new.target,"getNetwork")(e);r?(oe(this,"_network",r),this.emit("network",r,null)):Ge.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Pe(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ge.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:oe(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return yl(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return OE==null&&(OE=new ve),OE}static getNetwork(e){return D2e(e??"homestead")}ccipReadFetch(e,r,n){return Pe(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:i,sender:s}),u=yield k0({url:c,errorPassThrough:!0},f,(h,v)=>(h.status=v.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ge.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ge.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Pe(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(m1()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=m1(),n=mt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const o=m1();return s=Z.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Pe(this,void 0,void 0,function*(){const e=twe++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ge.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ge.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let o=this.getTransactionReceipt(i).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+i]=a.blockNumber,this.emit(i,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const o=i.toBlock-this._maxFilterBlockRange;o>i.fromBlock&&(i.fromBlock=o),i.fromBlock<0&&(i.fromBlock=0);const a=this.getLogs(i).then(l=>{s._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(i,c)})}).catch(l=>{this.emit("error",l),s._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Pe(this,void 0,void 0,function*(){return Ge.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Pe(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield L9(0),this._network;const n=Ge.makeError("underlying network changed",ee.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=m1();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Pe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return Pe(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),s){let d=s.startBlock,h=null;const v=y=>Pe(this,void 0,void 0,function*(){c||(yield L9(1e3),this.getTransactionCount(s.from).then(g=>Pe(this,void 0,void 0,function*(){if(!c){if(g<=s.nonce)d=y;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",v)}))});if(c)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ge.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Pe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Z.from(e)}catch(r){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Z.from(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Z.from(s).toNumber()}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return te(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Hl(o))}),i=yield this.perform("getStorageAt",s);try{return te(i)}catch(o){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Io(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&Ge.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,o)=>Pe(this,void 0,void 0,function*(){i==null&&(i=1),o==null&&(o=0);let a;i!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,i,o,a);return l==null&&i===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ge.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),s}sendTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>te(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return Pe(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Z.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?te(i):null))}),this.formatter.transactionRequest(yield mt(n))})}_getFilter(e){return Pe(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield mt(r))})}_call(e,r,n){return Pe(this,void 0,void 0,function*(){n>=Q2e&&Ge.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Io(i)%32===4)try{const o=Sr(i,4),a=Sr(o,0,32);Z.from(a).eq(s)||Ge.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=Z.from(Sr(o,32,64)).toNumber(),f=Z.from(Sr(o,c,c+32)).toNumber(),u=Sr(o,c+32);for(let b=0;bPe(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return s}),{oncePoll:this})})}getLogs(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield mt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),ve.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Pe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Pe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ge.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Pe(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const s=new J3(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Pe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ge.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+av(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return Pe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ze(e))throw n}typeof e!="string"&&Ge.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Pe(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const s=Np(yield this.call({to:n,data:"0x691f3431"+av(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return Pe(this,void 0,void 0,function*(){let r=null;if(ze(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(i,"getAvatar");if(!o)return null;r=new J3(this,o,i);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a}try{const a=Np(yield this.call({to:o,data:"0x691f3431"+av(i).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ge.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const s=new X2e(fu(e),r,n);return this._events.push(s),this._startEvent(s),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,s=[],i=fu(e);return this._events=this._events.filter(o=>o.tag!==i?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(s.push(o),!1):!0)),s.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=fu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=fu(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let s=!1,i=fu(e);return this._events=this._events.filter(o=>o.tag!==i||o.listener!=r||s?!0:(s=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=fu(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Go=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Tr=new ee(Mh),rwe=["call","estimateGas"];function cv(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=ze(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=cv(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return cv(JSON.parse(t),e)}catch{}return null}function Rq(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=cv(e,!0);if(i)return i.data;Tr.throwError("missing revert data in call exception; Transaction reverted without a reason string",ee.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=cv(e.body,!1);i==null&&(i=cv(e,!1)),i&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Tr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&Tr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Tr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&Tr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),rwe.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function U9(t){return new Promise(function(e){setTimeout(e,t)})}function nwe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function p1(t){return t&&t.toLowerCase()}const X3={};class Iq extends Sf{constructor(e,r,n){if(super(),e!==X3)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");oe(this,"provider",r),n==null&&(n=0),typeof n=="string"?(oe(this,"_address",this.provider.formatter.address(n)),oe(this,"_index",null)):typeof n=="number"?(oe(this,"_index",n),oe(this,"_address",null)):Tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Tr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new swe(X3,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Tr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Go(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&Tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),mt({tx:mt(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&Tr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Rq("sendTransaction",o,i)))})}signTransaction(e){return Tr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Go(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield yl(()=>Go(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Go(this,void 0,void 0,function*(){const s=yield Yr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Yr.getPayload(s.domain,r,s.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),o}})}unlock(e){return Go(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class swe extends Iq{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const iwe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let xa=class extends Bw{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(o=>{s(o)},o=>{i(o)})},0)})),super(n),e||(e=Ti(this.constructor,"defaultUrl")()),typeof e=="string"?oe(this,"connection",Object.freeze({url:e})):oe(this,"connection",Object.freeze(Gt(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Go(this,void 0,void 0,function*(){yield U9(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Ti(this.constructor,"getNetwork");try{return r(Z.from(e).toNumber())}catch(n){return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Iq(X3,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:_s(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=k0(this.connection,JSON.stringify(n),nwe).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[p1(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[p1(r.address),r.blockTag]];case"getCode":return["eth_getCode",[p1(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[p1(r.address),ht(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=p1(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Go(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Z.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Tr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return Rq(e,s,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return i.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return U9(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(iwe);if(r)for(const i in r)r[i]&&(n[i]=!0);w4(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const o=Hl(Z.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=o}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=te(e[i]))}),e.accessList&&(s.accessList=Hf(e.accessList)),s}};var owe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const awe=new ee(Mh);class mb extends xa{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return owe(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||awe.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(oe(this,"_network",r),this.emit("network",r,null))),r})}}var pb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Fc=new ee(Mh);function Mm(){return new Date().getTime()}function z9(t){let e=null;for(let r=0;re?null:(n+s)/2}function Hu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Z.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Hu(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=Hu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let lwe=1;function q9(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const s=o=>(n=n.then(o),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const cwe=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],fwe=["address","args","errorArgs","errorSignature","method","transaction"];function Dm(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function uwe(t,e){return function(r){const n={};r.forEach(i=>{const o=t(i.result);n[o]||(n[o]={count:0,result:i.result}),n[o].count++});const s=Object.keys(n);for(let i=0;i=e)return o.result}}}function dwe(t,e,r){let n=Hu;switch(e){case"getBlockNumber":return function(s){const i=s.map(a=>a.result);let o=V9(s.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),i.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(o=>o.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return V9(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=Gt(s),s.confirmations=-1,Hu(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=Gt(s),s.transactions=s.transactions.map(i=>(i=Gt(i),i.confirmations=-1,i)),Hu(s))}:n=function(s){return s==null?null:Hu(s)};break;default:throw new Error("unknown method: "+e)}return uwe(n,t.quorum)}function g1(t,e){return pb(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:yl(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function hwe(t,e,r,n){return pb(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&ze(i.fromBlock)||i.toBlock&&ze(i.toBlock))&&(s=yield g1(t,e)),s.getLogs(i)}}return Fc.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class vwe extends Bw{constructor(e,r){e.length===0&&Fc.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(uc.isProvider(o)){const f=M9(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:f,priority:1})}const l=Gt(o);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=M9(o)?2e3:750),l.weight==null&&(l.weight=1);const c=l.weight;return(c%1||c>512||c<1)&&Fc.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,c),Object.freeze(l)}),s=n.reduce((o,a)=>o+a.weight,0);r==null?r=s/2:r>s&&Fc.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=z9(n.map(o=>o.provider.network));i==null&&(i=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(i),oe(this,"providerConfigs",Object.freeze(n)),oe(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return pb(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return z9(e)})}perform(e,r){return pb(this,void 0,void 0,function*(){if(e==="sendTransaction"){const l=yield Promise.all(this.providerConfigs.map(c=>c.provider.sendTransaction(r.signedTransaction).then(f=>f.hash,f=>f)));for(let c=0;cl.priority-c.priority);const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const l=Mm();let c=s.filter(h=>h.runner&&l-h.starth+v.weight,0);for(;c{h.staller=null}),h.runner=hwe(h,i,e,r).then(y=>{h.done=!0,h.result=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})},y=>{h.done=!0,h.error=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,null),request:{method:e,params:_s(r)},provider:this}),c+=h.weight}const f=[];s.forEach(h=>{h.done||!h.runner||(f.push(h.runner),h.staller&&f.push(h.staller.getPromise()))}),f.length&&(yield Promise.race(f));const u=s.filter(h=>h.done&&h.error==null);if(u.length>=this.quorum){const h=n(u);if(h!==void 0)return s.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),h;a||(yield q9(100).getPromise()),a=!1}const d=s.reduce((h,v)=>{if(!v.done||v.error==null)return h;const y=v.error.code;return cwe.indexOf(y)>=0&&(h[y]||(h[y]={error:v.error,weight:0}),h[y].weight+=v.weight),h},{});if(Object.keys(d).forEach(h=>{const v=d[h];if(v.weight{b.staller&&b.staller.cancel(),b.cancelled=!0});const y=v.error,g={};fwe.forEach(b=>{y[b]!=null&&(g[b]=y[b])}),Fc.throwError(y.reason||y.message,h,g)}),s.filter(h=>!h.done).length===0)break}return s.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Fc.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:s.map(l=>Dm(l)),provider:this})})}}const W9=new ee(Mh);let ywe=1;function H9(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:ywe++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:_s(i),provider:this}),e(i,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:i,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function mwe(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:_s(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class Oq extends xa{constructor(e,r){e==null&&W9.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=mwe(e)):e.sendAsync?s=H9(e,e.sendAsync.bind(e)):e.send?s=H9(e,e.send.bind(e)):W9.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),oe(this,"jsonRpcFetchFunc",s),oe(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const pwe="solidity/5.7.0",gwe=new RegExp("^bytes([0-9]+)$"),bwe=new RegExp("^(u?int)([0-9]*)$"),wwe=new RegExp("^(.*)\\[([0-9]*)\\]$"),xwe="0000000000000000000000000000000000000000000000000000000000000000",Au=new ee(pwe);function Mq(t,e,r){switch(t){case"address":return r?sv(e,32):ne(e);case"string":return xt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?sv(e,32):ne(e)}let n=t.match(bwe);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&Au.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Z.from(e).toTwos(s),sv(e,s/8)}if(n=t.match(gwe),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&Au.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==s&&Au.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+xwe).substring(0,66)):e}if(n=t.match(wwe),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&Au.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(Mq(s,a,!0))}),Ht(o)}return Au.throwArgumentError("invalid type","type",t)}function He(t,e){t.length!=e.length&&Au.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(Mq(n,e[s]))}),te(Ht(r))}function aa(t,e){return Ue(He(t,e))}function Cwe(t,e){return wa(He(t,e))}const Ewe="units/5.7.0",Dq=new ee(Ewe),Nq=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Swe(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&Dq.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+s}function _r(t,e){if(typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return Tp(t,e??18)}function Gd(t,e){if(typeof t!="string"&&Dq.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return eo(t,e??18)}function kwe(t){return _r(t,18)}function $we(t){return Gd(t,18)}const Awe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:A4,ConstructorFragment:_i,ErrorFragment:Xo,EventFragment:vo,FormatTypes:st,Fragment:mo,FunctionFragment:Pi,HDNode:Ho,Indexed:cb,Interface:en,LogDescription:BV,Logger:ee,ParamType:qr,RLP:zme,SigningKey:db,get SupportedAlgorithm(){return Hd},TransactionDescription:UV,get TransactionTypes(){return K3},get UnicodeNormalizationForm(){return pa},Utf8ErrorFuncs:_V,get Utf8ErrorReason(){return es},_TypedDataEncoder:Yr,_fetchData:$q,_toEscapedUtf8String:ape,accessListify:Hf,arrayify:ne,base58:Wd,base64:$pe,checkProperties:w4,checkResultErrors:mV,commify:Swe,computeAddress:j4,computeHmac:Py,computePublicKey:N4,concat:Ht,deepCopy:_s,defaultAbiCoder:Gn,defaultPath:S2e,defineReadOnly:oe,dnsEncode:NV,entropyToMnemonic:Eq,fetchJson:k0,formatBytes32String:lpe,formatEther:kwe,formatUnits:_r,getAccountPath:$2e,getAddress:Ye,getContractAddress:E4,getCreate2Address:Gme,getIcapAddress:Hme,getJsonWalletAddress:R2e,getStatic:Ti,hashMessage:R4,hexConcat:jn,hexDataLength:Io,hexDataSlice:Sr,hexStripZeros:aV,hexValue:Hl,hexZeroPad:ht,hexlify:te,id:vl,isAddress:wV,isBytes:Ta,isBytesLike:ma,isHexString:ze,isValidMnemonic:k2e,isValidName:Ype,joinSignature:kme,keccak256:Ue,mnemonicToEntropy:B4,mnemonicToSeed:Cq,namehash:av,nameprep:Cpe,parseBytes32String:cpe,parseEther:$we,parseTransaction:yq,parseUnits:Gd,poll:yl,randomBytes:jw,recoverAddress:$f,recoverPublicKey:fq,resolveProperties:mt,ripemd160:bq,serializeTransaction:t2e,sha256:wa,sha512:v2e,shallowCopy:Gt,shuffled:Sq,solidityKeccak256:aa,solidityPack:He,soliditySha256:Cwe,splitSignature:qf,stripZeros:Eo,toUtf8Bytes:xt,toUtf8CodePoints:ab,toUtf8String:Ia,verifyMessage:kq,verifyTypedData:I2e,zeroPad:sv},Symbol.toStringTag,{value:"Module"})),Lq="3.7.5",_we=Lq,Pwe=typeof atob=="function",Twe=typeof btoa=="function",Dh=typeof Buffer=="function",G9=typeof TextDecoder=="function"?new TextDecoder:void 0,K9=typeof TextEncoder=="function"?new TextEncoder:void 0,Rwe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N1=Array.prototype.slice.call(Rwe),Nm=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(N1),Iwe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ln=String.fromCharCode.bind(String),Q9=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),jq=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Fq=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Bq=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=N1[e>>18&63]+N1[e>>12&63]+N1[e>>6&63]+N1[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},U4=Twe?t=>btoa(t):Dh?t=>Buffer.from(t,"binary").toString("base64"):Bq,Z3=Dh?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?jq(Z3(t)):Z3(t),Owe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?ln(192|e>>>6)+ln(128|e&63):ln(224|e>>>12&15)+ln(128|e>>>6&63)+ln(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return ln(240|e>>>18&7)+ln(128|e>>>12&63)+ln(128|e>>>6&63)+ln(128|e&63)}},Mwe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Uq=t=>t.replace(Mwe,Owe),Y9=Dh?t=>Buffer.from(t,"utf8").toString("base64"):K9?t=>Z3(K9.encode(t)):t=>U4(Uq(t)),pd=(t,e=!1)=>e?jq(Y9(t)):Y9(t),J9=t=>pd(t,!0),Dwe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Nwe=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return ln((r>>>10)+55296)+ln((r&1023)+56320);case 3:return ln((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ln((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},zq=t=>t.replace(Dwe,Nwe),Vq=t=>{if(t=t.replace(/\s+/g,""),!Iwe.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?ln(e>>16&255,e>>8&255):ln(e>>16&255,e>>8&255,e&255);return r},z4=Pwe?t=>atob(Fq(t)):Dh?t=>Buffer.from(t,"base64").toString("binary"):Vq,qq=Dh?t=>Q9(Buffer.from(t,"base64")):t=>Q9(z4(t).split("").map(e=>e.charCodeAt(0))),Wq=t=>qq(Hq(t)),Lwe=Dh?t=>Buffer.from(t,"base64").toString("utf8"):G9?t=>G9.decode(qq(t)):t=>zq(z4(t)),Hq=t=>Fq(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),eS=t=>Lwe(Hq(t)),jwe=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Gq=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Kq=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,Gq(r));t("fromBase64",function(){return eS(this)}),t("toBase64",function(e){return pd(this,e)}),t("toBase64URI",function(){return pd(this,!0)}),t("toBase64URL",function(){return pd(this,!0)}),t("toUint8Array",function(){return Wq(this)})},Qq=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Gq(r));t("toBase64",function(e){return Lp(this,e)}),t("toBase64URI",function(){return Lp(this,!0)}),t("toBase64URL",function(){return Lp(this,!0)})},Fwe=()=>{Kq(),Qq()},_f={version:Lq,VERSION:_we,atob:z4,atobPolyfill:Vq,btoa:U4,btoaPolyfill:Bq,fromBase64:eS,toBase64:pd,encode:pd,encodeURI:J9,encodeURL:J9,utob:Uq,btou:zq,decode:eS,isValid:jwe,fromUint8Array:Lp,toUint8Array:Wq,extendString:Kq,extendUint8Array:Qq,extendBuiltins:Fwe};var tS=function(){return tS=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),Uwe=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},zwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s;return Uc(this,function(i){return n=r.messageDigest(),s=kq(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Vwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s,i,o,a;return Uc(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=l.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Oh(r.address,i,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=l.sent(),a===qwe?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},qwe="0x1626ba7e",Yq="1",rS="eth",Wwe={name:"ETHAuth",version:Yq},Iy=function(){function t(){for(var e=[],r=0;r0&&(l+="."+s.extra),[2,l]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a,l,c,f,u,d,h,v,y;return Uc(this,function(g){switch(g.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==rS)throw new Error("ethauth: not an ethauth proof");return d=_f.decode(c),h=JSON.parse(d),v=new Uw({address:l,claims:h,signature:f,extra:u}),[4,this.validateProof(v,i)];case 1:if(y=g.sent(),!y)throw new Error("ethauth: proof is invalid");return[2,v]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a;return Uc(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return Bc(n,void 0,void 0,function(){var i,l,o,a,l;return Uc(this,function(c){switch(c.label){case 0:i=[],l=0,c.label=1;case 1:if(!(l_f.encode(t,!0),V4=t=>_f.encode(JSON.stringify(t),!0),Gwe=t=>{if(t!=null)return _f.decode(t)},q4=t=>{if(t!=null)return JSON.parse(_f.decode(t))};function Jq(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}const W4=t=>ne(Ue(typeof t=="string"?xt(t):t)),Xq=(t,e,r)=>He(["string","uint256","address","bytes32"],["",e,t,r]),nS=(t,e,r)=>Ue(Xq(t,e,r)),Zq=()=>typeof window>"u"&&typeof process=="object",Kwe=()=>!Zq(),eW=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(_f.decode(e[1]))};function gb(){return gb=Object.assign?Object.assign.bind():function(t){for(var e=1;exe.configure(t),Oy=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let Ywe=class{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,Jwe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Jwe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function H4(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function Xwe(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function Zwe(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const G4=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),rW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},nW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},sW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},exe=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),iW=t=>{const e=gb({},t.types);return delete e.EIP712Domain,Yr.hash(t.domain,e,t.message)},zw=t=>ne(iW(t)),{defineReadOnly:txe,getStatic:rxe,resolveProperties:nxe,checkProperties:sxe,shallowCopy:ixe,deepCopy:oxe}=Awe,axe=t=>t.replace(/([^:]\/)\/+/g,"$1"),lxe=Object.freeze(Object.defineProperty({__proto__:null,Logger:tW,PromiseCache:Ywe,base64Decode:Gwe,base64DecodeObject:q4,base64Encode:Hwe,base64EncodeObject:V4,checkProperties:sxe,configureLogger:Qwe,deepCopy:oxe,defineReadOnly:txe,encodeMessageDigest:W4,encodeTypedDataDigest:zw,encodeTypedDataHash:iW,getDefaultConnectionInfo:Oy,getRandomInt:G4,getStatic:rxe,isBigNumberish:Jq,isBrowser:Kwe,isNode:Zq,jwtDecodeClaims:eW,logger:xe,packMessageData:Xq,promisify:H4,queryStringFromObject:Xwe,queryStringToObject:Zwe,resolveProperties:nxe,sanitizeAlphanumeric:nW,sanitizeHost:sW,sanitizeNumberString:rW,shallowCopy:ixe,sleep:exe,subDigestOf:nS,urlClean:axe},Symbol.toStringTag,{value:"Module"}));function sr(){return sr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Z.from(t).toNumber(),fxe=t=>{if(t)return oW(t)},aW=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const s=n.map(c=>c.chainId).sort(),i=s.filter((c,f)=>s.indexOf(c)!==f);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aW(t,!0,e),t),uxe=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},dxe=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},cW=t=>lW(fW(t)),Ni=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Z.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(Z.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},hxe=(t,e)=>t?t.name===e||t.chainId===e:!1,vxe=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Vw=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",qw=t=>Vw("https://${network}-indexer.sequence.app",{network:t}),uW=t=>Vw("https://${network}-relayer.sequence.app",{network:t}),dW=t=>Vw("https://nodes.sequence.app/${network}",{network:t});function K4(t){return Ni(Kd,t)}function hW(t){return Z.isBigNumber(t)?t:Jq(t)?Z.from(t):Z.from(t.chainId)}const Dr=t=>{const e=dW(t);return{rpcUrl:e,relayer:{url:uW(t),provider:{url:e}},indexerUrl:qw(t)}},Kd=cW([sr({},zt[ce.POLYGON],Dr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),sr({},zt[ce.MAINNET],Dr("mainnet")),sr({},zt[ce.BSC],Dr("bsc")),sr({},zt[ce.AVALANCHE],Dr("avalanche")),sr({},zt[ce.ARBITRUM],Dr("arbitrum")),sr({},zt[ce.ARBITRUM_NOVA],Dr("arbitrum-nova")),sr({},zt[ce.OPTIMISM],Dr("optimism")),sr({},zt[ce.POLYGON_ZKEVM],Dr("polygon-zkevm")),sr({},zt[ce.GNOSIS],Dr("gnosis")),sr({},zt[ce.RINKEBY],Dr("rinkeby"),{disabled:!0}),sr({},zt[ce.GOERLI],Dr("goerli")),sr({},zt[ce.SEPOLIA],Dr("sepolia")),sr({},zt[ce.POLYGON_MUMBAI],Dr("mumbai")),sr({},zt[ce.BSC_TESTNET],Dr("bsc-testnet")),sr({},zt[ce.ARBITRUM_GOERLI],Dr("arbitrum-goerli")),sr({},zt[ce.BASE],Dr("base")),sr({},zt[ce.BASE_GOERLI],Dr("base-goerli")),sr({},zt[ce.HOMEVERSE_TESTNET],Dr("homeverse-testnet")),sr({},zt[ce.AVALANCHE_TESTNET],Dr("avalanche-testnet")),sr({},zt[ce.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),sr({},zt[ce.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Qd="2.0";class Q4{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=vW(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(s){r(s,void 0)}}}const vW=(t,e)=>{if(t.length===0)return e;const r=s=>s.sendAsyncMiddleware?s.sendAsyncMiddleware:s;let n;n=r(t[t.length-1])(e);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return n};function yW(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function mW(t){return t!==void 0&&t.sendAsync!==void 0}let yxe=0;class bb{constructor(e,r){this.sendAsync=(n,s,i)=>{this.send(n.method,n.params,i||this.defaultChainId).then(o=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{s(o,void 0)})},this.defaultChainId=r,yW(e)?this.send=e.send.bind(e):mW(e)?this.send=(n,s,i)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Qd,id:++yxe,method:n,params:s},(l,c)=>{l?a(l):o(c?c.result:void 0)},i||this.defaultChainId)}):this.send=e,this.request=(n,s)=>this.send(n.method,n.params,s)}}class mxe{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(s=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:s})}).catch(s=>{n(s,void 0)})},this.send=this.sendAsync,this.provider=e}}class pxe{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}}const sS=t=>e=>(r,n,s)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,s)};class Y4{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,s,i)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,i||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){s(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}s(o,a)},i||this.defaultChainId)},this.cacheKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class pW{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){s(void 0,{jsonrpc:"2.0",id:o,result:[Ye(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){s(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,s,i)},this.options=e}}const gW=t=>(e,r,n)=>{t(e,(s,i)=>{if(!s&&i&&i.error)throw typeof i.error=="string"?new Error(i.error):new Error(i.error.message);r(s,i)},n)},bW=t=>(e,r,n)=>{const s=n?` chainId:${n}`:"";xe.info(`[provider request]${s} id:${e.id} method:${e.method} params:`,e.params),t(e,(i,o)=>{i?xe.warn(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"error:",i):xe.info(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(i,o)},n)},gxe=t=>e=>(r,n,s)=>{const i=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${i}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(i)});return}e(r,n,s)},wW=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class bxe{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{if(wW.includes(n.method)){this.provider.sendAsync(n,s,i);return}r(n,s,i)},this.provider=e}}class wxe{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wW],this.sendAsyncMiddleware=r=>(n,s)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(i=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:i})}).catch(i=>s(i));return}xe.debug("[public-provider] sending request to signer window",n.method),r(n,s)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new xa(e))}}class xW{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.sendAsyncMiddleware=e=>(r,n,s)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,s);return}const i=this.requestKey(r.method,r.params||[],s);if(!this.inflight[i])this.inflight[i]=[];else{this.inflight[i].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let s="";return n?s=`${n}:${e}:`:s=`:${e}:`,!r||r.length===0?s+"[]":s+JSON.stringify(r)},this.inflight={}}}class xxe extends xa{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return k0(this.connection,JSON.stringify(c),Cxe).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,s=r==null?void 0:r.middlewares,i=r==null?void 0:r.blockCache;this._chainId=n;const o=new Q4(s??[new pW({chainId:n}),new xW,new Y4({defaultChainId:n,blockCache:i})],new bb(this.fetch,n));this._sender=new bb(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=zt[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:s}}else{const r=await this.send("eth_chainId",[]);return this._chainId=Z.from(r).toNumber(),this.getNetwork()}}}function Cxe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const Exe=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:pxe,CachedProvider:Y4,ChainId:ce,EagerProvider:pW,JsonRpcExternalProvider:mxe,JsonRpcProvider:xxe,JsonRpcRouter:Q4,JsonRpcSender:bb,JsonRpcVersion:Qd,NetworkType:ut,PublicProvider:wxe,SigningProvider:bxe,SingleflightMiddleware:xW,allNetworks:Kd,allowProviderMiddleware:sS,checkNetworkConfig:hxe,createJsonRpcMiddlewareStack:vW,ensureUniqueNetworks:uxe,ensureValidNetworks:lW,exceptionProviderMiddleware:gW,findNetworkConfig:Ni,findSupportedNetwork:K4,getChainId:oW,indexerURL:qw,isJsonRpcHandler:mW,isJsonRpcProvider:yW,isNetworkConfig:cxe,isValidNetworkConfig:aW,loggingProviderMiddleware:bW,maybeChainId:fxe,networkProviderMiddleware:gxe,networks:zt,networksIndex:vxe,nodesURL:dW,relayerURL:uW,sortNetworks:fW,stringTemplate:Vw,toChainIdNumber:hW,updateNetworkConfig:dxe,validateAndSortNetworks:cW},Symbol.toStringTag,{value:"Module"}));function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(X4(s))return He(["uint8","uint8","address"],[sf.Address,s.weight,s.address]);if(s.isDynamic){const i=ne(s.signature);return He(["uint8","uint8","address","uint16","bytes"],[sf.DynamicSignature,s.weight,s.address,i.length,i])}return He(["uint8","uint8","bytes"],[sf.EOASignature,s.weight,s.signature])});return He(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function AW(t,e,r){const n=$0(e),s=await Promise.all(t.signers.map(async i=>{if(X4(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!J4(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:A0(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function fv(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=Z.from(0);const i=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=ne(l.signature);return s=s.add(a.weight),l.isDynamic||c.length!==66?kn({},a,{isDynamic:!0,signature:l.signature,address:a.address}):kn({},a,{isDynamic:!1,signature:l.signature})});return{encoded:Z4({version:1,threshold:t.threshold,signers:i}),weight:s}}const eA={decode:t=>$W(t),encode:t=>Z4(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>AW(t,e,r),encodeSigners:(t,e,r,n)=>fv(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=eA.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var Ixe=Object.freeze({__proto__:null,SignaturePartType:sf,isAddressMember:X4,isUnrecoveredSignatureMember:SW,isUnrecoveredSignature:kW,decodeSignature:$W,encodeSignature:Z4,recoverSignature:AW,encodeSigners:fv,SignatureCoder:eA});const tA={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Ue(Gn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),He(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>Z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:Z.from(e.weight).toNumber()})),fromSimple:t=>{if(!rr.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en([...$n.mainModule.abi,...$n.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[tA.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:Z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:Z.from(n.weight),address:n.address}));return{version:e.version,threshold:Z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!rr.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Z.from(i).sub(o).toNumber())){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}return fv(t,r,[]).encoded}};var Oxe=Object.freeze({__proto__:null,ConfigCoder:tA});const _W=1,PW={version:_W,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Zo=Object.freeze({__proto__:null,config:Oxe,signature:Ixe,version:_W,DeployedWalletContext:PW});const rA="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function TW(t){return Ue(RW(t))}function RW(t){return He(["bytes32","bytes32"],[rA,t])}function IW(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===rA)return te(e.slice(32,64))}function Mxe(t){return IW(t)!==void 0}var Dxe=Object.freeze({__proto__:null,SetImageHashPrefix:rA,hashSetImageHash:TW,messageSetImageHash:RW,decodeMessageSetImageHash:IW,isMessageSetImageHash:Mxe});let Xr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),pr=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const wb=66;function Pf(t){return t.left!==void 0&&t.right!==void 0}function Nh(t){return t.tree!==void 0}function _0(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function xb(t){let e=ne(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case pr.Signature:{const i=e[0],o=te(e.slice(1,wb+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(wb+1)}break;case pr.Address:{const i=e[0],o=Ye(te(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case pr.DynamicSignature:{const i=e[0],o=Ye(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=te(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case pr.Node:{const i=te(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case pr.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=xb(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case pr.Subdigest:{const i=te(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case pr.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=xb(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class OW extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function of(t,e,r){if(Pf(t)){const[n,s]=await Promise.all([of(t.left,e,r),of(t.right,e,r)]);return{left:n,right:s}}if(Nh(t))return{weight:t.weight,threshold:t.threshold,tree:await of(t.tree,e,r)};if(_0(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await J4(t.address,e,t.signature,r))throw new OW(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:A0(e,t.signature),signature:t.signature,subdigest:e};return t}const gn={concat:(t,e)=>He(["bytes","bytes"],[t,e]),node:t=>He(["uint8","bytes32"],[pr.Node,t]),branch:t=>{const e=ne(t);return He(["uint8","uint24","bytes"],[pr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t,e,n.length,n])},subdigest:t=>He(["uint8","bytes32"],[pr.Subdigest,t]),signature:(t,e)=>He(["uint8","uint8","bytes"],[pr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>He(["uint8","uint8","address"],[pr.Address,t,e])};function uv(t,e,r,n,s={}){const i=dv(t.tree,e,r,s);return Z.from(n).isZero()?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:Z.from(t.threshold).gt(255)?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:He(["uint8","uint8","uint32","bytes"],[Xr.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function dv(t,e,r,n={}){const s=!n.disableTrim;if(Vi(t)){const i=dv(t.left,e,r),o=dv(t.right,e,r),a=Wn(t.left),l=Wn(t.right);return s&&i.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:gn.node(ws(t)),weight:rr}:s&&o.weight.eq(0)&&!l?{encoded:gn.concat(i.encoded,gn.node(ws(t.right))),weight:i.weight}:s&&i.weight.eq(0)&&!a?{encoded:gn.concat(gn.node(ws(t.left)),gn.branch(o.encoded)),weight:o.weight}:{encoded:gn.concat(i.encoded,gn.branch(o.encoded)),weight:i.weight.add(o.weight)}}if(Ma(t)){const i=dv(t.tree,e,r);return s&&i.weight.eq(0)?{encoded:gn.node(ws(t)),weight:rr}:{encoded:gn.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(Da(t))return{encoded:gn.node(ws(t)),weight:rr};if(Oa(t)){const i=r.includes(t.subdigest);return{encoded:gn.node(ws(t)),weight:i?kV:rr}}if(Wn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:gn.dynamicSignature(t.weight,t.address,a),weight:Z.from(t.weight)}:{encoded:gn.signature(t.weight,a),weight:Z.from(t.weight)}}else return{encoded:gn.address(t.weight,t.address),weight:rr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function nA(t){return iA(t)?nA(t.suffix[t.suffix.length-1]):t.config}function sA(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function P0(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(sA)}function MW(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function iA(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(MW)}function Ww(t){const e=ne(t),r=e[0];switch(r){case Xr.Legacy:return{version:2,type:Xr.Legacy,decoded:jp(e)};case Xr.Dynamic:return{version:2,type:Xr.Dynamic,decoded:jp(e.slice(1))};case Xr.NoChainIdDynamic:return{version:2,type:Xr.NoChainIdDynamic,decoded:jp(e.slice(1))};case Xr.Chained:return DW(e);default:throw new Error(`Invalid signature type: ${r}`)}}function jp(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=xb(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function DW(t){const e=ne(t),r=e[0];if(r!==Xr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sne(Il(i))),s=He(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return He(["uint8","bytes"],[Xr.Chained,s])}function Il(t){if(ma(t))return te(t);if(P0(t)||iA(t))return Hw(Il(t),(t.suffix||[]).map(Il));const e=sA(t)?t.decoded:t.config;switch(t.type){case Xr.Legacy:if(Z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return iS(e);case Xr.NoChainIdDynamic:case Xr.Dynamic:return He(["uint8","bytes"],[t.type,iS(e)]);case Xr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function iS(t){return He(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,hv(t.tree)])}function hv(t){if(Vi(t)||Pf(t)){const e=ne(hv(t.right)),r=ne(hv(t.left));return Vi(t.right)||Pf(t.right)?He(["bytes","uint8","uint24","bytes"],[r,pr.Branch,e.length,e]):He(["bytes","bytes"],[r,e])}if(Ma(t)||Nh(t)){const e=ne(hv(t.tree));return He(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t.weight,t.threshold,e.length,e])}if(_0(t)||Wn(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==wb){if(!t.address)throw new Error("Dynamic signature leaf must have address");return He(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t.weight,t.address,e.length,e])}else return He(["uint8","uint8","bytes"],[pr.Signature,t.weight,e])}if(Wn(t))return He(["uint8","uint8","address"],[pr.Address,t.weight,t.address]);if(Da(t))return He(["uint8","bytes32"],[pr.Node,t.nodeHash]);if(Oa(t))return He(["uint8","bytes32"],[pr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function vv(t){return Vi(t)?[...vv(t.left),...vv(t.right)]:Ma(t)?vv(t.tree):Wn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function yv(t){return Pf(t)?[...yv(t.left),...yv(t.right)]:Nh(t)?yv(t.tree):_0(t)?[t.signature]:[]}function Fp(t){return Pf(t)?[...Fp(t.left),...Fp(t.right)]:Nh(t)?Fp(t.tree):Oa(t)?[t.subdigest]:[]}async function Cb(t){const e=typeof t=="string"?Ww(t):t;if(P0(e)){const n=await Promise.all([Cb(kn({},e,{suffix:void 0})),...e.suffix.map(s=>Cb(s))]);return Hw(n[0],n.slice(1))}const{trimmed:r}=await mv(e.decoded.tree);return Il(kn({},e,{decoded:kn({},e.decoded,{tree:r})}))}async function mv(t,e=!0){if(Pf(t)){const[r,n]=await Promise.all([mv(t.left),mv(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Nh(t)){const r=await mv(t.tree);if(r.weight===0)try{const n=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Da(t)&&FW(t.nodeHash)?{weight:0,trimmed:kn({},jW(t.nodeHash))}:_0(t)||Wn(t)&&t.signature!==void 0?{weight:Z.from(t.weight).toNumber(),trimmed:t}:!e&&Oa(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Gw={decode:t=>Ww(t),encode:t=>Il(t),trim:t=>Cb(t),supportsNoChainId:!0,recover:(t,e,r)=>oA(t,e,r),encodeSigners:(t,e,r,n)=>uv(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Gw.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=ma(t)?t:Il(t),s=r.map(i=>ma(i)?i:Il(i));return Hw(n,s)},hashSetImageHash:function(t){return TW(t)},signaturesOf(t){return vv(t.tree)},signaturesOfDecoded:function(t){return yv(t.decoded.tree)}};var Nxe=Object.freeze({__proto__:null,SignatureType:Xr,SignaturePartType:pr,SignaturePartTypeLength:wb,isUnrecoveredNode:Pf,isUnrecoveredNestedLeaf:Nh,isUnrecoveredSignatureLeaf:_0,decodeSignatureTree:xb,InvalidSignatureLeafError:OW,recoverTopology:of,partEncoder:gn,encodeSigners:uv,encodeTree:dv,deepestConfigOfSignature:nA,isUnrecoveredSignature:sA,isUnrecoveredChainedSignature:P0,isSignature:MW,isChainedSignature:iA,decodeSignature:Ww,decodeSignatureBody:jp,decodeChainedSignature:DW,setImageHashStruct:NW,recoverSignature:oA,encodeChain:Hw,encodeSignature:Il,encodeSignatureBody:iS,encodeSignatureTree:hv,signaturesOf:vv,signaturesOfDecoded:yv,subdigestsOfDecoded:Fp,trimSignature:Cb,trimUnrecoveredTree:mv,SignatureCoder:Gw});function Wn(t){return t.address!==void 0&&t.weight!==void 0}function Oa(t){return t.subdigest!==void 0&&t.address===void 0}function pv(t){return Vi(t)?JSON.stringify({left:pv(t.left),right:pv(t.right)}):Ma(t)?JSON.stringify({weight:Z.from(t.weight).toString(),threshold:Z.from(t.threshold).toString(),tree:pv(t.tree)}):Wn(t)?JSON.stringify({address:t.address,weight:Z.from(t.weight).toString()}):JSON.stringify(t)}function gv(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:gv(e.left),right:gv(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:Z.from(e.weight),threshold:Z.from(e.threshold),tree:gv(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:Z.from(e.weight)}:e}function Ma(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Da(t){return t.nodeHash!==void 0}function aA(t){return Wn(t)||Oa(t)||Ma(t)||Da(t)}function Vi(t){return t.left!==void 0&&t.right!==void 0}function Lxe(t){return Vi(t)||aA(t)}function LW(t){return He(["uint96","address"],[t.weight,t.address])}function jW(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=Z.from(e.slice(0,12)),n=Ye(te(e.slice(12)));return{weight:r,address:n}}function FW(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ws(t){if(Wn(t))return LW(t);if(Oa(t))return aa(["string","bytes32"],[`Sequence static digest: `,t.subdigest]);if(Ma(t)){const e=ws(t.tree);return aa(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return Da(t)?t.nodeHash:aa(["bytes32","bytes32"],[ws(t.left),ws(t.right)])}function Bxe(t){const e=[];let r=t;for(;!aA(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function Uxe(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function lA(t){return aa(["bytes32","uint256"],[aa(["bytes32","uint256"],[ws(t.tree),t.threshold]),t.checkpoint])}function BW(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function gd(t){return Wn(t)||Oa(t)?[t]:Ma(t)?[{threshold:t.threshold,weight:t.weight,members:gd(t.tree)}]:Da(t)?[]:[...gd(t.left),...gd(t.right)]}function oS(t){return Da(t)?!0:qi(t)?oS(t.left)||oS(t.right):!1}function zxe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:gd(t.tree)}}const UW=(t,e)=>t.map(r=>BW(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function cA(t){if(t.length===0)throw new Error("Empty members array");return UW(t,cA).reduce((r,n)=>({left:r,right:n}))}function fA(t){if(t.length===0)throw new Error("Empty members array");const e=UW(t,fA);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function uA(t){return t.length>8?fA(t):cA(t)}function zW(t,e=uA){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Eb(t,e){return Oa(t)?t.subdigest===e:qi(t)?Eb(t.left,e)||Eb(t.right,e):!1}function aS(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Ma(n)?e.push(n.tree):qi(n)?(e.push(n.left),e.push(n.right)):Wn(n)&&r.add({address:n.address,weight:Z.from(n.weight).toNumber()})}return Array.from(r)}function Sb(t){return qi(t)?Sb(t.left)&&Sb(t.right):!Da(t)}const Kw={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>lA(t),hasSubdigest:(t,e)=>Eb(t.tree,e),checkpointOf:t=>Z.from(t.checkpoint),signersOf:t=>aS(t.tree),fromSimple:t=>zW({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Sb(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en($n.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[Kw.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new en($n.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=i.decodeFunctionData(i.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!rr.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!rr.eq((n=(s=t.transactions[0])==null?void 0:s.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),checkpoint:Z.from(t.checkpoint).toString(),tree:pv(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:Z.from(e.threshold),checkpoint:Z.from(e.checkpoint),tree:gv(e.tree)}},editConfig:function(t,e){var r,n;const s=gd(t.tree);if(e.add)for(const i of e.add)s.find(o=>Wn(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Wn(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:uA(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}const n=aS(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}return uv(t,r,[],0).encoded}};var Vxe=Object.freeze({__proto__:null,isSignerLeaf:Wn,isSubdigestLeaf:Oa,topologyToJSON:pv,topologyFromJSON:gv,isNestedLeaf:Ma,isNodeLeaf:Da,isLeaf:aA,isNode:qi,isTopology:Fxe,encodeSignerLeaf:LW,decodeSignerLeaf:jW,isEncodedSignerLeaf:FW,hashNode:ws,leftFace:Bxe,isWalletConfig:Uxe,imageHash:lA,isSimpleNestedMember:BW,topologyToMembers:gd,hasUnknownNodes:oS,toSimpleWalletConfig:zxe,legacyTopologyBuilder:cA,merkleTopologyBuilder:fA,optimized2SignersTopologyBuilder:uA,toWalletConfig:zW,hasSubdigest:Eb,signersOf:aS,isComplete:Sb,ConfigCoder:Kw}),qxe=Object.freeze({__proto__:null});const Wxe={config:Kw,signature:Gw},VW=2,qW={version:VW,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Qe=Object.freeze({__proto__:null,config:Vxe,signature:jxe,context:qxe,chained:Lxe,coders:Wxe,version:VW,DeployedWalletContext:qW});function lS(t,e){const r=Ue(He(["bytes","bytes32"],[t.walletCreationCode,ht(t.mainModule,32)])),n=Ue(He(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ye(Sr(n,12))}async function Hxe(t,e,r,n,s,i){return(await Promise.all(rH.map(async a=>{try{const l=a.signature.SignatureCoder.decode(te(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),f=a.config.ConfigCoder.imageHashOf(c.config);if(lS(i[a.version],f).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return lS(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Gxe(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Kxe(t){const e=Object.keys(t).length;return t[e]}const Qxe={1:PW,2:qW};var Yxe=Object.freeze({__proto__:null,addressOf:lS,isValidCounterfactual:Hxe,isValidVersionedContext:Gxe,latestContext:Kxe,defaultContexts:Qxe});const Qw=`tuple( +`,e,t.threshold,t.weight])}return Da(t)?t.nodeHash:aa(["bytes32","bytes32"],[ws(t.left),ws(t.right)])}function jxe(t){const e=[];let r=t;for(;!aA(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function Fxe(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function lA(t){return aa(["bytes32","uint256"],[aa(["bytes32","uint256"],[ws(t.tree),t.threshold]),t.checkpoint])}function BW(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function gd(t){return Wn(t)||Oa(t)?[t]:Ma(t)?[{threshold:t.threshold,weight:t.weight,members:gd(t.tree)}]:Da(t)?[]:[...gd(t.left),...gd(t.right)]}function oS(t){return Da(t)?!0:Vi(t)?oS(t.left)||oS(t.right):!1}function Bxe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:gd(t.tree)}}const UW=(t,e)=>t.map(r=>BW(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function cA(t){if(t.length===0)throw new Error("Empty members array");return UW(t,cA).reduce((r,n)=>({left:r,right:n}))}function fA(t){if(t.length===0)throw new Error("Empty members array");const e=UW(t,fA);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function uA(t){return t.length>8?fA(t):cA(t)}function zW(t,e=uA){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Eb(t,e){return Oa(t)?t.subdigest===e:Vi(t)?Eb(t.left,e)||Eb(t.right,e):!1}function aS(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Ma(n)?e.push(n.tree):Vi(n)?(e.push(n.left),e.push(n.right)):Wn(n)&&r.add({address:n.address,weight:Z.from(n.weight).toNumber()})}return Array.from(r)}function Sb(t){return Vi(t)?Sb(t.left)&&Sb(t.right):!Da(t)}const Kw={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>lA(t),hasSubdigest:(t,e)=>Eb(t.tree,e),checkpointOf:t=>Z.from(t.checkpoint),signersOf:t=>aS(t.tree),fromSimple:t=>zW({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Sb(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en($n.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[Kw.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new en($n.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=i.decodeFunctionData(i.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!rr.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!rr.eq((n=(s=t.transactions[0])==null?void 0:s.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),checkpoint:Z.from(t.checkpoint).toString(),tree:pv(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:Z.from(e.threshold),checkpoint:Z.from(e.checkpoint),tree:gv(e.tree)}},editConfig:function(t,e){var r,n;const s=gd(t.tree);if(e.add)for(const i of e.add)s.find(o=>Wn(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Wn(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:uA(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}const n=aS(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}return uv(t,r,[],0).encoded}};var Uxe=Object.freeze({__proto__:null,isSignerLeaf:Wn,isSubdigestLeaf:Oa,topologyToJSON:pv,topologyFromJSON:gv,isNestedLeaf:Ma,isNodeLeaf:Da,isLeaf:aA,isNode:Vi,isTopology:Lxe,encodeSignerLeaf:LW,decodeSignerLeaf:jW,isEncodedSignerLeaf:FW,hashNode:ws,leftFace:jxe,isWalletConfig:Fxe,imageHash:lA,isSimpleNestedMember:BW,topologyToMembers:gd,hasUnknownNodes:oS,toSimpleWalletConfig:Bxe,legacyTopologyBuilder:cA,merkleTopologyBuilder:fA,optimized2SignersTopologyBuilder:uA,toWalletConfig:zW,hasSubdigest:Eb,signersOf:aS,isComplete:Sb,ConfigCoder:Kw}),zxe=Object.freeze({__proto__:null});const Vxe={config:Kw,signature:Gw},VW=2,qW={version:VW,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Qe=Object.freeze({__proto__:null,config:Uxe,signature:Nxe,context:zxe,chained:Dxe,coders:Vxe,version:VW,DeployedWalletContext:qW});function lS(t,e){const r=Ue(He(["bytes","bytes32"],[t.walletCreationCode,ht(t.mainModule,32)])),n=Ue(He(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ye(Sr(n,12))}async function qxe(t,e,r,n,s,i){return(await Promise.all(rH.map(async a=>{try{const l=a.signature.SignatureCoder.decode(te(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),f=a.config.ConfigCoder.imageHashOf(c.config);if(lS(i[a.version],f).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return lS(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Wxe(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Hxe(t){const e=Object.keys(t).length;return t[e]}const Gxe={1:PW,2:qW};var Kxe=Object.freeze({__proto__:null,addressOf:lS,isValidCounterfactual:qxe,isValidVersionedContext:Wxe,latestContext:Hxe,defaultContexts:Gxe});const Qw=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function Jxe(t,e,r,n){return kn({},t,{chainId:r,intent:{id:n,wallet:e}})}function Xxe(t){return Ue(Gn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Zxe(t){const e=Gn.decode(["uint256",Qw],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function WW(t,e){return Gn.encode(["uint256",Qw],[t,My(e)])}function HW(t,e){return Ue(WW(t,e))}function eCe(t,e,r,n){return $0({address:t,chainId:e,digest:HW(r,n)})}function tCe(t,e,r){return $0({address:t,chainId:e,digest:Ue(Gn.encode(["string",Qw],["guest:",My(r)]))})}function GW(t,e){return e.map(r=>dA(t,r))}function dA(t,e){if(e.to)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new en($n.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Yw(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function KW(t){return t.every(Yw)}function My(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:rr,target:(r=e.to)!=null?r:Ar,value:e.value!==void 0?e.value:rr,data:e.data!==void 0?e.data:[]}})}function rCe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function nCe(t,e){const r=Z.from(t),n=Z.from(e),s=SV.pow(Z.from(96));if(!n.div(s).eq(rr))throw new Error("Space already encoded");return n.add(r.mul(s))}function sCe(t){const e=Z.from(t),r=SV.pow(Z.from(96));return[e.div(r),e.mod(r)]}function iCe(t,e){return Array.isArray(e)?KW(e)?e:GW(t,e).map(n=>n.transaction):Yw(e)?[e]:[dA(t,e).transaction]}function QW(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Yw(r),!0)}function YW(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&QW(t)}function oCe(t){const e=new en($n.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),YW(t)?[My(t.transactions),t.nonce,t.signature]:[My(t.transactions),0,[]])}const JW="0x61c2926c",XW=`tuple( +)[]`;function Qxe(t,e,r,n){return kn({},t,{chainId:r,intent:{id:n,wallet:e}})}function Yxe(t){return Ue(Gn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Jxe(t){const e=Gn.decode(["uint256",Qw],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function WW(t,e){return Gn.encode(["uint256",Qw],[t,My(e)])}function HW(t,e){return Ue(WW(t,e))}function Xxe(t,e,r,n){return $0({address:t,chainId:e,digest:HW(r,n)})}function Zxe(t,e,r){return $0({address:t,chainId:e,digest:Ue(Gn.encode(["string",Qw],["guest:",My(r)]))})}function GW(t,e){return e.map(r=>dA(t,r))}function dA(t,e){if(e.to)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new en($n.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Yw(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function KW(t){return t.every(Yw)}function My(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:rr,target:(r=e.to)!=null?r:Ar,value:e.value!==void 0?e.value:rr,data:e.data!==void 0?e.data:[]}})}function eCe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function tCe(t,e){const r=Z.from(t),n=Z.from(e),s=SV.pow(Z.from(96));if(!n.div(s).eq(rr))throw new Error("Space already encoded");return n.add(r.mul(s))}function rCe(t){const e=Z.from(t),r=SV.pow(Z.from(96));return[e.div(r),e.mod(r)]}function nCe(t,e){return Array.isArray(e)?KW(e)?e:GW(t,e).map(n=>n.transaction):Yw(e)?[e]:[dA(t,e).transaction]}function QW(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Yw(r),!0)}function YW(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&QW(t)}function sCe(t){const e=new en($n.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),YW(t)?[My(t.transactions),t.nonce,t.signature]:[My(t.transactions),0,[]])}const JW="0x61c2926c",XW=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,cS=(t,e)=>{const r=[],n=new en($n.mainModule.abi);for(const s of e){const i=ne(s.data||"0x");if(s.to===t&&te(i.slice(0,4))===JW){const o=i.slice(4),a=Gn.decode([XW],o)[0];r.push(...cS(s.to,a.map(l=>kn({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=cS(t,o.map(l=>kn({},l,{to:l.target})));r.push(...a)}catch{r.push(s)}}return r};var aCe=Object.freeze({__proto__:null,MetaTransactionsType:Qw,intendTransactionBundle:Jxe,intendedTransactionID:Xxe,unpackMetaTransactionsData:Zxe,packMetaTransactionsData:WW,digestOfTransactions:HW,subdigestOfTransactions:eCe,subdigestOfGuestModuleTransactions:tCe,toSequenceTransactions:GW,toSequenceTransaction:dA,isSequenceTransaction:Yw,hasSequenceTransactions:KW,sequenceTxAbiEncode:My,fromTxAbiEncode:rCe,encodeNonce:nCe,decodeNonce:sCe,fromTransactionish:iCe,isTransactionBundle:QW,isSignedTransactionBundle:YW,encodeBundleExecData:oCe,selfExecuteSelector:JW,selfExecuteAbi:XW,unwind:cS});const ZW="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",lCe="0x6492649264926492649264926492649264926492649264926492649264926492";async function eH(t,e,r,n){return await t.call({data:Ht([ZW,new A4().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var cCe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZW,EIP_6492_SUFFIX:lCe,validateEIP6492Offchain:eH});class fCe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Oh(e,[...$n.mainModuleUpgradable.abi,...$n.mainModule.abi,...$n.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>ne(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Gn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(s=>ne(s));if(n.length===20)return Ye(te(n));if(n.length===32)return Gn.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return eH(this.provider,e,r,n)}}var uCe=Object.freeze({__proto__:null,OnChainReader:fCe});function dCe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ye=Object.freeze({__proto__:null,config:$xe,signature:Axe,context:Yxe,signer:Oxe,EIP1271:Txe,transaction:aCe,reader:uCe,EIP6492:cCe,isWalletSignRequestMetadata:dCe});const fS=[{config:tA,signature:eA},{config:Kw,signature:Gw}];function tH(t){const e=t-1;if(e<0||e>=fS.length)throw new Error(`No coder for version: ${t}`);return fS[e]}function hCe(t){return tH(t)}var Bn=Object.freeze({__proto__:null,ALL_CODERS:fS,coderFor:tH,genericCoderFor:hCe});const rH=[Zo,Qe],vCe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:rH,commons:ye,universal:Bn,v1:Zo,v2:Qe},Symbol.toStringTag,{value:"Module"}));function yCe(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:s,chainId:i}=e;let o=n,a=s;const l=Object.values(this.contexts),c=[];for(let f=1;fne(i).length===0))return XR;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Z.from(s).toNumber(),gasLimit:Z.from(s).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const i=await new Oh(e,$n.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ye.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let d=0;for(;!o;){try{return await f()}catch(h){if(d++,s!==void 0&&d>=s)throw xe.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,h),h;xe.warn(`attempt #${d} failed${u?`: ${u}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=i.fromBlockLog;if(f<0&&(f=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,f-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-i.deltaBlocksLog)} to ${d}`);f=d;const y=(await Promise.all(h.map(g=>a(()=>i.provider.getTransactionReceipt(g.transactionHash),`unable to get receipt for transaction ${g.transactionHash}`)))).find(g=>g.logs.find(b=>b.topics.length===0&&b.data.replace("0x","")===u||b.topics.length===1&&b.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&b.data.length>=64&&b.data.replace("0x","").startsWith(u)));if(y)return Tf({receipt:y},await a(()=>i.provider.getTransaction(y.transactionHash),`unable to get transaction ${y.transactionHash}`));o||await new Promise(g=>setTimeout(g,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function CCe(t){return t.signer!==void 0&&Sf.isSigner(t.signer)}class ECe extends aH{constructor(e){if(super(Sf.isSigner(e)?{provider:e.provider}:Tf({},e,{provider:e.signer.provider})),this.signer=Sf.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&xe.warn("LocalRelayer doesn't accept fee quotes");const s=ye.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(Tf({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}const SCe="v1",kCe="v0.4.0",$Ce="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let ml=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),ACe=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),_Ce=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),PCe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class lH{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Nr({},n)).then(s=>Lr(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Nr({},n)).then(s=>Lr(s).then(i=>({data:i.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Nr({},n)).then(s=>Lr(s).then(i=>({chainID:i.chainID}))),this.sendMetaTxn=(n,s)=>this.fetch(this.url("SendMetaTxn"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,s)=>this.fetch(this.url("GetMetaTxnNonce"),Nr(n,s)).then(i=>Lr(i).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,s)=>this.fetch(this.url("GetMetaTxnReceipt"),Nr(n,s)).then(i=>Lr(i).then(o=>({receipt:o.receipt}))),this.simulate=(n,s)=>this.fetch(this.url("Simulate"),Nr(n,s)).then(i=>Lr(i).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,s)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Nr(n,s)).then(i=>Lr(i).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Nr({},n)).then(s=>Lr(s).then(i=>({isFeeRequired:i.isFeeRequired,tokens:i.tokens}))),this.feeOptions=(n,s)=>this.fetch(this.url("FeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,s)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options}))),this.sentTransactions=(n,s)=>this.fetch(this.url("SentTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,s)=>this.fetch(this.url("PendingTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,s)=>this.fetch(this.url("ListGasSponsors"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,s)=>this.fetch(this.url("AddGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,s)=>this.fetch(this.url("UpdateGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,s)=>this.fetch(this.url("ReportGasSponsorUsage"),Nr(n,s)).then(i=>Lr(i).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Nr=(t={},e={})=>({method:"POST",headers:Tf({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Lr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Yd=Object.freeze({__proto__:null,WebRPCVersion:SCe,WebRPCSchemaVersion:kCe,WebRPCSchemaHash:$Ce,ETHTxnStatus:ml,TransferType:ACe,FeeTokenType:_Ce,SortOrder:PCe,Relayer:lH});const TCe=[ml.DROPPED,ml.SUCCEEDED,ml.PARTIALLY_FAILED,ml.FAILED],RCe=[ml.DROPPED,ml.PARTIALLY_FAILED,ml.FAILED];function ICe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&uc.isProvider(t.provider)}const OCe=typeof global=="object"?global.fetch:window.fetch;class cH{constructor(e){this.service=new lH(e.url,OCe),this.provider=uc.isProvider(e.provider)?e.provider:new mb(Oy(e.provider.url))}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e)),xe.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&TCe.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Gn.encode([ye.transaction.MetaTransactionsType],[ye.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(l=>l.symbol).join(", ");xe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw xe.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:ye.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return xe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return xe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){xe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?Z.from(r).toHexString():void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=Z.from(s.nonce),[o,a]=ye.transaction.decodeNonce(i);return xe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0){var s=this;xe.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let i;if(r!==void 0&&(typeof r._quote=="string"?i=r._quote:xe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw xe.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ye.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:i});if(xe.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var d;if(!s.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await s.wait(e.intent.id),v=(d=h.receipt)==null?void 0:d.transactionHash;if(!v)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,h),s.provider.waitForTransaction(v,u)};return l.wait=c,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||RCe.includes(a.status))throw new MCe(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:Z.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return i.provider.waitForTransaction(l.transactionHash,c)}}}}class MCe{constructor(e){this.receipt=e}}function fH(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const DCe=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:ECe,ProviderRelayer:aH,ProviderRelayerDefaults:oH,RpcRelayer:cH,RpcRelayerProto:Yd,isLocalRelayerOptions:CCe,isProviderRelayerOptions:xCe,isRelayer:fH,isRpcRelayerOptions:ICe,proto:Yd},Symbol.toStringTag,{value:"Module"}));function uH(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class dH{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,s){return s.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var NCe=Object.freeze({__proto__:null,isSapientSigner:uH,SignerWrapper:dH});function hH(t){return t.rejected}function hA(t){return t.signature!==void 0}function vH(t){return!hH(t)&&!hA(t)}const yH="Initial";class Jw{constructor(e,r=Jw.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(jw(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>uH(r)?r:new dH(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:i,signers:{}};let f=o??{};const u=y=>{f=y,r.notifyObservers(n,c,f)},d=()=>{try{r.notifyObservers(n,c,f);const y=Object.entries(c.signers).filter(([g,b])=>vH(b));if(a&&a(c,u)||y.length===0){c.ended=!0,s(c),r.notifyObservers(n,c,f);return}}catch(y){console.error("Error while notifying observers",y)}};let h=r.signers;if(l){const y=await Promise.all(r.signers.map(async function(g){return g.getAddress()}));h=r.signers.filter((g,b)=>l.includes(y[b]))}const v=await Promise.allSettled(h.map(async function(y){const g=await y.getAddress();return c.signers[g]={situation:yH},y.requestSignature(n,i,o??{},{onSignature:b=>{const p=y.suffix();c.signers[g]={signature:b,suffix:p},d()},onRejection:b=>{c.signers[g]={rejected:!0,error:b},d()},onStatus:b=>{c.signers[g]={situation:b},d()}})}));for(let y=0;ymt(e))):mt(t)}const eI=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(hA(n)){const s=ne(n.suffix),i=He(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class Dy extends Sf{constructor(e){if(rr.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ye.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Dy(zc({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ye.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ye.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return Dy.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(zc({},e,{chainId:this.chainId,intent:{id:te(jw(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new en($n.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async signDigest(e,r){const n=nS(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const s=zc({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),i=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:i,metadata:s,callback:(l,c)=>{const f=eI(l),u=zc({},s,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=eI(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Ue(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space)r=Z.from(e.space);else if(e===void 0)r=0;else return e;const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return ye.transaction.encodeNonce(r,n)}async signTransactions(e,r){const n=await ZR(e),s=ye.transaction.fromTransactionish(this.address,n);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const i=await this.fetchNonceOrSpace(r),o=ye.transaction.digestOfTransactions(i,s),a=await this.signDigest(o,{transactions:s});return{intent:{id:nS(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:i,signature:a}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r,n){const s=await this.signTransactions(e,r),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,n)}async fillGasLimits(e){const r=await ZR(e),n=ye.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?Z.from(o.gasLimit).toNumber():i[a].gasLimit;return zc({},o,i[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var e=1;ejCe(t[e])):!1}function BCe(t){if(!t)return[];const e=Z.from(t.value);switch(t.token.type){case Yd.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Yd.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new en([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class UCe{constructor(e,r,n){this._isSigner=!0,this.account=e,this.chainId=r,this.options=n}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const s of r)if(s.token.type===Yd.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(Z.from(s.value)))return s}else if(s.token.contractAddress&&s.token.type===Yd.FeeTokenType.ERC20_TOKEN&&(await new Oh(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(Z.from(s.value)))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e){var r,n,s,i,o;const a=FCe(e)?await mt(e):e,l=await this.account.prepareTransactions({txs:a,chainId:this.chainId,stubSignatureOverrides:(r=(n=this.options)==null?void 0:n.stubSignatureOverrides)!=null?r:new Map}),f=await((s=(i=this.options)==null?void 0:i.selectFee)!=null?s:this.defaultSelectFee.bind(this))(a,l.feeOptions),u=[...l.transactions,...BCe(f)];return this.account.sendTransaction(u,this.chainId,l.feeQuote,void 0,void 0,(o=this.options)!=null&&o.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(Z.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class zCe{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return rr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class ra{constructor(e){this.address=Ye(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.migrations=e.migrations||vS.DefaultMigrations,this.migrator=new hS.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new UCe(this,e,r)}static async new(e){var r;const s=new hS.Migrator(e.tracker,(r=e.migrations)!=null?r:vS.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),l=e.contexts[s.version],c=ye.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new ra({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=Z.from(e),n=this.networks.find(s=>r.eq(s.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new mb(Oy(r.rpcUrl),{name:"",chainId:Z.from(e).toNumber()})}reader(e){return rr.eq(e)?new zCe:new ye.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return fH(r.relayer)?r.relayer:new cH(r.relayer)}setOrchestrator(e){this.orchestrator=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=Bn.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=rr.eq(e);return new Dy({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(k=>{if(!k)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return k}),o=i.then(k=>nH.counterfactualVersion(this.address,k.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const $=await n.reader(e).implementation(n.address);if(!$)throw new Error(`Implementation not found for wallet ${n.address}`);const x=Object.values(n.contexts);for(let T=0;T0?y[y.length-1].nextImageHash:d,b=await this.tracker.configOfImageHash({imageHash:g});if(!b)throw new Error(`Config not found for imageHash ${g}`);const p=await s,w=await i,E=Bn.coderFor(h).config.checkpointOf(b);return{original:Vc({},w,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:p},fullyMigrated:h===this.version,signedMigrations:v,version:h,presignedConfigurations:y,imageHash:g,config:b,checkpoint:E,canOnchainValidate:f===this.version&&p}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);if(n.transactions.length===0)return e;const s={entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]};return r.onChain.deployed||(s.intent.id=ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,s.chainId,s.transactions)),s}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitness(){const e=Ue(xt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore"){const i=rr.eq(r)?this.networks[0].chainId:r,o=await this.status(i);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),c=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(s){case"ignore":return c;case"eip6492":return this.buildEIP6492Signature(await c,o,r)}return c}buildEIP6492Signature(e,r,n){const s=this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Gn.encode(["address","bytes","bytes"],[s.entrypoint,ye.transaction.encodeBundleExecData(s),e]);return He(["bytes","bytes32"],[i,ye.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,Vc({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=Dy.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ye.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const s=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:i}=this.contextFor(e.version);return{entrypoint:i,transactions:n,chainId:r,intent:{id:s,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Vc({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Ue(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const a=await this.walletForStatus(r,i).signTransactions(e,(s==null?void 0:s.nonceSpace)&&{space:s==null?void 0:s.nonceSpace});return Vc({},a,{signature:await this.decorateSignature(a.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=Bn.coderFor(i.version).config,l=a.imageHashOf(i),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i){const o=s||await this.status(e.chainId);this.mustBeFullyMigrated(o);const a=this.decorateTransactions(e,o);return i==null||i(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,s){const i=s||await this.status(r),o=this.walletForStatus(r,i),a=await this.predecorateTransactions(e,i,r),l=ye.transaction.fromTransactionish(this.address,a),c=o.coders.config.buildStubSignature(o.config,n),f=te(jw(32)),u={chainId:r,intent:{id:f,wallet:this.address},signature:c,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,i),h=ye.transaction.encodeBundleExecData(d),v=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,h);return Vc({},v,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),i=ye.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),l=s?e:await this.predecorateTransactions(e,a,r),c=await this.signTransactions(l,r,void 0,o);return this.sendSignedTransactions(c,r,n,void 0,i)}async signTypedData(e,r,n,s,i="ignore"){const o=zw({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>Bn.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Bn.genericCoderFor(f.version).config.signersOf(f).forEach(h=>{const v=r.find(y=>y.address===h.address&&y.network===s);if(v&&c&&v.flaggedForRemoval){v.flaggedForRemoval=!1;return}v||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!c})})}))})),r}}function VCe(t){return t instanceof ra}const qCe=Object.freeze(Object.defineProperty({__proto__:null,Account:ra,isAccount:VCe},Symbol.toStringTag,{value:"Module"}));function kb(){return kb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),ys({},n)).then(s=>ms(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),ys({},n)).then(s=>ms(s).then(i=>({chainID:i.chainID}))),this.getEtherBalance=(n,s)=>this.fetch(this.url("GetEtherBalance"),ys(n,s)).then(i=>ms(i).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,s)=>this.fetch(this.url("GetTokenBalances"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,s)=>this.fetch(this.url("GetTokenSupplies"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,s)=>this.fetch(this.url("GetTokenSuppliesMap"),ys(n,s)).then(i=>ms(i).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,s)=>this.fetch(this.url("GetBalanceUpdates"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,s)=>this.fetch(this.url("GetTransactionHistory"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,s)=>this.fetch(this.url("SyncBalance"),ys(n,s)).then(i=>ms(i).then(o=>({}))),this.fetchTransactionReceipt=(n,s)=>this.fetch(this.url("FetchTransactionReceipt"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const ys=(t={},e={})=>({method:"POST",headers:kb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ms=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});let ZCe=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const tI=typeof global=="object"?global.fetch:window.fetch;class Xw extends mH{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,tI),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=kb({},s.headers,i),tI(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const eEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:vA,EventLogDataType:QCe,EventLogType:KCe,Indexer:mH,SequenceIndexerClient:Xw,SequenceIndexerServices:ZCe,SortOrder:XCe,TransactionStatus:YCe,TransactionType:JCe,TxnTransferType:Ei,WebRPCSchemaHash:GCe,WebRPCSchemaVersion:HCe,WebRPCVersion:WCe},Symbol.toStringTag,{value:"Module"}));function yS(){return yS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),nn({},n)).then(s=>sn(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.getTokenMetadata=(n,s)=>this.fetch(this.url("GetTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,s)=>this.fetch(this.url("RefreshTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,s)=>this.fetch(this.url("GetTokenMetadataBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,s)=>this.fetch(this.url("SearchTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,s)=>this.fetch(this.url("SearchTokenIDs"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,s)=>this.fetch(this.url("TokenCollectionFilters"),nn(n,s)).then(i=>sn(i).then(o=>({filters:o.filters}))),this.getContractInfo=(n,s)=>this.fetch(this.url("GetContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,s)=>this.fetch(this.url("GetContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,s)=>this.fetch(this.url("SearchContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,s)=>this.fetch(this.url("SearchContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,s)=>this.fetch(this.url("SearchMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,s)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),nn(n,s)).then(i=>sn(i).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPrices"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const nn=(t={},e={})=>({method:"POST",headers:yS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),sn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),lEe=typeof global=="object"?global.fetch:window.fetch;class Zw extends pH{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,lEe)}}const cEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:sEe,Metadata:pH,PropertyType:iEe,SequenceMetadataClient:Zw,SortOrder:aEe,SwapType:oEe,WebRPCSchemaHash:nEe,WebRPCSchemaVersion:rEe,WebRPCVersion:tEe},Symbol.toStringTag,{value:"Module"}));function fEe(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function uEe(t){return t.startsWith("ipfs://")}class dEe{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(ye.signer.canRecover(n)){const l=ye.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ye.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await vEe(hEe(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(s||new yEe).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===te(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return gH(t,e,r,a,s,i+1)}class yEe{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>uEe(n)?fEe(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()},this.gateway=e}}const mEe=(t,e)=>e.some(r=>t instanceof r);let rI,nI;function pEe(){return rI||(rI=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gEe(){return nI||(nI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bH=new WeakMap,mS=new WeakMap,wH=new WeakMap,ME=new WeakMap,yA=new WeakMap;function bEe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ol(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&bH.set(r,t)}).catch(()=>{}),yA.set(e,t),e}function wEe(t){if(mS.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});mS.set(t,e)}let pS={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return mS.get(t);if(e==="objectStoreNames")return t.objectStoreNames||wH.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ol(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function xEe(t){pS=t(pS)}function CEe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(DE(this),e,...r);return wH.set(n,e.sort?e.sort():[e]),Ol(n)}:gEe().includes(t)?function(...e){return t.apply(DE(this),e),Ol(bH.get(this))}:function(...e){return Ol(t.apply(DE(this),e))}}function EEe(t){return typeof t=="function"?CEe(t):(t instanceof IDBTransaction&&wEe(t),mEe(t,pEe())?new Proxy(t,pS):t)}function Ol(t){if(t instanceof IDBRequest)return bEe(t);if(ME.has(t))return ME.get(t);const e=EEe(t);return e!==t&&(ME.set(t,e),yA.set(e,t)),e}const DE=t=>yA.get(t);function SEe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ol(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ol(o.result),l.oldVersion,l.newVersion,Ol(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const kEe=["get","getKey","getAll","getAllKeys","count"],$Ee=["put","add","delete","clear"],NE=new Map;function sI(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(NE.get(e))return NE.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=$Ee.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||kEe.includes(r)))return;const i=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),s&&l.done]))[0]};return NE.set(e,i),i}xEe(t=>({...t,get:(e,r,n)=>sI(e,r)||t.get(e,r,n),has:(e,r)=>!!sI(e,r)||t.has(e,r)}));class AEe{}var _Ee=Object.freeze({__proto__:null,ConfigTracker:AEe});class PEe{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),On(e,"? "),On(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),On(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),On(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),On(e,"? "),On(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),On(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),On(e,"? "),On(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),On(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),On(e,"? "),On(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),On({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),On(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),On({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function On(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var TEe=Object.freeze({__proto__:null,DebugConfigTracker:PEe});function Kl(){return Kl=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var s,i;return Promise.resolve(((s=this.migrations[e])==null||(i=s[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:s,toImageHash:i}),Promise.resolve())}}function bd(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=Z.from(n):Array.isArray(n)?e[r]=n.map(s=>bd(s)):typeof n=="object"&&n!==null?e[r]=bd(n):e[r]=n}return e}class REe{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>bd(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>bd(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>bd(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await SEe(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function CH(t){return t.left!==void 0&&t.right!==void 0}function EH(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function gS(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var IEe=Object.freeze({__proto__:null,isPlainNode:CH,isPlainNested:EH,isPlainV2Config:gS,MemoryTrackerStore:xH,recreateBigNumbers:bd,IndexedDBStore:REe});class SH{constructor(e,r=new xH,n=!1){var s=this;this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(CH(o)){const[a,l]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:l}}return EH(o)?{weight:Z.from(o.weight),threshold:Z.from(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(Qe.config.isNodeLeaf(i))return;const o=Qe.config.hashNode(i);if(Qe.config.isNode(i)){const a=s.saveTopology(i.left),l=s.saveTopology(i.right),c=s.store.saveV2Node(o,{left:Qe.config.hashNode(i.left),right:Qe.config.hashNode(i.right)});await Promise.all([a,l,c]);return}if(Qe.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),l=s.store.saveV2Node(o,{weight:Z.from(i.weight).toString(),threshold:Z.from(i.threshold).toString(),tree:Qe.config.hashNode(i.tree)});await Promise.all([a,l]);return}if(Qe.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(Qe.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Zo.config.ConfigCoder.isWalletConfig(o)){const a=Zo.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(Qe.config.ConfigCoder.isWalletConfig(o)){const a=Qe.config.ConfigCoder.imageHashOf(o);if(Qe.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!gS(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(gS(a)){const l={version:2,threshold:Z.from(a.threshold),checkpoint:Z.from(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,l=Bn.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(c=>{const f=ye.context.addressOf(c,l);return s.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=ye.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=Qe.signature.SignatureCoder.decode(i.signature),a=Bn.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),l=Qe.chained.messageSetImageHash(a),c=Ue(l),f={message:l,address:i.wallet,chainId:0,digest:c},u=s.savePayload({payload:f}),d=s.saveWalletConfig({config:i.nextConfig}),h=await Qe.signature.SignatureCoder.recover(o,f,s.provider),v=Qe.signature.signaturesOf(h.config.tree);await Promise.all([u,d,s.saveWalletConfig({config:h.config}),...v.map(y=>s.store.saveSignatureOfSubdigest(y.address,h.subdigest,y.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:l}=i,c=await s.configOfImageHash({imageHash:a});if(!c||!Qe.config.ConfigCoder.isWalletConfig(c))return[];const f=Qe.config.signersOf(c.tree).map(w=>w.address),u=await Promise.all(f.map(w=>s.store.loadSubdigestsOfSigner(w))),d=[...new Set(u.flat())],v=(await Promise.all([...new Set(d)].map(async function(w){return Kl({},await s.payloadOfSubdigest({subdigest:w}),{subdigest:w})}))).filter(w=>(w==null?void 0:w.message)&&(w==null?void 0:w.address)&&w.address===o).map(w=>({payload:w,nextImageHash:Qe.chained.decodeMessageSetImageHash(w.message)})).filter(w=>w==null?void 0:w.nextImageHash);let y;const b=(await Promise.all(v.map(async function({nextImageHash:w,payload:E}){const k=await s.configOfImageHash({imageHash:w});if(!k||!Qe.config.isWalletConfig(k))return;const $=Z.from(k.checkpoint);return{nextConfig:k,nextCheckpoint:$,nextImageHash:w,payload:E}}))).filter(w=>w!==void 0).filter(w=>w.nextCheckpoint.gt(c.checkpoint)).sort((w,E)=>w.nextCheckpoint.gt(E.nextCheckpoint)?l?1:-1:l?-1:1);for(const w of b){const{nextConfig:E,nextCheckpoint:k,nextImageHash:$,payload:x}=w;if(y){const L=y.checkpoint;if(l){if(k.gte(L))continue}else if(k.lte(L))continue}const T=new Map((await Promise.all(f.map(async function(L){const U=await s.store.loadSignatureOfSubdigest(L,x.subdigest);if(!U)return[L,void 0];const V=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(L,x.subdigest,U):U),N=ye.signer.tryRecoverSigner(x.subdigest,V)!==L;return[L,{isDynamic:N,signature:V}]}))).filter(L=>Boolean(L[1])));if(T.size===0)continue;const B=Qe.signature.SignatureCoder.encodeSigners(c,T,[],0);B.weight.lt(c.threshold)||(y={nextImageHash:$,checkpoint:Z.from(E.checkpoint),signature:B.encoded})}if(!y)return[];const p=await s.loadPresignedConfiguration({wallet:o,fromImageHash:y.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:y.nextImageHash,signature:y.signature},...p]},this.saveWitnesses=async function(i){const o={digest:i.digest,address:i.wallet,chainId:i.chainId},a=ye.signature.subdigestOf(o);await Promise.all([s.savePayload({payload:o}),...i.signatures.filter(l=>ye.signer.canRecover(l)).map(l=>{const c=ye.signer.recoverSigner(a,l);return s.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(c=>s.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(h=>h.wallet===f))continue;const u=ye.signature.subdigestOf(c),d=await s.store.loadSignatureOfSubdigest(i.signer,u);d&&l.push({wallet:f,proof:{digest:c.digest,chainId:Z.from(c.chainId),signature:te(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new dEe(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!Qe.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=iH.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Qe.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=ye.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=Ue(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ye.signature.subdigestOf(c),u=this.savePayload({payload:c}),d=this.saveWalletConfig({config:r.toConfig}),h=Zo.signature.SignatureCoder.decode(r.tx.signature),v=await Zo.signature.SignatureCoder.recover(h,c,this.provider),y=Zo.signature.SignatureCoder.signaturesOf(v.config);await Promise.all([u,d,this.saveWalletConfig({config:v.config}),this.store.saveMigrationsSubdigest(e,s,s+1,f,i),...y.map(g=>this.store.saveSignatureOfSubdigest(g.address,v.subdigest,g.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Bn.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:d}=f,h=await i.payloadOfSubdigest({subdigest:u});if(!h||!h.message||!Z.from(s).eq(h.chainId))return;const v=l.config.signersOf(o).map(w=>w.address),y=new Map((await Promise.all(v.map(async function(w){const E=await i.store.loadSignatureOfSubdigest(w,u);if(!E)return[w,void 0];const k=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(w,u,E):E),$=ye.signer.tryRecoverSigner(u,k)!==w;return[w,{isDynamic:$,signature:k}]}))).filter(w=>Boolean(w[1]))),g=l.signature.encodeSigners(o,y,[],s);if(!g||g.weightf.filter(u=>u!==void 0)))[0]}}var OEe=Object.freeze({__proto__:null,LocalConfigTracker:SH});let LE=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class MEe{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),gi({},n)).then(s=>bi(s).then(i=>({}))),this.config=(n,s)=>this.fetch(this.url("Config"),gi(n,s)).then(i=>bi(i).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,s)=>this.fetch(this.url("Wallets"),gi(n,s)).then(i=>bi(i).then(o=>({wallets:o.wallets}))),this.deployHash=(n,s)=>this.fetch(this.url("DeployHash"),gi(n,s)).then(i=>bi(i).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,s)=>this.fetch(this.url("ConfigUpdates"),gi(n,s)).then(i=>bi(i).then(o=>({updates:o.updates}))),this.migrations=(n,s)=>this.fetch(this.url("Migrations"),gi(n,s)).then(i=>bi(i).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,s)=>this.fetch(this.url("SaveConfig"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveWallet=(n,s)=>this.fetch(this.url("SaveWallet"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignature=(n,s)=>this.fetch(this.url("SaveSignature"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignerSignatures=(n,s)=>this.fetch(this.url("SaveSignerSignatures"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveMigration=(n,s)=>this.fetch(this.url("SaveMigration"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const gi=(t={},e={})=>({method:"POST",headers:Kl({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),bi=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class DEe{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new MEe(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(jE(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Bn.genericCoderFor(r.version).config.imageHashOf(r),s=Qe.signature.setImageHashStruct(n),i=Ue(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Lm(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ye.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Gu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return NEe(r,n)}catch(r){if(jE(r))return;throw r}}async saveWalletConfig(e){const r=Lm(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(jE(r))return;throw r}}async saveCounterfactualWallet(e){const r=Lm(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:s,chainID:i,type:o,signature:a}])=>{switch(o){case LE.EIP712:a+=te(ye.signer.SigType.EIP712).slice(2);break;case LE.EthSign:a+=te(ye.signer.SigType.ETH_SIGN).slice(2);break;case LE.EIP1271:a+=te(ye.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:Z.from(i)}}})}async getMigration(e,r,n,s){var i=this;const o=Gu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const h=Object.keys(d).map(Number).sort((v,y)=>y-v);for(const v of h)for(const[y,g]of Object.entries(d[v]))try{const b=await i.configOfImageHash({imageHash:y});if(b)return{fromVersion:n,toVersion:v,toConfig:b,tx:{entrypoint:g.executor,transactions:g.transactions,nonce:g.nonce,signature:g.signature,chainId:u,intent:{id:ye.transaction.subdigestOfTransactions(e,u,g.nonce,g.transactions),wallet:e}}}}catch(b){console.error(b)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Lm(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(LEe),nonce:Gu(r.tx.nonce),signature:r.tx.signature,chainID:Gu(r.tx.chainId)})}}function Lm(t){switch(t.version){case 1:if(Zo.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Jc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Qe.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),checkpoint:Jc(t.checkpoint),tree:Bp(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Bp(t){return Qe.config.isNode(t)?{left:Bp(t.left),right:Bp(t.right)}:Qe.config.isSignerLeaf(t)?{weight:Jc(t.weight),address:t.address}:Qe.config.isNestedLeaf(t)?{weight:Jc(t.weight),threshold:Jc(t.threshold),tree:Bp(t.tree)}:Qe.config.isNodeLeaf(t)?{node:t.nodeHash}:Kl({},t)}function NEe(t,e){switch(t){case 1:return Kl({},e,{version:t});case 2:return Kl({},e,{version:t,tree:Up(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Up(t){switch(typeof t){case"object":const e=Kl({},t);return e.left!==void 0&&(e.left=Up(e.left)),e.right!==void 0&&(e.right=Up(e.right)),e.tree!==void 0&&(e.tree=Up(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function LEe(t){return{to:t.to,value:t.value!==void 0?Gu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Gu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Jc(t){return Z.from(t).toNumber()}function Gu(t){return Z.from(t).toString()}function jE(t){return typeof t=="object"&&t.status===404}var jEe=Object.freeze({__proto__:null,RemoteConfigTracker:DEe});function bS(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function L1(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class FEe{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await bS(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Bn.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const s=new SH(void 0),i=await L1(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await bS(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(n));return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await L1(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=i.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},i.set(f,u)),u.signatures.push(c)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await L1(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),i=(await L1(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Bn.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!i)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return i.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class BEe{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return s||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class iI{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,UEe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function UEe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function zEe(t){return t instanceof kH}class kH{constructor(e,r=50,n=!1){this.cache=new iI,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new iI}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}}var mA=Object.freeze({__proto__:null,debug:TEe,local:OEe,remote:jEe,stores:IEe,raceUntil:bS,allSafe:L1,MultipleTracker:FEe,CachedTracker:BEe,isDedupedTracker:zEe,DedupedTracker:kH});const VEe=Object.freeze(Object.defineProperty({__proto__:null,tracker:_Ee,trackers:mA},Symbol.toStringTag,{value:"Module"})),$H=60*60*24*7,qEe=60;class oI{constructor(e,r,n={}){this.proofStrings=new Map,this.onAuthCallbacks=[],this.indexerClients=new Map,this.account=e,this.settings=r,this.status=n}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:$H,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new hd(n,s)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"fulfilled",value:void 0})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Iy,n=Z.from(this.settings.sequenceApiChainId),s=Li(this.account.networks,n);if(!s)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new mb(Oy(s.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new hd(r,n)}return this.apiClient}getMetadataClient(){return this.metadataClient||(this.metadataClient=new Zw(this.settings.sequenceMetadataUrl)),this.metadataClient}async getIndexerClient(e){const r=Li(this.account.networks,e);if(!r)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(r.chainId))if(r.indexer)this.indexerClients.set(r.chainId,r.indexer);else if(r.indexerUrl)this.indexerClients.set(r.chainId,new Xw(r.indexerUrl));else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(r.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const AH=async(t,e,r)=>{const n=Ye(await t.getAddress());if(!n||n===""||n==="0x")throw _H;const s=new Uw;if(s.address=n,!r||!r.app||r.app==="")throw new pA("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):$H);const i=s.messageTypedData(),o=hW(e);s.signature=await(t instanceof ra?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const l=await new Iy().encodeProof(s,!0);return{typedData:i,proofString:l}};class pA extends Error{constructor(e){super(e),this.name="AuthError"}}const _H=new pA("auth error: account address is empty");function qc(){return qc=Object.assign?Object.assign.bind():function(t){for(var e=1;eT.wallet));let $;if(k){if($=new ra({address:k,tracker:b,networks:g,contexts:y,orchestrator:v}),c&&c.length>0){let T=await $.status(w);if(T.original.version!==T.version||$.version!==T.version){const{migratedAllChains:U,failedChains:V}=await $.isMigratedAllChains();if(V.some(N=>wS.includes(N)))throw Error(`Failed to fetch account status on ${V.join(", ")}`);if(!U){if(h&&!await h($))throw Error("Migration cancelled, cannot open session");const{failedChains:N}=await $.signAllMigrations(d||(S=>S));if(N.some(S=>wS.includes(S)))throw Error(`Failed to sign migrations on ${N.join(", ")}`);mA.isDedupedTracker(b)&&b.invalidateCache();let C;if([C,T]=await Promise.all([$.isMigratedAllChains().then(S=>S.migratedAllChains),$.status(w)]),!C)throw Error("Failed to migrate account")}}T.onChain.version!==T.version&&await $.doBootstrap(w,void 0,T);const B=T.config,L=$.coders.config.editConfig(B,{add:c,threshold:l});if($.coders.config.imageHashOf(B)!==$.coders.config.imageHashOf(L)){const U=$.coders.config.editConfig(L,{checkpoint:$.coders.config.checkpointOf(B).add(1)});await $.updateConfig(U)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if($=await ra.new({config:{threshold:l,checkpoint:0,signers:c},tracker:b,contexts:y,orchestrator:v,networks:g}),await $.publishWitness(),!(await b.walletsOfSigner({signer:a,noCache:!0})).some(B=>B.wallet===$.address))throw Error("Account not found on tracker")}let x;return p&&(x=new oI($,p),x.auth()),new bv(g,y,$,x)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=qc({},zp,n);let u;if(PH(r)){const v=r.config.address||ye.context.addressOf(a[1],Zo.config.ConfigCoder.imageHashOf(qc({},r.config,{version:1})));if(u=new ra({address:v,tracker:c,networks:l,contexts:a,orchestrator:o}),!await u.isMigratedAllChains().then(y=>y.migratedAllChains)){if(i&&!await i(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(s),!await u.isMigratedAllChains().then(y=>y.migratedAllChains))throw Error("Failed to migrate account")}}else if(TH(r))u=new ra({address:r.address,tracker:c,networks:l,contexts:a,orchestrator:o});else throw Error("Invalid dump format");let d;if(f){var h;d=new oI(u,f,r.jwt&&{jwt:{token:Promise.resolve(r.jwt.token),expiration:(h=r.jwt.expiration)!=null?h:eW(r.jwt.token).exp},metadata:r.metadata})}return new bv(l,a,u,d)}}const WEe=(t,e,r)=>async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},HEe=Object.freeze(Object.defineProperty({__proto__:null,AuthError:pA,CRITICAL_CHAINS:wS,ErrAccountIsRequired:_H,Session:bv,SessionSettingsDefault:zp,ValidateSequenceWalletProof:WEe,isSessionDumpV1:PH,isSessionDumpV2:TH,signAuthorization:AH},Symbol.toStringTag,{value:"Module"}));function xS(){return xS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),uu({},n)).then(s=>du(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.getSignerConfig=(n,s)=>this.fetch(this.url("GetSignerConfig"),uu(n,s)).then(i=>du(i).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,s)=>this.fetch(this.url("Sign"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.signWith=(n,s)=>this.fetch(this.url("SignWith"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const uu=(t={},e={})=>({method:"POST",headers:xS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),du=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),YEe=typeof global=="object"?global.fetch:window.fetch;class JEe{constructor(e,r,n=!1,s){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.onError=s,this.guard=new RH(r,YEe)}async getAddress(){return this.address}async requestSignature(e,r,n,s){return ye.isWalletSignRequestMetadata(n)?this.requests.set(e,s):s.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ye.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,s){return Gn.encode(["address","uint256","bytes","bytes"],[e,s,r,n])}keyOfRequest(e,r,n,s){return aa(["address","uint256","bytes","bytes"],[e,s,r,n])}async evaluateRequest(e,r,n,s){var i;const o=Bn.genericCoderFor(s.config.version),{encoded:a}=o.signature.encodeSigners(s.config,(i=s.parts)!=null?i:new Map,[],s.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,s.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const d=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(s.address,s.digest,a,s.chainId),chainId:Z.from(s.chainId).toNumber()}});ne(d.sig).length!==0&&(this.requests.get(e).onSignature(d.sig),this.requests.delete(e))}catch(f){var c;(c=this.onError)==null||c.call(this,f)}}suffix(){return this.appendSuffix?[3]:[]}}const XEe=Object.freeze(Object.defineProperty({__proto__:null,Guard:RH,GuardSigner:JEe,WebRPCSchemaHash:QEe,WebRPCSchemaVersion:KEe,WebRPCVersion:GEe},Symbol.toStringTag,{value:"Module"}));function $b(){return $b=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,s,i)=>{if(this.batchableJsonRpcMethods.find(o=>o===s.method)){this.queue.push({request:s,callback:i,next:n}),this.options.verbose&&console.log("Scheduling call",s.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",s.method),n(s,i)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)return;if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&r.scheduleExecution();const s=a[0].next;let i;var[a,l]=aI(a,h=>{try{if(h.next!==s)return!1;switch(h.request.method){case Ur.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Ur.ethGetBalance:case Ur.ethGetCode:const v=e5e(h.request.params[1]);if(i===void 0&&(i=v),!t5e(v,i))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(h=>{try{switch(h.request.method){case Ur.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case Ur.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case Ur.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,l]=aI(a,(h,v)=>o[v]!==void 0);if(o=o.filter(h=>h),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let c;try{c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const f=G4(),u=await ZEe(H4(s)({id:f,jsonrpc:Qd,method:Ur.ethCall,params:[{to:r.options.contract,value:0,data:c},Z.isBigNumber(i)?i.toNumber():i]}),h=>({jsonrpc:Qd,id:f,result:void 0,error:h}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,v)=>{if(!d[0][v])r.forward(h);else switch(h.request.method){case Ur.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][v]});break;case Ur.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["bytes"],d[1][v])[0]});break;case Ur.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["uint256"],d[1][v])[0]});break}})},this.options=e?$b({},Xs.DefaultOptions,e):Xs.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Xs.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Xs.DefaultOptions=$b({},r5e);const IH=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class n5e extends Bw{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(s){const i=n.provider;if(i.getResolver){const o=await i.getResolver(await s);return o?new J3(n,o.address,o.name):null}return i.getResolver(await s)},this.next=async function(s,i){try{switch(s.method){case Ur.ethCall:n.callback(s,i,await n.provider.call(s.params[0],s.params[1]));break;case Ur.ethGetCode:n.callback(s,i,await n.provider.getCode(s.params[0],s.params[1]));break;case Ur.ethGetBalance:n.callback(s,i,await n.provider.getBalance(s.params[0],s.params[1]));break}}catch(o){n.callback(s,i,void 0,o)}},this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),IH.forEach(s=>{e[s]!==void 0&&(this[s]=(...i)=>e[s](...i))})}callback(e,r,n,s){r(s,{jsonrpc:Qd,id:e.id,result:n,error:s})}async call(e,r){return this.rpcCall(Ur.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Ur.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Ur.ethGetBalance,e,r)}async rpcCall(e,...r){const n=G4();return(await H4(this.multicall.handle)(this.next,{jsonrpc:Qd,id:n,method:e,params:r})).result}}class s5e{constructor(e,r){if(this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),e.send){const n=async function(i,o){e.send(i,o)};this.send=(s,i)=>{this.multicall.handle(n,s,i)}}if(e.sendAsync){const n=async function(i,o){e.sendAsync(i,o)};this.sendAsync=(s,i)=>{this.multicall.handle(n,s,i)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const i5e=t=>e=>{const r=Xs.isMulticall(t)?t:new Xs(t);return(n,s)=>r.handle(e,n,s)};var o5e=Object.freeze({__proto__:null,ProxyMethods:IH,MulticallProvider:n5e,MulticallExternalProvider:s5e,multicallMiddleware:i5e});const a5e=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Xs,providers:o5e},Symbol.toStringTag,{value:"Module"}));var Jd={},l5e={get exports(){return Jd},set exports(t){Jd=t}};/*! +)[]`,cS=(t,e)=>{const r=[],n=new en($n.mainModule.abi);for(const s of e){const i=ne(s.data||"0x");if(s.to===t&&te(i.slice(0,4))===JW){const o=i.slice(4),a=Gn.decode([XW],o)[0];r.push(...cS(s.to,a.map(l=>kn({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=cS(t,o.map(l=>kn({},l,{to:l.target})));r.push(...a)}catch{r.push(s)}}return r};var iCe=Object.freeze({__proto__:null,MetaTransactionsType:Qw,intendTransactionBundle:Qxe,intendedTransactionID:Yxe,unpackMetaTransactionsData:Jxe,packMetaTransactionsData:WW,digestOfTransactions:HW,subdigestOfTransactions:Xxe,subdigestOfGuestModuleTransactions:Zxe,toSequenceTransactions:GW,toSequenceTransaction:dA,isSequenceTransaction:Yw,hasSequenceTransactions:KW,sequenceTxAbiEncode:My,fromTxAbiEncode:eCe,encodeNonce:tCe,decodeNonce:rCe,fromTransactionish:nCe,isTransactionBundle:QW,isSignedTransactionBundle:YW,encodeBundleExecData:sCe,selfExecuteSelector:JW,selfExecuteAbi:XW,unwind:cS});const ZW="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",oCe="0x6492649264926492649264926492649264926492649264926492649264926492";async function eH(t,e,r,n){return await t.call({data:Ht([ZW,new A4().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var aCe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZW,EIP_6492_SUFFIX:oCe,validateEIP6492Offchain:eH});class lCe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Oh(e,[...$n.mainModuleUpgradable.abi,...$n.mainModule.abi,...$n.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>ne(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Gn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(s=>ne(s));if(n.length===20)return Ye(te(n));if(n.length===32)return Gn.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return eH(this.provider,e,r,n)}}var cCe=Object.freeze({__proto__:null,OnChainReader:lCe});function fCe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ye=Object.freeze({__proto__:null,config:Sxe,signature:kxe,context:Kxe,signer:Rxe,EIP1271:_xe,transaction:iCe,reader:cCe,EIP6492:aCe,isWalletSignRequestMetadata:fCe});const fS=[{config:tA,signature:eA},{config:Kw,signature:Gw}];function tH(t){const e=t-1;if(e<0||e>=fS.length)throw new Error(`No coder for version: ${t}`);return fS[e]}function uCe(t){return tH(t)}var Bn=Object.freeze({__proto__:null,ALL_CODERS:fS,coderFor:tH,genericCoderFor:uCe});const rH=[Zo,Qe],dCe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:rH,commons:ye,universal:Bn,v1:Zo,v2:Qe},Symbol.toStringTag,{value:"Module"}));function hCe(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:s,chainId:i}=e;let o=n,a=s;const l=Object.values(this.contexts),c=[];for(let f=1;fne(i).length===0))return X9;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Z.from(s).toNumber(),gasLimit:Z.from(s).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const i=await new Oh(e,$n.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ye.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let d=0;for(;!o;){try{return await f()}catch(h){if(d++,s!==void 0&&d>=s)throw xe.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,h),h;xe.warn(`attempt #${d} failed${u?`: ${u}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=i.fromBlockLog;if(f<0&&(f=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,f-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-i.deltaBlocksLog)} to ${d}`);f=d;const y=(await Promise.all(h.map(g=>a(()=>i.provider.getTransactionReceipt(g.transactionHash),`unable to get receipt for transaction ${g.transactionHash}`)))).find(g=>g.logs.find(b=>b.topics.length===0&&b.data.replace("0x","")===u||b.topics.length===1&&b.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&b.data.length>=64&&b.data.replace("0x","").startsWith(u)));if(y)return Tf({receipt:y},await a(()=>i.provider.getTransaction(y.transactionHash),`unable to get transaction ${y.transactionHash}`));o||await new Promise(g=>setTimeout(g,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function wCe(t){return t.signer!==void 0&&Sf.isSigner(t.signer)}class xCe extends aH{constructor(e){if(super(Sf.isSigner(e)?{provider:e.provider}:Tf({},e,{provider:e.signer.provider})),this.signer=Sf.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&xe.warn("LocalRelayer doesn't accept fee quotes");const s=ye.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(Tf({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}const CCe="v1",ECe="v0.4.0",SCe="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let ml=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),kCe=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),$Ce=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),ACe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class lH{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Nr({},n)).then(s=>Lr(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Nr({},n)).then(s=>Lr(s).then(i=>({data:i.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Nr({},n)).then(s=>Lr(s).then(i=>({chainID:i.chainID}))),this.sendMetaTxn=(n,s)=>this.fetch(this.url("SendMetaTxn"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,s)=>this.fetch(this.url("GetMetaTxnNonce"),Nr(n,s)).then(i=>Lr(i).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,s)=>this.fetch(this.url("GetMetaTxnReceipt"),Nr(n,s)).then(i=>Lr(i).then(o=>({receipt:o.receipt}))),this.simulate=(n,s)=>this.fetch(this.url("Simulate"),Nr(n,s)).then(i=>Lr(i).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,s)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Nr(n,s)).then(i=>Lr(i).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Nr({},n)).then(s=>Lr(s).then(i=>({isFeeRequired:i.isFeeRequired,tokens:i.tokens}))),this.feeOptions=(n,s)=>this.fetch(this.url("FeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,s)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options}))),this.sentTransactions=(n,s)=>this.fetch(this.url("SentTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,s)=>this.fetch(this.url("PendingTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,s)=>this.fetch(this.url("ListGasSponsors"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,s)=>this.fetch(this.url("AddGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,s)=>this.fetch(this.url("UpdateGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,s)=>this.fetch(this.url("ReportGasSponsorUsage"),Nr(n,s)).then(i=>Lr(i).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Nr=(t={},e={})=>({method:"POST",headers:Tf({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Lr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Yd=Object.freeze({__proto__:null,WebRPCVersion:CCe,WebRPCSchemaVersion:ECe,WebRPCSchemaHash:SCe,ETHTxnStatus:ml,TransferType:kCe,FeeTokenType:$Ce,SortOrder:ACe,Relayer:lH});const _Ce=[ml.DROPPED,ml.SUCCEEDED,ml.PARTIALLY_FAILED,ml.FAILED],PCe=[ml.DROPPED,ml.PARTIALLY_FAILED,ml.FAILED];function TCe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&uc.isProvider(t.provider)}const RCe=typeof global=="object"?global.fetch:window.fetch;class cH{constructor(e){this.service=new lH(e.url,RCe),this.provider=uc.isProvider(e.provider)?e.provider:new mb(Oy(e.provider.url))}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e)),xe.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&_Ce.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Gn.encode([ye.transaction.MetaTransactionsType],[ye.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(l=>l.symbol).join(", ");xe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw xe.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:ye.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return xe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return xe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){xe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?Z.from(r).toHexString():void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=Z.from(s.nonce),[o,a]=ye.transaction.decodeNonce(i);return xe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0){var s=this;xe.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let i;if(r!==void 0&&(typeof r._quote=="string"?i=r._quote:xe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw xe.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ye.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:i});if(xe.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var d;if(!s.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await s.wait(e.intent.id),v=(d=h.receipt)==null?void 0:d.transactionHash;if(!v)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,h),s.provider.waitForTransaction(v,u)};return l.wait=c,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||PCe.includes(a.status))throw new ICe(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:Z.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return i.provider.waitForTransaction(l.transactionHash,c)}}}}class ICe{constructor(e){this.receipt=e}}function fH(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const OCe=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:xCe,ProviderRelayer:aH,ProviderRelayerDefaults:oH,RpcRelayer:cH,RpcRelayerProto:Yd,isLocalRelayerOptions:wCe,isProviderRelayerOptions:bCe,isRelayer:fH,isRpcRelayerOptions:TCe,proto:Yd},Symbol.toStringTag,{value:"Module"}));function uH(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class dH{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,s){return s.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var MCe=Object.freeze({__proto__:null,isSapientSigner:uH,SignerWrapper:dH});function hH(t){return t.rejected}function hA(t){return t.signature!==void 0}function vH(t){return!hH(t)&&!hA(t)}const yH="Initial";class Jw{constructor(e,r=Jw.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(jw(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>uH(r)?r:new dH(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:i,signers:{}};let f=o??{};const u=y=>{f=y,r.notifyObservers(n,c,f)},d=()=>{try{r.notifyObservers(n,c,f);const y=Object.entries(c.signers).filter(([g,b])=>vH(b));if(a&&a(c,u)||y.length===0){c.ended=!0,s(c),r.notifyObservers(n,c,f);return}}catch(y){console.error("Error while notifying observers",y)}};let h=r.signers;if(l){const y=await Promise.all(r.signers.map(async function(g){return g.getAddress()}));h=r.signers.filter((g,b)=>l.includes(y[b]))}const v=await Promise.allSettled(h.map(async function(y){const g=await y.getAddress();return c.signers[g]={situation:yH},y.requestSignature(n,i,o??{},{onSignature:b=>{const p=y.suffix();c.signers[g]={signature:b,suffix:p},d()},onRejection:b=>{c.signers[g]={rejected:!0,error:b},d()},onStatus:b=>{c.signers[g]={situation:b},d()}})}));for(let y=0;ymt(e))):mt(t)}const eI=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(hA(n)){const s=ne(n.suffix),i=He(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class Dy extends Sf{constructor(e){if(rr.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ye.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Dy(zc({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ye.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ye.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return Dy.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(zc({},e,{chainId:this.chainId,intent:{id:te(jw(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new en($n.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async signDigest(e,r){const n=nS(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const s=zc({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),i=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:i,metadata:s,callback:(l,c)=>{const f=eI(l),u=zc({},s,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=eI(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Ue(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space)r=Z.from(e.space);else if(e===void 0)r=0;else return e;const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return ye.transaction.encodeNonce(r,n)}async signTransactions(e,r){const n=await Z9(e),s=ye.transaction.fromTransactionish(this.address,n);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const i=await this.fetchNonceOrSpace(r),o=ye.transaction.digestOfTransactions(i,s),a=await this.signDigest(o,{transactions:s});return{intent:{id:nS(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:i,signature:a}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r,n){const s=await this.signTransactions(e,r),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,n)}async fillGasLimits(e){const r=await Z9(e),n=ye.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?Z.from(o.gasLimit).toNumber():i[a].gasLimit;return zc({},o,i[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var e=1;eNCe(t[e])):!1}function jCe(t){if(!t)return[];const e=Z.from(t.value);switch(t.token.type){case Yd.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Yd.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new en([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class FCe{constructor(e,r,n){this._isSigner=!0,this.account=e,this.chainId=r,this.options=n}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const s of r)if(s.token.type===Yd.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(Z.from(s.value)))return s}else if(s.token.contractAddress&&s.token.type===Yd.FeeTokenType.ERC20_TOKEN&&(await new Oh(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(Z.from(s.value)))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e){var r,n,s,i,o;const a=LCe(e)?await mt(e):e,l=await this.account.prepareTransactions({txs:a,chainId:this.chainId,stubSignatureOverrides:(r=(n=this.options)==null?void 0:n.stubSignatureOverrides)!=null?r:new Map}),f=await((s=(i=this.options)==null?void 0:i.selectFee)!=null?s:this.defaultSelectFee.bind(this))(a,l.feeOptions),u=[...l.transactions,...jCe(f)];return this.account.sendTransaction(u,this.chainId,l.feeQuote,void 0,void 0,(o=this.options)!=null&&o.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(Z.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class BCe{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return rr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class ra{constructor(e){this.address=Ye(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.migrations=e.migrations||vS.DefaultMigrations,this.migrator=new hS.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new FCe(this,e,r)}static async new(e){var r;const s=new hS.Migrator(e.tracker,(r=e.migrations)!=null?r:vS.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),l=e.contexts[s.version],c=ye.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new ra({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=Z.from(e),n=this.networks.find(s=>r.eq(s.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new mb(Oy(r.rpcUrl),{name:"",chainId:Z.from(e).toNumber()})}reader(e){return rr.eq(e)?new BCe:new ye.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return fH(r.relayer)?r.relayer:new cH(r.relayer)}setOrchestrator(e){this.orchestrator=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=Bn.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=rr.eq(e);return new Dy({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(k=>{if(!k)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return k}),o=i.then(k=>nH.counterfactualVersion(this.address,k.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const A=await n.reader(e).implementation(n.address);if(!A)throw new Error(`Implementation not found for wallet ${n.address}`);const x=Object.values(n.contexts);for(let T=0;T0?y[y.length-1].nextImageHash:d,b=await this.tracker.configOfImageHash({imageHash:g});if(!b)throw new Error(`Config not found for imageHash ${g}`);const p=await s,w=await i,E=Bn.coderFor(h).config.checkpointOf(b);return{original:Vc({},w,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:p},fullyMigrated:h===this.version,signedMigrations:v,version:h,presignedConfigurations:y,imageHash:g,config:b,checkpoint:E,canOnchainValidate:f===this.version&&p}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);if(n.transactions.length===0)return e;const s={entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]};return r.onChain.deployed||(s.intent.id=ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,s.chainId,s.transactions)),s}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitness(){const e=Ue(xt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore"){const i=rr.eq(r)?this.networks[0].chainId:r,o=await this.status(i);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),c=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(s){case"ignore":return c;case"eip6492":return this.buildEIP6492Signature(await c,o,r)}return c}buildEIP6492Signature(e,r,n){const s=this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Gn.encode(["address","bytes","bytes"],[s.entrypoint,ye.transaction.encodeBundleExecData(s),e]);return He(["bytes","bytes32"],[i,ye.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,Vc({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=Dy.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ye.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const s=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:i}=this.contextFor(e.version);return{entrypoint:i,transactions:n,chainId:r,intent:{id:s,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Vc({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Ue(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const a=await this.walletForStatus(r,i).signTransactions(e,(s==null?void 0:s.nonceSpace)&&{space:s==null?void 0:s.nonceSpace});return Vc({},a,{signature:await this.decorateSignature(a.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=Bn.coderFor(i.version).config,l=a.imageHashOf(i),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i){const o=s||await this.status(e.chainId);this.mustBeFullyMigrated(o);const a=this.decorateTransactions(e,o);return i==null||i(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,s){const i=s||await this.status(r),o=this.walletForStatus(r,i),a=await this.predecorateTransactions(e,i,r),l=ye.transaction.fromTransactionish(this.address,a),c=o.coders.config.buildStubSignature(o.config,n),f=te(jw(32)),u={chainId:r,intent:{id:f,wallet:this.address},signature:c,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,i),h=ye.transaction.encodeBundleExecData(d),v=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,h);return Vc({},v,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),i=ye.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),l=s?e:await this.predecorateTransactions(e,a,r),c=await this.signTransactions(l,r,void 0,o);return this.sendSignedTransactions(c,r,n,void 0,i)}async signTypedData(e,r,n,s,i="ignore"){const o=zw({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>Bn.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Bn.genericCoderFor(f.version).config.signersOf(f).forEach(h=>{const v=r.find(y=>y.address===h.address&&y.network===s);if(v&&c&&v.flaggedForRemoval){v.flaggedForRemoval=!1;return}v||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!c})})}))})),r}}function UCe(t){return t instanceof ra}const zCe=Object.freeze(Object.defineProperty({__proto__:null,Account:ra,isAccount:UCe},Symbol.toStringTag,{value:"Module"}));function kb(){return kb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),ys({},n)).then(s=>ms(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),ys({},n)).then(s=>ms(s).then(i=>({chainID:i.chainID}))),this.getEtherBalance=(n,s)=>this.fetch(this.url("GetEtherBalance"),ys(n,s)).then(i=>ms(i).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,s)=>this.fetch(this.url("GetTokenBalances"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,s)=>this.fetch(this.url("GetTokenSupplies"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,s)=>this.fetch(this.url("GetTokenSuppliesMap"),ys(n,s)).then(i=>ms(i).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,s)=>this.fetch(this.url("GetBalanceUpdates"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,s)=>this.fetch(this.url("GetTransactionHistory"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,s)=>this.fetch(this.url("SyncBalance"),ys(n,s)).then(i=>ms(i).then(o=>({}))),this.fetchTransactionReceipt=(n,s)=>this.fetch(this.url("FetchTransactionReceipt"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const ys=(t={},e={})=>({method:"POST",headers:kb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ms=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});let JCe=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const tI=typeof global=="object"?global.fetch:window.fetch;class Xw extends mH{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,tI),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=kb({},s.headers,i),tI(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const XCe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:vA,EventLogDataType:GCe,EventLogType:HCe,Indexer:mH,SequenceIndexerClient:Xw,SequenceIndexerServices:JCe,SortOrder:YCe,TransactionStatus:KCe,TransactionType:QCe,TxnTransferType:Ei,WebRPCSchemaHash:WCe,WebRPCSchemaVersion:qCe,WebRPCVersion:VCe},Symbol.toStringTag,{value:"Module"}));function yS(){return yS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),nn({},n)).then(s=>sn(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.getTokenMetadata=(n,s)=>this.fetch(this.url("GetTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,s)=>this.fetch(this.url("RefreshTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,s)=>this.fetch(this.url("GetTokenMetadataBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,s)=>this.fetch(this.url("SearchTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,s)=>this.fetch(this.url("SearchTokenIDs"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,s)=>this.fetch(this.url("TokenCollectionFilters"),nn(n,s)).then(i=>sn(i).then(o=>({filters:o.filters}))),this.getContractInfo=(n,s)=>this.fetch(this.url("GetContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,s)=>this.fetch(this.url("GetContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,s)=>this.fetch(this.url("SearchContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,s)=>this.fetch(this.url("SearchContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,s)=>this.fetch(this.url("SearchMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,s)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),nn(n,s)).then(i=>sn(i).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPrices"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const nn=(t={},e={})=>({method:"POST",headers:yS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),sn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),oEe=typeof global=="object"?global.fetch:window.fetch;class Zw extends pH{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,oEe)}}const aEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:rEe,Metadata:pH,PropertyType:nEe,SequenceMetadataClient:Zw,SortOrder:iEe,SwapType:sEe,WebRPCSchemaHash:tEe,WebRPCSchemaVersion:eEe,WebRPCVersion:ZCe},Symbol.toStringTag,{value:"Module"}));function lEe(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function cEe(t){return t.startsWith("ipfs://")}class fEe{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(ye.signer.canRecover(n)){const l=ye.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ye.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await dEe(uEe(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(s||new hEe).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===te(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return gH(t,e,r,a,s,i+1)}class hEe{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>cEe(n)?lEe(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()},this.gateway=e}}const vEe=(t,e)=>e.some(r=>t instanceof r);let rI,nI;function yEe(){return rI||(rI=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mEe(){return nI||(nI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bH=new WeakMap,mS=new WeakMap,wH=new WeakMap,ME=new WeakMap,yA=new WeakMap;function pEe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ol(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&bH.set(r,t)}).catch(()=>{}),yA.set(e,t),e}function gEe(t){if(mS.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});mS.set(t,e)}let pS={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return mS.get(t);if(e==="objectStoreNames")return t.objectStoreNames||wH.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ol(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function bEe(t){pS=t(pS)}function wEe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(DE(this),e,...r);return wH.set(n,e.sort?e.sort():[e]),Ol(n)}:mEe().includes(t)?function(...e){return t.apply(DE(this),e),Ol(bH.get(this))}:function(...e){return Ol(t.apply(DE(this),e))}}function xEe(t){return typeof t=="function"?wEe(t):(t instanceof IDBTransaction&&gEe(t),vEe(t,yEe())?new Proxy(t,pS):t)}function Ol(t){if(t instanceof IDBRequest)return pEe(t);if(ME.has(t))return ME.get(t);const e=xEe(t);return e!==t&&(ME.set(t,e),yA.set(e,t)),e}const DE=t=>yA.get(t);function CEe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ol(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ol(o.result),l.oldVersion,l.newVersion,Ol(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const EEe=["get","getKey","getAll","getAllKeys","count"],SEe=["put","add","delete","clear"],NE=new Map;function sI(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(NE.get(e))return NE.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=SEe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||EEe.includes(r)))return;const i=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),s&&l.done]))[0]};return NE.set(e,i),i}bEe(t=>({...t,get:(e,r,n)=>sI(e,r)||t.get(e,r,n),has:(e,r)=>!!sI(e,r)||t.has(e,r)}));class kEe{}var $Ee=Object.freeze({__proto__:null,ConfigTracker:kEe});class AEe{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),On(e,"? "),On(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),On(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),On(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),On(e,"? "),On(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),On(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),On(e,"? "),On(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),On(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),On(e,"? "),On(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),On({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),On(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),On({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function On(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var _Ee=Object.freeze({__proto__:null,DebugConfigTracker:AEe});function Kl(){return Kl=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var s,i;return Promise.resolve(((s=this.migrations[e])==null||(i=s[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:s,toImageHash:i}),Promise.resolve())}}function bd(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=Z.from(n):Array.isArray(n)?e[r]=n.map(s=>bd(s)):typeof n=="object"&&n!==null?e[r]=bd(n):e[r]=n}return e}class PEe{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>bd(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>bd(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>bd(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await CEe(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function CH(t){return t.left!==void 0&&t.right!==void 0}function EH(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function gS(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var TEe=Object.freeze({__proto__:null,isPlainNode:CH,isPlainNested:EH,isPlainV2Config:gS,MemoryTrackerStore:xH,recreateBigNumbers:bd,IndexedDBStore:PEe});class SH{constructor(e,r=new xH,n=!1){var s=this;this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(CH(o)){const[a,l]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:l}}return EH(o)?{weight:Z.from(o.weight),threshold:Z.from(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(Qe.config.isNodeLeaf(i))return;const o=Qe.config.hashNode(i);if(Qe.config.isNode(i)){const a=s.saveTopology(i.left),l=s.saveTopology(i.right),c=s.store.saveV2Node(o,{left:Qe.config.hashNode(i.left),right:Qe.config.hashNode(i.right)});await Promise.all([a,l,c]);return}if(Qe.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),l=s.store.saveV2Node(o,{weight:Z.from(i.weight).toString(),threshold:Z.from(i.threshold).toString(),tree:Qe.config.hashNode(i.tree)});await Promise.all([a,l]);return}if(Qe.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(Qe.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Zo.config.ConfigCoder.isWalletConfig(o)){const a=Zo.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(Qe.config.ConfigCoder.isWalletConfig(o)){const a=Qe.config.ConfigCoder.imageHashOf(o);if(Qe.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!gS(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(gS(a)){const l={version:2,threshold:Z.from(a.threshold),checkpoint:Z.from(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,l=Bn.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(c=>{const f=ye.context.addressOf(c,l);return s.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=ye.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=Qe.signature.SignatureCoder.decode(i.signature),a=Bn.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),l=Qe.chained.messageSetImageHash(a),c=Ue(l),f={message:l,address:i.wallet,chainId:0,digest:c},u=s.savePayload({payload:f}),d=s.saveWalletConfig({config:i.nextConfig}),h=await Qe.signature.SignatureCoder.recover(o,f,s.provider),v=Qe.signature.signaturesOf(h.config.tree);await Promise.all([u,d,s.saveWalletConfig({config:h.config}),...v.map(y=>s.store.saveSignatureOfSubdigest(y.address,h.subdigest,y.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:l}=i,c=await s.configOfImageHash({imageHash:a});if(!c||!Qe.config.ConfigCoder.isWalletConfig(c))return[];const f=Qe.config.signersOf(c.tree).map(w=>w.address),u=await Promise.all(f.map(w=>s.store.loadSubdigestsOfSigner(w))),d=[...new Set(u.flat())],v=(await Promise.all([...new Set(d)].map(async function(w){return Kl({},await s.payloadOfSubdigest({subdigest:w}),{subdigest:w})}))).filter(w=>(w==null?void 0:w.message)&&(w==null?void 0:w.address)&&w.address===o).map(w=>({payload:w,nextImageHash:Qe.chained.decodeMessageSetImageHash(w.message)})).filter(w=>w==null?void 0:w.nextImageHash);let y;const b=(await Promise.all(v.map(async function({nextImageHash:w,payload:E}){const k=await s.configOfImageHash({imageHash:w});if(!k||!Qe.config.isWalletConfig(k))return;const A=Z.from(k.checkpoint);return{nextConfig:k,nextCheckpoint:A,nextImageHash:w,payload:E}}))).filter(w=>w!==void 0).filter(w=>w.nextCheckpoint.gt(c.checkpoint)).sort((w,E)=>w.nextCheckpoint.gt(E.nextCheckpoint)?l?1:-1:l?-1:1);for(const w of b){const{nextConfig:E,nextCheckpoint:k,nextImageHash:A,payload:x}=w;if(y){const L=y.checkpoint;if(l){if(k.gte(L))continue}else if(k.lte(L))continue}const T=new Map((await Promise.all(f.map(async function(L){const U=await s.store.loadSignatureOfSubdigest(L,x.subdigest);if(!U)return[L,void 0];const V=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(L,x.subdigest,U):U),N=ye.signer.tryRecoverSigner(x.subdigest,V)!==L;return[L,{isDynamic:N,signature:V}]}))).filter(L=>Boolean(L[1])));if(T.size===0)continue;const B=Qe.signature.SignatureCoder.encodeSigners(c,T,[],0);B.weight.lt(c.threshold)||(y={nextImageHash:A,checkpoint:Z.from(E.checkpoint),signature:B.encoded})}if(!y)return[];const p=await s.loadPresignedConfiguration({wallet:o,fromImageHash:y.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:y.nextImageHash,signature:y.signature},...p]},this.saveWitnesses=async function(i){const o={digest:i.digest,address:i.wallet,chainId:i.chainId},a=ye.signature.subdigestOf(o);await Promise.all([s.savePayload({payload:o}),...i.signatures.filter(l=>ye.signer.canRecover(l)).map(l=>{const c=ye.signer.recoverSigner(a,l);return s.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(c=>s.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(h=>h.wallet===f))continue;const u=ye.signature.subdigestOf(c),d=await s.store.loadSignatureOfSubdigest(i.signer,u);d&&l.push({wallet:f,proof:{digest:c.digest,chainId:Z.from(c.chainId),signature:te(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new fEe(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!Qe.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=iH.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Qe.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=ye.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=Ue(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ye.signature.subdigestOf(c),u=this.savePayload({payload:c}),d=this.saveWalletConfig({config:r.toConfig}),h=Zo.signature.SignatureCoder.decode(r.tx.signature),v=await Zo.signature.SignatureCoder.recover(h,c,this.provider),y=Zo.signature.SignatureCoder.signaturesOf(v.config);await Promise.all([u,d,this.saveWalletConfig({config:v.config}),this.store.saveMigrationsSubdigest(e,s,s+1,f,i),...y.map(g=>this.store.saveSignatureOfSubdigest(g.address,v.subdigest,g.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Bn.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:d}=f,h=await i.payloadOfSubdigest({subdigest:u});if(!h||!h.message||!Z.from(s).eq(h.chainId))return;const v=l.config.signersOf(o).map(w=>w.address),y=new Map((await Promise.all(v.map(async function(w){const E=await i.store.loadSignatureOfSubdigest(w,u);if(!E)return[w,void 0];const k=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(w,u,E):E),A=ye.signer.tryRecoverSigner(u,k)!==w;return[w,{isDynamic:A,signature:k}]}))).filter(w=>Boolean(w[1]))),g=l.signature.encodeSigners(o,y,[],s);if(!g||g.weightf.filter(u=>u!==void 0)))[0]}}var REe=Object.freeze({__proto__:null,LocalConfigTracker:SH});let LE=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class IEe{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),gi({},n)).then(s=>bi(s).then(i=>({}))),this.config=(n,s)=>this.fetch(this.url("Config"),gi(n,s)).then(i=>bi(i).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,s)=>this.fetch(this.url("Wallets"),gi(n,s)).then(i=>bi(i).then(o=>({wallets:o.wallets}))),this.deployHash=(n,s)=>this.fetch(this.url("DeployHash"),gi(n,s)).then(i=>bi(i).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,s)=>this.fetch(this.url("ConfigUpdates"),gi(n,s)).then(i=>bi(i).then(o=>({updates:o.updates}))),this.migrations=(n,s)=>this.fetch(this.url("Migrations"),gi(n,s)).then(i=>bi(i).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,s)=>this.fetch(this.url("SaveConfig"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveWallet=(n,s)=>this.fetch(this.url("SaveWallet"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignature=(n,s)=>this.fetch(this.url("SaveSignature"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignerSignatures=(n,s)=>this.fetch(this.url("SaveSignerSignatures"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveMigration=(n,s)=>this.fetch(this.url("SaveMigration"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const gi=(t={},e={})=>({method:"POST",headers:Kl({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),bi=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class OEe{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new IEe(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(jE(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Bn.genericCoderFor(r.version).config.imageHashOf(r),s=Qe.signature.setImageHashStruct(n),i=Ue(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Lm(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ye.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Gu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return MEe(r,n)}catch(r){if(jE(r))return;throw r}}async saveWalletConfig(e){const r=Lm(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(jE(r))return;throw r}}async saveCounterfactualWallet(e){const r=Lm(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:s,chainID:i,type:o,signature:a}])=>{switch(o){case LE.EIP712:a+=te(ye.signer.SigType.EIP712).slice(2);break;case LE.EthSign:a+=te(ye.signer.SigType.ETH_SIGN).slice(2);break;case LE.EIP1271:a+=te(ye.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:Z.from(i)}}})}async getMigration(e,r,n,s){var i=this;const o=Gu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const h=Object.keys(d).map(Number).sort((v,y)=>y-v);for(const v of h)for(const[y,g]of Object.entries(d[v]))try{const b=await i.configOfImageHash({imageHash:y});if(b)return{fromVersion:n,toVersion:v,toConfig:b,tx:{entrypoint:g.executor,transactions:g.transactions,nonce:g.nonce,signature:g.signature,chainId:u,intent:{id:ye.transaction.subdigestOfTransactions(e,u,g.nonce,g.transactions),wallet:e}}}}catch(b){console.error(b)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Lm(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(DEe),nonce:Gu(r.tx.nonce),signature:r.tx.signature,chainID:Gu(r.tx.chainId)})}}function Lm(t){switch(t.version){case 1:if(Zo.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Jc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Qe.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),checkpoint:Jc(t.checkpoint),tree:Bp(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Bp(t){return Qe.config.isNode(t)?{left:Bp(t.left),right:Bp(t.right)}:Qe.config.isSignerLeaf(t)?{weight:Jc(t.weight),address:t.address}:Qe.config.isNestedLeaf(t)?{weight:Jc(t.weight),threshold:Jc(t.threshold),tree:Bp(t.tree)}:Qe.config.isNodeLeaf(t)?{node:t.nodeHash}:Kl({},t)}function MEe(t,e){switch(t){case 1:return Kl({},e,{version:t});case 2:return Kl({},e,{version:t,tree:Up(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Up(t){switch(typeof t){case"object":const e=Kl({},t);return e.left!==void 0&&(e.left=Up(e.left)),e.right!==void 0&&(e.right=Up(e.right)),e.tree!==void 0&&(e.tree=Up(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function DEe(t){return{to:t.to,value:t.value!==void 0?Gu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Gu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Jc(t){return Z.from(t).toNumber()}function Gu(t){return Z.from(t).toString()}function jE(t){return typeof t=="object"&&t.status===404}var NEe=Object.freeze({__proto__:null,RemoteConfigTracker:OEe});function bS(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function L1(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class LEe{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await bS(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Bn.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const s=new SH(void 0),i=await L1(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await bS(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(n));return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await L1(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=i.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},i.set(f,u)),u.signatures.push(c)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await L1(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),i=(await L1(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Bn.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!i)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return i.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class jEe{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return s||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class iI{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,FEe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function FEe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function BEe(t){return t instanceof kH}class kH{constructor(e,r=50,n=!1){this.cache=new iI,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new iI}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}}var mA=Object.freeze({__proto__:null,debug:_Ee,local:REe,remote:NEe,stores:TEe,raceUntil:bS,allSafe:L1,MultipleTracker:LEe,CachedTracker:jEe,isDedupedTracker:BEe,DedupedTracker:kH});const UEe=Object.freeze(Object.defineProperty({__proto__:null,tracker:$Ee,trackers:mA},Symbol.toStringTag,{value:"Module"})),$H=60*60*24*7,zEe=60;class oI{constructor(e,r,n={}){this.proofStrings=new Map,this.onAuthCallbacks=[],this.indexerClients=new Map,this.account=e,this.settings=r,this.status=n}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:$H,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new hd(n,s)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"fulfilled",value:void 0})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Iy,n=Z.from(this.settings.sequenceApiChainId),s=Ni(this.account.networks,n);if(!s)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new mb(Oy(s.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new hd(r,n)}return this.apiClient}getMetadataClient(){return this.metadataClient||(this.metadataClient=new Zw(this.settings.sequenceMetadataUrl)),this.metadataClient}async getIndexerClient(e){const r=Ni(this.account.networks,e);if(!r)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(r.chainId))if(r.indexer)this.indexerClients.set(r.chainId,r.indexer);else if(r.indexerUrl)this.indexerClients.set(r.chainId,new Xw(r.indexerUrl));else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(r.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const AH=async(t,e,r)=>{const n=Ye(await t.getAddress());if(!n||n===""||n==="0x")throw _H;const s=new Uw;if(s.address=n,!r||!r.app||r.app==="")throw new pA("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):$H);const i=s.messageTypedData(),o=hW(e);s.signature=await(t instanceof ra?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const l=await new Iy().encodeProof(s,!0);return{typedData:i,proofString:l}};class pA extends Error{constructor(e){super(e),this.name="AuthError"}}const _H=new pA("auth error: account address is empty");function qc(){return qc=Object.assign?Object.assign.bind():function(t){for(var e=1;eT.wallet));let A;if(k){if(A=new ra({address:k,tracker:b,networks:g,contexts:y,orchestrator:v}),c&&c.length>0){let T=await A.status(w);if(T.original.version!==T.version||A.version!==T.version){const{migratedAllChains:U,failedChains:V}=await A.isMigratedAllChains();if(V.some(N=>wS.includes(N)))throw Error(`Failed to fetch account status on ${V.join(", ")}`);if(!U){if(h&&!await h(A))throw Error("Migration cancelled, cannot open session");const{failedChains:N}=await A.signAllMigrations(d||(S=>S));if(N.some(S=>wS.includes(S)))throw Error(`Failed to sign migrations on ${N.join(", ")}`);mA.isDedupedTracker(b)&&b.invalidateCache();let C;if([C,T]=await Promise.all([A.isMigratedAllChains().then(S=>S.migratedAllChains),A.status(w)]),!C)throw Error("Failed to migrate account")}}T.onChain.version!==T.version&&await A.doBootstrap(w,void 0,T);const B=T.config,L=A.coders.config.editConfig(B,{add:c,threshold:l});if(A.coders.config.imageHashOf(B)!==A.coders.config.imageHashOf(L)){const U=A.coders.config.editConfig(L,{checkpoint:A.coders.config.checkpointOf(B).add(1)});await A.updateConfig(U)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if(A=await ra.new({config:{threshold:l,checkpoint:0,signers:c},tracker:b,contexts:y,orchestrator:v,networks:g}),await A.publishWitness(),!(await b.walletsOfSigner({signer:a,noCache:!0})).some(B=>B.wallet===A.address))throw Error("Account not found on tracker")}let x;return p&&(x=new oI(A,p),x.auth()),new bv(g,y,A,x)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=qc({},zp,n);let u;if(PH(r)){const v=r.config.address||ye.context.addressOf(a[1],Zo.config.ConfigCoder.imageHashOf(qc({},r.config,{version:1})));if(u=new ra({address:v,tracker:c,networks:l,contexts:a,orchestrator:o}),!await u.isMigratedAllChains().then(y=>y.migratedAllChains)){if(i&&!await i(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(s),!await u.isMigratedAllChains().then(y=>y.migratedAllChains))throw Error("Failed to migrate account")}}else if(TH(r))u=new ra({address:r.address,tracker:c,networks:l,contexts:a,orchestrator:o});else throw Error("Invalid dump format");let d;if(f){var h;d=new oI(u,f,r.jwt&&{jwt:{token:Promise.resolve(r.jwt.token),expiration:(h=r.jwt.expiration)!=null?h:eW(r.jwt.token).exp},metadata:r.metadata})}return new bv(l,a,u,d)}}const VEe=(t,e,r)=>async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},qEe=Object.freeze(Object.defineProperty({__proto__:null,AuthError:pA,CRITICAL_CHAINS:wS,ErrAccountIsRequired:_H,Session:bv,SessionSettingsDefault:zp,ValidateSequenceWalletProof:VEe,isSessionDumpV1:PH,isSessionDumpV2:TH,signAuthorization:AH},Symbol.toStringTag,{value:"Module"}));function xS(){return xS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),uu({},n)).then(s=>du(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.getSignerConfig=(n,s)=>this.fetch(this.url("GetSignerConfig"),uu(n,s)).then(i=>du(i).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,s)=>this.fetch(this.url("Sign"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.signWith=(n,s)=>this.fetch(this.url("SignWith"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const uu=(t={},e={})=>({method:"POST",headers:xS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),du=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),KEe=typeof global=="object"?global.fetch:window.fetch;class QEe{constructor(e,r,n=!1,s){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.onError=s,this.guard=new RH(r,KEe)}async getAddress(){return this.address}async requestSignature(e,r,n,s){return ye.isWalletSignRequestMetadata(n)?this.requests.set(e,s):s.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ye.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,s){return Gn.encode(["address","uint256","bytes","bytes"],[e,s,r,n])}keyOfRequest(e,r,n,s){return aa(["address","uint256","bytes","bytes"],[e,s,r,n])}async evaluateRequest(e,r,n,s){var i;const o=Bn.genericCoderFor(s.config.version),{encoded:a}=o.signature.encodeSigners(s.config,(i=s.parts)!=null?i:new Map,[],s.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,s.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const d=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(s.address,s.digest,a,s.chainId),chainId:Z.from(s.chainId).toNumber()}});ne(d.sig).length!==0&&(this.requests.get(e).onSignature(d.sig),this.requests.delete(e))}catch(f){var c;(c=this.onError)==null||c.call(this,f)}}suffix(){return this.appendSuffix?[3]:[]}}const YEe=Object.freeze(Object.defineProperty({__proto__:null,Guard:RH,GuardSigner:QEe,WebRPCSchemaHash:GEe,WebRPCSchemaVersion:HEe,WebRPCVersion:WEe},Symbol.toStringTag,{value:"Module"}));function $b(){return $b=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,s,i)=>{if(this.batchableJsonRpcMethods.find(o=>o===s.method)){this.queue.push({request:s,callback:i,next:n}),this.options.verbose&&console.log("Scheduling call",s.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",s.method),n(s,i)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)return;if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&r.scheduleExecution();const s=a[0].next;let i;var[a,l]=aI(a,h=>{try{if(h.next!==s)return!1;switch(h.request.method){case Ur.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Ur.ethGetBalance:case Ur.ethGetCode:const v=XEe(h.request.params[1]);if(i===void 0&&(i=v),!ZEe(v,i))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(h=>{try{switch(h.request.method){case Ur.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case Ur.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case Ur.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,l]=aI(a,(h,v)=>o[v]!==void 0);if(o=o.filter(h=>h),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let c;try{c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const f=G4(),u=await JEe(H4(s)({id:f,jsonrpc:Qd,method:Ur.ethCall,params:[{to:r.options.contract,value:0,data:c},Z.isBigNumber(i)?i.toNumber():i]}),h=>({jsonrpc:Qd,id:f,result:void 0,error:h}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,v)=>{if(!d[0][v])r.forward(h);else switch(h.request.method){case Ur.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][v]});break;case Ur.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["bytes"],d[1][v])[0]});break;case Ur.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["uint256"],d[1][v])[0]});break}})},this.options=e?$b({},Xs.DefaultOptions,e):Xs.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Xs.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Xs.DefaultOptions=$b({},e5e);const IH=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class t5e extends Bw{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(s){const i=n.provider;if(i.getResolver){const o=await i.getResolver(await s);return o?new J3(n,o.address,o.name):null}return i.getResolver(await s)},this.next=async function(s,i){try{switch(s.method){case Ur.ethCall:n.callback(s,i,await n.provider.call(s.params[0],s.params[1]));break;case Ur.ethGetCode:n.callback(s,i,await n.provider.getCode(s.params[0],s.params[1]));break;case Ur.ethGetBalance:n.callback(s,i,await n.provider.getBalance(s.params[0],s.params[1]));break}}catch(o){n.callback(s,i,void 0,o)}},this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),IH.forEach(s=>{e[s]!==void 0&&(this[s]=(...i)=>e[s](...i))})}callback(e,r,n,s){r(s,{jsonrpc:Qd,id:e.id,result:n,error:s})}async call(e,r){return this.rpcCall(Ur.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Ur.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Ur.ethGetBalance,e,r)}async rpcCall(e,...r){const n=G4();return(await H4(this.multicall.handle)(this.next,{jsonrpc:Qd,id:n,method:e,params:r})).result}}class r5e{constructor(e,r){if(this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),e.send){const n=async function(i,o){e.send(i,o)};this.send=(s,i)=>{this.multicall.handle(n,s,i)}}if(e.sendAsync){const n=async function(i,o){e.sendAsync(i,o)};this.sendAsync=(s,i)=>{this.multicall.handle(n,s,i)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const n5e=t=>e=>{const r=Xs.isMulticall(t)?t:new Xs(t);return(n,s)=>r.handle(e,n,s)};var s5e=Object.freeze({__proto__:null,ProxyMethods:IH,MulticallProvider:t5e,MulticallExternalProvider:r5e,multicallMiddleware:n5e});const i5e=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Xs,providers:s5e},Symbol.toStringTag,{value:"Module"}));var Jd={},o5e={get exports(){return Jd},set exports(t){Jd=t}};/*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,s=Array.isArray?Array.isArray:function(I){return Object.prototype.toString.call(I)==="[object Array]"},i=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(_){var I=Object.getOwnPropertyNames(_);return I.push.apply(I,Object.getOwnPropertySymbols(_)),I}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(_){_&&(this._conf=_,_.delimiter&&(this.delimiter=_.delimiter),_.maxListeners!==r&&(this._maxListeners=_.maxListeners),_.wildcard&&(this.wildcard=_.wildcard),_.newListener&&(this._newListener=_.newListener),_.removeListener&&(this._removeListener=_.removeListener),_.verboseMemoryLeak&&(this.verboseMemoryLeak=_.verboseMemoryLeak),_.ignoreErrors&&(this.ignoreErrors=_.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function v(_,I){var F="(node) warning: possible EventEmitter memory leak detected. "+_+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(F+=" Event name: "+I+"."),typeof process<"u"&&process.emitWarning){var D=new Error(F);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=_,process.emitWarning(D)}else console.error(F),console.trace&&console.trace()}var y=function(_,I,F){var D=arguments.length;switch(D){case 0:return[];case 1:return[_];case 2:return[_,I];case 3:return[_,I,F];default:for(var A=new Array(D);D--;)A[D]=arguments[D];return A}};function g(_,I){for(var F={},D,A=_.length,j=I?I.length:0,G=0;G0;)_=j[q],G.call(O,_,F[_]);this._listeners={},this._listenersCount=0,z()}}});function p(_,I,F,D){var A=Object.assign({},I);if(!_)return A;if(typeof _!="object")throw TypeError("options must be an object");var j=Object.keys(_),G=j.length,O,q,z;function H(X){throw Error('Invalid "'+O+'" option value'+(X?". Reason: "+X:""))}for(var J=0;J0;)if(O===_[q])return j;G(I)}}var k=E(["function"]),$=E(["object","function"]);function x(_,I,F){var D,A,j=0,G,O=new _(function(q,z,H){F=p(F,{timeout:0,overload:!1},{timeout:function(Q,ae){return Q*=1,(typeof Q!="number"||Q<0||!Number.isFinite(Q))&&ae("timeout must be a positive number"),Q}}),D=!F.overload&&typeof _.prototype.cancel=="function"&&typeof H=="function";function J(){A&&(A=null),j&&(clearTimeout(j),j=0)}var X=function(Q){J(),q(Q)},K=function(Q){J(),z(Q)};D?I(X,K,H):(A=[function(Q){K(Q||Error("canceled"))}],I(X,K,function(Q){if(G)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Q!="function")throw TypeError("onCancel callback must be a function");A.push(Q)}),G=!0),F.timeout>0&&(j=setTimeout(function(){var Q=Error("timeout");Q.code="ETIMEDOUT",j=0,O.cancel(Q),z(Q)},F.timeout))});return D||(O.cancel=function(q){if(A){for(var z=A.length,H=1;H0;)K=Ae[O],K!=="_listeners"&&(at=B(_,I,F[K],D+1,A),at&&(X?X.push.apply(X,at):X=at));return X}else if(st==="**"){for(ue=D+1===A||D+2===A&&ke==="*",ue&&F._listeners&&(X=B(_,I,F,A,A)),Ae=u(F),O=Ae.length;O-- >0;)K=Ae[O],K!=="_listeners"&&(K==="*"||K==="**"?(F[K]._listeners&&!ue&&(at=B(_,I,F[K],A,A),at&&(X?X.push.apply(X,at):X=at)),at=B(_,I,F[K],D,A)):K===ke?at=B(_,I,F[K],D+2,A):at=B(_,I,F[K],D,A),at&&(X?X.push.apply(X,at):X=at));return X}else F[st]&&(X=B(_,I,F[st],D+1,A));if(Q=F["*"],Q&&B(_,I,Q,D+1,A),ae=F["**"],ae)if(D0;)K=Ae[O],K!=="_listeners"&&(K===ke?B(_,I,ae[K],D+2,A):K===st?B(_,I,ae[K],D+1,A):(ie={},ie[K]=ae[K],B(_,I,{"**":ie},D+1,A)));else ae._listeners?B(_,I,ae,A,A):ae["*"]&&ae["*"]._listeners&&B(_,I,ae["*"],A,A);return X}function L(_,I,F){var D=0,A=0,j,G=this.delimiter,O=G.length,q;if(typeof _=="string")if((j=_.indexOf(G))!==-1){q=new Array(5);do q[D++]=_.slice(A,j),A=j+O;while((j=_.indexOf(G,A))!==-1);q[D++]=_.slice(A)}else q=[_],D=1;else q=_,D=_.length;if(D>1){for(j=0;j+10&&z._listeners.length>this._maxListeners&&(z._listeners.warned=!0,v.call(this,z._listeners.length,H))):z._listeners=I,!0;return!0}function U(_,I,F,D){for(var A=u(_),j=A.length,G,O,q,z=_._listeners,H;j-- >0;)O=A[j],G=_[O],O==="_listeners"?q=F:q=F?F.concat(O):[O],H=D||typeof O=="symbol",z&&I.push(H?q:q.join(this.delimiter)),typeof G=="object"&&U.call(this,G,I,q,H);return I}function V(_){for(var I=u(_),F=I.length,D,A,j;F-- >0;)A=I[F],D=_[A],D&&(j=!0,A!=="_listeners"&&!V(D)&&delete _[A]);return j}function N(_,I,F){this.emitter=_,this.event=I,this.listener=F}N.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(_,I,F){if(F===!0)A=!0;else if(F===!1)D=!0;else{if(!F||typeof F!="object")throw TypeError("options should be an object or true");var D=F.async,A=F.promisify,j=F.nextTick,G=F.objectify}if(D||j||A){var O=I,q=I._origin||I;if(j&&!o)throw Error("process.nextTick is not supported");A===r&&(A=I.constructor.name==="AsyncFunction"),I=function(){var z=arguments,H=this,J=this.event;return A?j?Promise.resolve():new Promise(function(X){f(X)}).then(function(){return H.event=J,O.apply(H,z)}):(j?process.nextTick:f)(function(){H.event=J,O.apply(H,z)})},I._async=!0,I._origin=q}return[I,G?new N(this,_,I):this]}function S(_){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,_)}S.EventEmitter2=S,S.prototype.listenTo=function(_,I,F){if(typeof _!="object")throw TypeError("target musts be an object");var D=this;F=p(F,{on:r,off:r,reducers:r},{on:k,off:k,reducers:$});function A(j){if(typeof j!="object")throw TypeError("events must be an object");var G=F.reducers,O=T.call(D,_),q;O===-1?q=new b(D,_,F):q=D._observers[O];for(var z=u(j),H=z.length,J,X=typeof G=="function",K=0;K0;)A=F[D],(!_||A._target===_)&&(A.unsubscribe(I),j=!0);return j},S.prototype.delimiter=".",S.prototype.setMaxListeners=function(_){_!==r&&(this._maxListeners=_,this._conf||(this._conf={}),this._conf.maxListeners=_)},S.prototype.getMaxListeners=function(){return this._maxListeners},S.prototype.event="",S.prototype.once=function(_,I,F){return this._once(_,I,!1,F)},S.prototype.prependOnceListener=function(_,I,F){return this._once(_,I,!0,F)},S.prototype._once=function(_,I,F,D){return this._many(_,1,I,F,D)},S.prototype.many=function(_,I,F,D){return this._many(_,I,F,!1,D)},S.prototype.prependMany=function(_,I,F,D){return this._many(_,I,F,!0,D)},S.prototype._many=function(_,I,F,D,A){var j=this;if(typeof F!="function")throw new Error("many only accepts instances of Function");function G(){return--I===0&&j.off(_,G),F.apply(this,arguments)}return G._origin=F,this._on(_,G,D,A)},S.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var _=arguments[0],I,F=this.wildcard,D,A,j,G,O;if(_==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(F&&(I=_,_!=="newListener"&&_!=="removeListener"&&typeof _=="object")){if(A=_.length,a){for(j=0;j3)for(D=new Array(q-1),G=1;G3)for(A=new Array(z-1),O=1;O0&&this._events[_].length>this._maxListeners&&(this._events[_].warned=!0,v.call(this,this._events[_].length,_))):this._events[_]=I,A)},S.prototype.off=function(_,I){if(typeof I!="function")throw new Error("removeListener only takes instances of Function");var F,D=[];if(this.wildcard){var A=typeof _=="string"?_.split(this.delimiter):_.slice();if(D=B.call(this,null,A,this.listenerTree,0),!D)return this}else{if(!this._events[_])return this;F=this._events[_],D.push({_listeners:F})}for(var j=0;j0){for(D=this._all,I=0,F=D.length;I0;)D=I[F[j]],typeof D=="function"?A.push(D):A.push.apply(A,D);return A}else{if(this.wildcard){if(G=this.listenerTree,!G)return[];var O=[],q=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,O,q,G,0),O}return I?(D=I[_],D?typeof D=="function"?[D]:D:[]):[]}},S.prototype.eventNames=function(_){var I=this._events;return this.wildcard?U.call(this,this.listenerTree,[],null,_):I?u(I):[]},S.prototype.listenerCount=function(_){return this.listeners(_).length},S.prototype.hasListeners=function(_){if(this.wildcard){var I=[],F=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,I,F,this.listenerTree,0),I.length>0}var D=this._events,A=this._all;return!!(A&&A.length||D&&(_===r?u(D).length:D[_]))},S.prototype.listenersAny=function(){return this._all?this._all:[]},S.prototype.waitFor=function(_,I){var F=this,D=typeof I;return D==="number"?I={timeout:I}:D==="function"&&(I={filter:I}),I=p(I,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:k,Promise:w}),x(I.Promise,function(A,j,G){function O(){var q=I.filter;if(!(q&&!q.apply(F,arguments)))if(F.off(_,O),I.handleError){var z=arguments[0];z?j(z):A(y.apply(null,arguments).slice(1))}else A(y.apply(null,arguments))}G(function(){F.off(_,O)}),F._on(_,O,!1)},{timeout:I.timeout,overload:I.overload})};function R(_,I,F){F=p(F,{Promise,timeout:0,overload:!1},{Promise:w});var D=F.Promise;return x(D,function(A,j,G){var O;if(typeof _.addEventListener=="function"){O=function(){A(y.apply(null,arguments))},G(function(){_.removeEventListener(I,O)}),_.addEventListener(I,O,{once:!0});return}var q=function(){z&&_.removeListener("error",z),A(y.apply(null,arguments))},z;I!=="error"&&(z=function(H){_.removeListener(I,q),j(H)},_.once("error",z)),G(function(){z&&_.removeListener("error",z),_.removeListener(I,q)}),_.once(I,q)},{timeout:F.timeout,overload:F.overload})}var M=S.prototype;Object.defineProperties(S,{defaultMaxListeners:{get:function(){return M._maxListeners},set:function(_){if(typeof _!="number"||_<0||Number.isNaN(_))throw TypeError("n must be a non-negative number");M._maxListeners=_},enumerable:!0},once:{value:R,writable:!0,configurable:!0}}),Object.defineProperties(M,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return S}):t.exports=S})()})(l5e);function ss(){return ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e++c5e;class R0{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Jd.EventEmitter2,this.sendAsync=async function(r,n,s){e.state===Ws.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},s);try{e.isOpened()||await e.waitUntilOpened();const i=await e.sendMessageRequest({idx:NH(),type:Xe.MESSAGE,data:r,chainId:s});n(void 0,i.data)}catch(i){n(i)}},this.sendMessageRequest=async function(r){return new Promise((n,s)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&s(new Error("message idx not set"));const i=(a,l)=>{if(a)s(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?s(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,i),e.isOpened()?e.sendMessage(r):(xe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=gA){let n=!1;return Promise.race([new Promise((s,i)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Ws.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),i(new Error("opening wallet timed out"))},r)}),new Promise(s=>{if(e.isOpened()){var i;n=!0,s((i=e.openPayload)==null?void 0:i.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,s(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(s=>{if(e.connectPayload){s(e.connectPayload);return}e.events.once("connect",i=>{e.connectPayload=i,s(i)})}),n=new Promise((s,i)=>{e.events.once("close",o=>{i(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Ws.CLOSED,this._registered=!1,this._init=qt.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Ws.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Xe.INIT){xe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){xe.error("invalid init nonce");return}this._init=qt.OK,this.sendMessage({idx:-1,type:Xe.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==qt.OK)return;xe.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Xe.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){xe.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw xe.error(l),this.close(),l}this.state=Ws.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===Xe.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===Xe.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ye(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Xe.CHAIN_CHANGED){this.events.emit("chainChanged",e.data);return}if(e.type===Xe.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Xe.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Xe.CLOSE&&this.state!==Ws.CLOSED&&this.close(e.data),e.type===Xe.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Xe.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Ws.CLOSED&&(this.state=Ws.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,xe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(ss({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function f5e(t){return u5e.some(e=>e.predicate(t))}const u5e=[{name:"Decentraland Exception",predicate:h5e},{name:"0x v3 Exception",predicate:v5e}],d5e=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function h5e(t){try{const e=Ia(t);return d5e.test(e)}catch{return!1}}function v5e(t){const e=new en(y5e);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const y5e=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Vp=xt(`Ethereum Signed Message: -`),LH=t=>Ta(t)||ze(t)?ne(t):xt(t),ex=t=>{const e=LH(t);return f5e(e)?e:Ht([Vp,xt(String(e.length)),e])},m5e=t=>{if(JSON.stringify(t.slice(0,Vp.length))!==JSON.stringify(Vp))return t;const e=t.slice(Vp.length),r=String(e.length).length;let n,s;try{s=Number(Ia(e.slice(0,r)))}catch{s=Number(te(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},Xd=async(t,e,r,n)=>new ye.reader.OnChainReader(n).isValidSignature(t,e,r),jH=async(t,e,r,n)=>{const s=ex(e),i=W4(s);return Xd(t,i,r,n)},FH=(t,e,r,n)=>Xd(t,zw(e),r,n),Ab=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",BH=()=>!!navigator.userAgent.match(/UnitySequence/i),UH=t=>t.onChain.deployed&&t.fullyMigrated;class zH{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class Ny{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Ny.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function _b(){return Ny.isAvailable()?new Ny:new zH}async function VH(t){return Array.isArray(t)?Promise.all(t.map(e=>mt(e))):mt(t)}const lI="@sequence.transportSession";class I0{constructor(e){var r=this;this.sendAsync=async function(n,s,i){throw new Error("abstract method")},this.handleMessage=async function(n){const s=n;if(r._init!==qt.OK){if(s.type===Xe.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case Xe.OPEN:{if(r._init!==qt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case Xe.CLOSE:return r._init!==qt.OK,void 0;case Xe.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:xe.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=rW(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=K4(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Ab()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=sW(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=nW(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){xe.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{_b().setItem(lI,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=_b().getItem(lI);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=qt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(te(n.find(s=>s.isDefaultChain).chainId)))}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:s,error:i}=e;this.sendMessage({idx:-1,type:Xe.OPEN,data:{chainId:r,sessionId:n,session:s,error:i}})}notifyClose(e){this.sendMessage({idx:-1,type:Xe.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Xe.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:Xe.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Xe.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Xe.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:Xe.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Xe.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===qt.OK)return xe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Xe.INIT)return xe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(xe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(xe.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===qt.OK){e();return}if(this._init!==qt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{xe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},gA/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=qt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Xe.INIT,data:{nonce:this._initNonce}}),this._init=qt.SENT_NONCE})}}class p5e{constructor(){const e=new CS,r=new CS;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class CS{constructor(){this.events=new Jd.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class qH extends R0{constructor(e){if(super(),this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,s)=>{if(this.state===Ws.CLOSED){this.state=Ws.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:Xe.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i}})}},this.state=Ws.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=qt.OK}closeWallet(){this.sendMessage({idx:-1,type:Xe.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class g5e extends I0{constructor(e,r){super(e),this.port=r,this._init=qt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function WH(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...s)=>{n.logfromjs(`${t}: ${FE(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${FE(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${FE(s)}`)},window.logsOverriddenForUnreal=!0}}function FE(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let hu;class HH extends R0{constructor(e){super(),this.register=()=>{var r;WH("dapp"),hu&&(hu.unregister(),hu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),hu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),hu===this&&(hu=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new T0;r&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",V4(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r,n;const s=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",s),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(s)}}class b5e extends I0{constructor(e){super(e),this.onMessageFromUnreal=r=>{xe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new T0(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:q4(n.get("intent"))}},this._init=qt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;WH("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){xe.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;xe.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;xe.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Xe.INIT&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}const s=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(s)}}const bA="sequence-extension-message-handler";class w5e extends I0{constructor(e,r){super(e),this.runtime=r,this._init=qt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:bA})}sendMessage(e){xe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class GH extends R0{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===bA&&(this._init=qt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class x5e extends Jd.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;xe.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case Xe.MESSAGE:if(i)this.emit(Xe.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case Xe.DISCONNECT:case Xe.ACCOUNTS_CHANGED:case Xe.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(l,c)=>{if(l)i(l);else if(c)s(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let vu;class KH extends R0{constructor(e){super(),this.register=()=>{vu&&(vu.unregister(),vu=this),window.addEventListener("message",this.onWindowEvent),vu=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),vu===this&&(vu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const i=new URL(this.walletURL.href),o=new T0;r&&r!==""&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Ab()&&!BH()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",V4(n))),s&&o.set("net",`${s}`);let a,l;Ab()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;i.search=o.toString(),this.walletWindow=window.open(i.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){xe.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class C5e extends I0{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let s;try{s=JSON.parse(n.data)}catch{return}if(xe.debug("RECEIVED MESSAGE",s),r._init!==qt.OK&&r.isValidInitAck(s)&&(r.appOrigin=n.origin),r._init===qt.OK&&(!r.appOrigin||r.appOrigin.length<8)){xe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(s)},this.getWindowTransportSession=n=>{const s=new T0(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:q4(s.get("intent"))}},this._init=qt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:s}=new URL(e||window.location.href);let i=this.getWindowTransportSession(s);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){xe.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(i).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}`;xe.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}, due to: ${a}`;xe.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Xe.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):xe.error("unable to postMessage as parentOrigin is invalid")}}function QH(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class tx{constructor(...e){var r=this;this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendAsync=async function(n,s,i){if(r.provider){r.provider.sendAsync(n,s,i);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,s,i;const o=new tx;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new KH(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new qH(e.proxyTransport.appPort);o.add(a)}if((s=e.extensionTransport)!=null&&s.enabled){const a=new GH(e.extensionTransport.runtime);o.add(a)}if((i=e.unrealTransport)!=null&&i.enabled&&e.windowTransport&&e.walletAppURL){const a=new HH(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;nk5e(t,s))}function k5e(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data&&ne(e.data).length>=4)throw new Error("self calls are forbidden");if(e.delegateCall)throw new Error("delegate calls are forbidden")}const $5e=1e4;class A5e{constructor(e,r,n){var s=this;this.signerReadyCallbacks=[],this.events=new Jd.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(i){if(!i&&!s._connectOptions)throw new Error("prompter connect options are empty");if(!s.prompter)return s.connect(i);const o=await s.prompter.promptConnect(i||s._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.sendAsync=async function(i,o,a){const l={jsonrpc:"2.0",id:i.id,result:null};await s.getAccount();try{var c;if((!s.account||s.account===null)&&!_5e.includes(i.method))throw DH;const f=s.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(c=s.account)==null?void 0:c.providerFor(a??s.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof xa?u:void 0;switch(i.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("net_version",[]);l.result=h;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("eth_chainId",[]);l.result=h;break}case"eth_accounts":{const h=f.address;l.result=[h];break}case"eth_getBalance":{const[h,v]=i.params,y=await u.getBalance(h,v);l.result=y.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let h;switch(i.method){case"sequence_sign":case"personal_sign":{const[b,p]=i.params;h=b;break}case"eth_sign":{const[b,p]=i.params;h=p;break}}let v="";const y=ex(h),g=i.method==="sequence_sign";if(s.prompter===null?v=await f.signMessage(y,a??s.defaultChainId(),g?"eip6492":"ignore"):v=await s.prompter.promptSignMessage({chainId:a,message:y,eip6492:g},s.connectOptions),v&&v.length>0)l.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[h,v]=i.params;let y;if(typeof v=="string")try{y=JSON.parse(v)}catch(p){console.warn("walletRequestHandler: error parsing typedData",p)}else y=v;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let g="";const b=i.method==="sequence_signTypedData_v4";if(s.prompter===null?g=await f.signTypedData(y.domain,y.types,y.message,a??s.defaultChainId(),b?"eip6492":"ignore"):g=await s.prompter.promptSignMessage({chainId:a,typedData:y,eip6492:b},s.connectOptions),g&&g.length>0)l.result=g;else throw new Error("declined by user");break}case"eth_sendTransaction":{const h=S5e(i.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));cI(f.address,h);let v="";if(s.prompter===null?v=(await f.sendTransaction(h,a??s.defaultChainId())).hash:v=await s.prompter.promptSendTransaction(h,a,s.connectOptions),v)l.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[h]=i.params;if(Ye(h.from)!==f.address)throw new Error("sender address does not match wallet");cI(f.address,h),s.prompter===null?l.result=await f.signTransactions(h,a??s.defaultChainId()):l.result=await s.prompter.promptSignTransaction(h,a,s.connectOptions);break}case"eth_sendRawTransaction":{if(ye.transaction.isSignedTransactionBundle(i.params[0])){const h=Z.from(i.params[0].chainId).toNumber(),v=await f.relayer(h).relay(i.params[0]);l.result=v.hash}else{const h=await u.sendTransaction(i.params[0]);l.result=h.hash}break}case"eth_getTransactionCount":{const h=Ye(i.params[0]),v=i.params[1],y=await u.getTransactionCount(h,v);l.result=Z.from(y).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(i.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(i.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(i.params[0]);break}case"eth_call":{const[h,v]=i.params;l.result=await u.call(h,v);break}case"eth_getCode":{const[h,v]=i.params;l.result=await u.getCode(h,v);break}case"eth_estimateGas":{const[h]=i.params;l.result=await u.estimateGas(h);break}case"eth_gasPrice":{const h=await u.getGasPrice();l.result=h.toHexString();break}case"wallet_switchEthereumChain":{const[h]=i.params;if(!h.chainId||h.chainId.length===0)throw new Error("invalid chainId");const v=Z.from(h.chainId);s.setDefaultChainId(v.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=f.contexts;break}case"sequence_getWalletConfig":{const[h]=i.params;h?l.result=[(await f.status(h)).onChain.config]:l.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[h]=i.params;h?l.result=[fI(h,await f.status(h))]:l.result=await Promise.all(f.networks.map(async function(v){const y=await f.status(v.chainId);return fI(v.chainId,y)}));break}case"sequence_getNetworks":{l.result=await s.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[h]=i.params;if(!h)throw new Error("invalid request, method argument defaultChainId cannot be empty");s.setDefaultChainId(h),l.result=await s.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send(i.method,i.params);l.result=h}}}catch(f){xe.error(f),l.result=null,l.error=ss({},new Error(f),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:s}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var i;l=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=$5e){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ce.MAINNET,i=K4(s).chainId,o={connected:!0,chainId:Hl(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry};try{o.proof=await AH(this.account,i,a)}catch(l){return xe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=await this.walletSession(i),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,s)=>{const i=ss({},e,{data:s});r(i)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=ss({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(xe.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(s=>ss({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Li(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",te(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){xe.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(s);if(i(o))return!0;if(await e.promptConfirmWalletDeploy(s,this.connectOptions)){const l=await r.status(s);return i(l)?!0:(xe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function fI(t,e){return{context:e.original.context,config:e.onChain.config,address:ye.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const _5e=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class Lh{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!jh.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Lh(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new wA(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await VH(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await yl(async function(){const a=await o.getTransaction(i);return a?o._wrapTransaction(a,i):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=i,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class wA extends Lh{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class P5e{constructor(e){if(this.signer=e,wA.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return Xd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=ex(r),a=W4(o);return Xd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,zw(r),n,s)}}class jh extends Bw{constructor(e,r,n=Kd){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(s=>{this.emit("connect",s)}),e.onDisconnect(s=>{this.emit("disconnect",s)}),e.onDefaultChainIdChanged(s=>{this.emit("chainChanged",s)}),e.onAccountsChanged(s=>{this.emit("accountsChanged",s)}),this.signer=new Lh(this.client,this),this.utils=new P5e(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(ss({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Li(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new JH(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return Hl(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=YH(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const s=await this._getSubprovider(),i=(n=s.prepareRequest(e,r))!=null?n:[e,r];return s.send(i[0],i[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=Li(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return wV(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}jh.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function YH(t){return typeof t=="object"?YH(t.chainId):Z.from(t).toNumber()}class JH extends jh{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=Li(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var T5e={name:"@0xsequence/provider",version:"1.2.1",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--loader tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class af{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(af.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(af.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(af.SESSION_LOCALSTORE_KEY)}}af.SESSION_LOCALSTORE_KEY="@sequence.session";class lf{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(lf.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(lf.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(lf.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}lf.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class xA{constructor(e,r,n){var s;if(this.callbacks={},QH(e))this.transport=tx.new(e);else if(OH(e))this.transport=e;else throw new Error("Invalid transport");const i=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new af(r),this.defaultChainId=new lf(r,i),this.transport.on("accountsChanged",o=>{var a;o.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(a=this.callbacks.accountsChanged)==null||a.forEach(l=>l(o))}),this.transport.on("connect",o=>{var a;const l=Hl(this.getChainId());(a=this.callbacks.connect)==null||a.forEach(c=>c(ss({},o,{chainId:l})))}),this.transport.on("disconnect",o=>{var a;(a=this.callbacks.disconnect)==null||a.forEach(l=>l(o))}),this.transport.on("networks",o=>{var a;(a=this.callbacks.networks)==null||a.forEach(l=>l(o))}),this.transport.on("walletContext",o=>{var a;(a=this.callbacks.walletContext)==null||a.forEach(l=>l(o))}),this.transport.on("open",o=>{var a;(a=this.callbacks.open)==null||a.forEach(l=>l(o))}),this.transport.on("close",()=>{var o;(o=this.callbacks.close)==null||o.forEach(a=>a())}),this.defaultChainId.onDefaultChainIdChanged(o=>{var a;const l=Hl(o);(a=this.callbacks.chainChanged)==null||a.forEach(c=>c(l))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:ss({},e,{networkId:this.getChainId(),clientVersion:T5e.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=Z.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,s)=>{this.transport.sendAsync(e,(i,o)=>{i?s(i):o===void 0?s(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?s(o.error):typeof o=="object"&&o.result?n(o.result):s(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),s=Yr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&Z.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],s=E5e(n);return this.send({method:"eth_sendTransaction",params:[s]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const ES={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let go;const XH=t=>{var e,r,n;if(go)return go;const s=ss({},ES,t,{transports:ss({},ES.transports,t==null?void 0:t.transports)}),i={},o=(e=(r=s.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Kd.find(h=>h.chainId===d.chainId)}))!=null?e:[],a=Kd.map(d=>{var h;const v=(h=s.networks)==null?void 0:h.find(y=>y.chainId===d.chainId);return v?ss({},d,v):d}).concat(o),l=d=>{if(!i[d]){var h;const v=(h=a.find(b=>b.chainId===d))==null?void 0:h.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${d}`);const y=new xa(v),g=new Q4([bW,gW,new Y4],new bb(y));i[d]=new Oq(g,d)}return i[d]},c=s.defaultNetwork?(n=Li(a,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!c&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||_b(),u=new xA(s.transports,f,{defaultChainId:c,defaultEIP6492:s.defaultEIP6492});return go=new jh(u,l),go},ZH=()=>{go&&(go.client.closeWallet(),go.client.transport.unregister(),go=void 0)},eG=()=>{if(!go)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return go},R5e=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:x5e,BaseProviderTransport:R0,BaseWalletTransport:I0,CHANNEL_ID:bA,DefaultChainIdTracker:lf,DefaultProviderConfig:ES,ErrSignedInRequired:DH,EventType:Xe,ExtensionMessageHandler:w5e,ExtensionMessageProvider:GH,InitState:qt,LocalStorage:Ny,MemoryItemStore:zH,MuxMessageProvider:tx,OpenState:Ws,PROVIDER_OPEN_TIMEOUT:gA,ProviderError:MH,ProxyMessageChannel:p5e,ProxyMessageChannelPort:CS,ProxyMessageHandler:g5e,ProxyMessageProvider:qH,SequenceClient:xA,SequenceClientSession:af,SequenceProvider:jh,SequenceSigner:Lh,SingleNetworkSequenceProvider:JH,SingleNetworkSequenceSigner:wA,UnrealMessageHandler:b5e,UnrealMessageProvider:HH,WalletRequestHandler:A5e,WindowMessageHandler:C5e,WindowMessageProvider:KH,WindowSessionParams:T0,getWallet:eG,initWallet:XH,isBrowserExtension:Ab,isMuxTransportTemplate:QH,isProviderTransport:OH,isUnityPlugin:BH,isValidMessageSignature:jH,isValidSignature:Xd,isValidTypedDataSignature:FH,isWalletUpToDate:UH,messageToBytes:LH,nextMessageIdx:NH,prefixEIP191Message:ex,resolveArrayProperties:VH,trimEIP191Prefix:m5e,unregisterWallet:ZH,useBestStore:_b},Symbol.toStringTag,{value:"Module"}));function Rn(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var I5e=Rn({__proto__:null},[hme]),O5e=Rn({__proto__:null},[wme]),M5e=Rn({__proto__:null},[HEe]),D5e=Rn({__proto__:null},[XEe]),N5e=Rn({__proto__:null},[eEe]),L5e=Rn({__proto__:null},[cEe]),j5e=Rn({__proto__:null},[a5e]),F5e=Rn({__proto__:null},[kxe]),B5e=Rn({__proto__:null},[R5e]),U5e=Rn({__proto__:null},[DCe]);const z5e=ye.transaction;var V5e=Object.freeze({__proto__:null,transactions:z5e}),q5e=Rn({__proto__:null,isValidSignature:Xd,isValidMessageSignature:jH,isValidTypedDataSignature:FH,isWalletUpToDate:UH},[fxe]),W5e=Rn({__proto__:null},[vCe]),H5e=Rn({__proto__:null},[LCe]),G5e=Rn({__proto__:null},[VEe]),K5e=Rn({__proto__:null},[wCe]),Q5e=Rn({__proto__:null},[qCe]),tG=Object.freeze({__proto__:null,abi:I5e,api:O5e,auth:M5e,guard:D5e,indexer:N5e,metadata:L5e,multicall:j5e,network:F5e,provider:B5e,relayer:U5e,transactions:V5e,utils:q5e,core:W5e,signhub:H5e,sessions:G5e,migration:K5e,account:Q5e,initWallet:XH,getWallet:eG,unregisterWallet:ZH,SequenceProvider:jh,SequenceClient:xA,SequenceSigner:Lh}),qp,Y5e=class extends qz{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(i){if(i!=null&&i.isMetaMask&&!(i.isBraveWallet&&!i._events&&!i._state)&&!i.isApexWallet&&!i.isAvalanche&&!i.isBitKeep&&!i.isBlockWallet&&!i.isMathWallet&&!(i.isOkxWallet||i.isOKExWallet)&&!(i.isOneInchIOSWallet||i.isOneInchAndroidWallet)&&!i.isOpera&&!i.isPortal&&!i.isRabby&&!i.isDefiant&&!i.isTokenPocket&&!i.isTokenary&&!i.isZerion)return i}if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers.find(n):n(s)},...e};super({chains:t,options:r}),ar(this,"id","metaMask"),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ps(this,qp,void 0),pw(this,qp,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,s;try{const i=await this.getProvider();if(!i)throw new sl;i.on&&(i.on("accountsChanged",this.onAccountsChanged),i.on("chainChanged",this.onChainChanged),i.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(er(this,qp)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(f){if(this.isUserRejectedRequestError(f))throw new Sn(f);if(f.code===new zl(f).code)throw f}if(!o){const c=await i.request({method:"eth_requestAccounts"});o=Tl(c[0])}let a=await this.getChainId(),l=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,l=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((s=this.storage)==null||s.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:l},provider:i}}catch(i){throw this.isUserRejectedRequestError(i)?new Sn(i):i.code===-32002?new zl(i):i}}};qp=new WeakMap;var CA={},rx={},qe={},rG={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,l){var c=a>>>16&65535,f=a&65535,u=l>>>16&65535,d=l&65535;return f*d+(c*d+f*u<<16>>>0)|0}t.mul=Math.imul||e;function r(a,l){return a+l|0}t.add=r;function n(a,l){return a-l|0}t.sub=n;function s(a,l){return a<>>32-l}t.rotl=s;function i(a,l){return a<<32-l|a>>>l}t.rotr=i;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(a){return t.isInteger(a)&&a>=-t.MAX_SAFE_INTEGER&&a<=t.MAX_SAFE_INTEGER}})(rG);Object.defineProperty(qe,"__esModule",{value:!0});var nG=rG;function J5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}qe.readInt16BE=J5e;function X5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}qe.readUint16BE=X5e;function Z5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}qe.readInt16LE=Z5e;function e6e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}qe.readUint16LE=e6e;function sG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}qe.writeUint16BE=sG;qe.writeInt16BE=sG;function iG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}qe.writeUint16LE=iG;qe.writeInt16LE=iG;function SS(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}qe.readInt32BE=SS;function kS(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}qe.readUint32BE=kS;function $S(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}qe.readInt32LE=$S;function AS(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}qe.readUint32LE=AS;function Pb(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}qe.writeUint32BE=Pb;qe.writeInt32BE=Pb;function Tb(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}qe.writeUint32LE=Tb;qe.writeInt32LE=Tb;function t6e(t,e){e===void 0&&(e=0);var r=SS(t,e),n=SS(t,e+4);return r*4294967296+n-(n>>31)*4294967296}qe.readInt64BE=t6e;function r6e(t,e){e===void 0&&(e=0);var r=kS(t,e),n=kS(t,e+4);return r*4294967296+n}qe.readUint64BE=r6e;function n6e(t,e){e===void 0&&(e=0);var r=$S(t,e),n=$S(t,e+4);return n*4294967296+r-(r>>31)*4294967296}qe.readInt64LE=n6e;function s6e(t,e){e===void 0&&(e=0);var r=AS(t,e),n=AS(t,e+4);return n*4294967296+r}qe.readUint64LE=s6e;function oG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Pb(t/4294967296>>>0,e,r),Pb(t>>>0,e,r+4),e}qe.writeUint64BE=oG;qe.writeInt64BE=oG;function aG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Tb(t>>>0,e,r),Tb(t/4294967296>>>0,e,r+4),e}qe.writeUint64LE=aG;qe.writeInt64LE=aG;function i6e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,s=1,i=t/8+r-1;i>=r;i--)n+=e[i]*s,s*=256;return n}qe.readUintBE=i6e;function o6e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,s=1,i=r;i=n;i--)r[i]=e/s&255,s*=256;return r}qe.writeUintBE=a6e;function l6e(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!nG.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,i=n;i>>32-16|S<<16,U=U+S|0,x^=U,x=x>>>32-12|x<<12,E=E+T|0,R^=E,R=R>>>32-16|R<<16,V=V+R|0,T^=V,T=T>>>32-12|T<<12,k=k+B|0,M^=k,M=M>>>32-16|M<<16,N=N+M|0,B^=N,B=B>>>32-12|B<<12,$=$+L|0,_^=$,_=_>>>32-16|_<<16,C=C+_|0,L^=C,L=L>>>32-12|L<<12,k=k+B|0,M^=k,M=M>>>32-8|M<<8,N=N+M|0,B^=N,B=B>>>32-7|B<<7,$=$+L|0,_^=$,_=_>>>32-8|_<<8,C=C+_|0,L^=C,L=L>>>32-7|L<<7,E=E+T|0,R^=E,R=R>>>32-8|R<<8,V=V+R|0,T^=V,T=T>>>32-7|T<<7,w=w+x|0,S^=w,S=S>>>32-8|S<<8,U=U+S|0,x^=U,x=x>>>32-7|x<<7,w=w+T|0,_^=w,_=_>>>32-16|_<<16,N=N+_|0,T^=N,T=T>>>32-12|T<<12,E=E+B|0,S^=E,S=S>>>32-16|S<<16,C=C+S|0,B^=C,B=B>>>32-12|B<<12,k=k+L|0,R^=k,R=R>>>32-16|R<<16,U=U+R|0,L^=U,L=L>>>32-12|L<<12,$=$+x|0,M^=$,M=M>>>32-16|M<<16,V=V+M|0,x^=V,x=x>>>32-12|x<<12,k=k+L|0,R^=k,R=R>>>32-8|R<<8,U=U+R|0,L^=U,L=L>>>32-7|L<<7,$=$+x|0,M^=$,M=M>>>32-8|M<<8,V=V+M|0,x^=V,x=x>>>32-7|x<<7,E=E+B|0,S^=E,S=S>>>32-8|S<<8,C=C+S|0,B^=C,B=B>>>32-7|B<<7,w=w+T|0,_^=w,_=_>>>32-8|_<<8,N=N+_|0,T^=N,T=T>>>32-7|T<<7;pn.writeUint32LE(w+n|0,t,0),pn.writeUint32LE(E+s|0,t,4),pn.writeUint32LE(k+i|0,t,8),pn.writeUint32LE($+o|0,t,12),pn.writeUint32LE(x+a|0,t,16),pn.writeUint32LE(T+l|0,t,20),pn.writeUint32LE(B+c|0,t,24),pn.writeUint32LE(L+f|0,t,28),pn.writeUint32LE(U+u|0,t,32),pn.writeUint32LE(V+d|0,t,36),pn.writeUint32LE(N+h|0,t,40),pn.writeUint32LE(C+v|0,t,44),pn.writeUint32LE(S+y|0,t,48),pn.writeUint32LE(R+g|0,t,52),pn.writeUint32LE(M+b|0,t,56),pn.writeUint32LE(_+p|0,t,60)}function lG(t,e,r,n,s){if(s===void 0&&(s=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var cG={},hc={};Object.defineProperty(hc,"__esModule",{value:!0});function C6e(t,e,r){return~(t-1)&e|t-1&r}hc.select=C6e;function E6e(t,e){return(t|0)-(e|0)-1>>>31&1}hc.lessOrEqual=E6e;function fG(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}hc.compare=fG;function S6e(t,e){return t.length===0||e.length===0?!1:fG(t,e)!==0}hc.equal=S6e;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hc,r=Gi;t.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=a[0]|a[1]<<8;this._r[0]=l&8191;var c=a[2]|a[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var f=a[4]|a[5]<<8;this._r[2]=(c>>>10|f<<6)&7939;var u=a[6]|a[7]<<8;this._r[3]=(f>>>7|u<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(u>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var h=a[10]|a[11]<<8;this._r[6]=(d>>>14|h<<2)&8191;var v=a[12]|a[13]<<8;this._r[7]=(h>>>11|v<<5)&8065;var y=a[14]|a[15]<<8;this._r[8]=(v>>>8|y<<8)&8191,this._r[9]=y>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,l,c){for(var f=this._fin?0:2048,u=this._h[0],d=this._h[1],h=this._h[2],v=this._h[3],y=this._h[4],g=this._h[5],b=this._h[6],p=this._h[7],w=this._h[8],E=this._h[9],k=this._r[0],$=this._r[1],x=this._r[2],T=this._r[3],B=this._r[4],L=this._r[5],U=this._r[6],V=this._r[7],N=this._r[8],C=this._r[9];c>=16;){var S=a[l+0]|a[l+1]<<8;u+=S&8191;var R=a[l+2]|a[l+3]<<8;d+=(S>>>13|R<<3)&8191;var M=a[l+4]|a[l+5]<<8;h+=(R>>>10|M<<6)&8191;var _=a[l+6]|a[l+7]<<8;v+=(M>>>7|_<<9)&8191;var I=a[l+8]|a[l+9]<<8;y+=(_>>>4|I<<12)&8191,g+=I>>>1&8191;var F=a[l+10]|a[l+11]<<8;b+=(I>>>14|F<<2)&8191;var D=a[l+12]|a[l+13]<<8;p+=(F>>>11|D<<5)&8191;var A=a[l+14]|a[l+15]<<8;w+=(D>>>8|A<<8)&8191,E+=A>>>5|f;var j=0,G=j;G+=u*k,G+=d*(5*C),G+=h*(5*N),G+=v*(5*V),G+=y*(5*U),j=G>>>13,G&=8191,G+=g*(5*L),G+=b*(5*B),G+=p*(5*T),G+=w*(5*x),G+=E*(5*$),j+=G>>>13,G&=8191;var O=j;O+=u*$,O+=d*k,O+=h*(5*C),O+=v*(5*N),O+=y*(5*V),j=O>>>13,O&=8191,O+=g*(5*U),O+=b*(5*L),O+=p*(5*B),O+=w*(5*T),O+=E*(5*x),j+=O>>>13,O&=8191;var q=j;q+=u*x,q+=d*$,q+=h*k,q+=v*(5*C),q+=y*(5*N),j=q>>>13,q&=8191,q+=g*(5*V),q+=b*(5*U),q+=p*(5*L),q+=w*(5*B),q+=E*(5*T),j+=q>>>13,q&=8191;var z=j;z+=u*T,z+=d*x,z+=h*$,z+=v*k,z+=y*(5*C),j=z>>>13,z&=8191,z+=g*(5*N),z+=b*(5*V),z+=p*(5*U),z+=w*(5*L),z+=E*(5*B),j+=z>>>13,z&=8191;var H=j;H+=u*B,H+=d*T,H+=h*x,H+=v*$,H+=y*k,j=H>>>13,H&=8191,H+=g*(5*C),H+=b*(5*N),H+=p*(5*V),H+=w*(5*U),H+=E*(5*L),j+=H>>>13,H&=8191;var J=j;J+=u*L,J+=d*B,J+=h*T,J+=v*x,J+=y*$,j=J>>>13,J&=8191,J+=g*k,J+=b*(5*C),J+=p*(5*N),J+=w*(5*V),J+=E*(5*U),j+=J>>>13,J&=8191;var X=j;X+=u*U,X+=d*L,X+=h*B,X+=v*T,X+=y*x,j=X>>>13,X&=8191,X+=g*$,X+=b*k,X+=p*(5*C),X+=w*(5*N),X+=E*(5*V),j+=X>>>13,X&=8191;var K=j;K+=u*V,K+=d*U,K+=h*L,K+=v*B,K+=y*T,j=K>>>13,K&=8191,K+=g*x,K+=b*$,K+=p*k,K+=w*(5*C),K+=E*(5*N),j+=K>>>13,K&=8191;var Q=j;Q+=u*N,Q+=d*V,Q+=h*U,Q+=v*L,Q+=y*B,j=Q>>>13,Q&=8191,Q+=g*T,Q+=b*x,Q+=p*$,Q+=w*k,Q+=E*(5*C),j+=Q>>>13,Q&=8191;var ae=j;ae+=u*C,ae+=d*N,ae+=h*V,ae+=v*U,ae+=y*L,j=ae>>>13,ae&=8191,ae+=g*B,ae+=b*T,ae+=p*x,ae+=w*$,ae+=E*k,j+=ae>>>13,ae&=8191,j=(j<<2)+j|0,j=j+G|0,G=j&8191,j=j>>>13,O+=j,u=G,d=O,h=q,v=z,y=H,g=J,b=X,p=K,w=Q,E=ae,l+=16,c-=16}this._h[0]=u,this._h[1]=d,this._h[2]=h,this._h[3]=v,this._h[4]=y,this._h[5]=g,this._h[6]=b,this._h[7]=p,this._h[8]=w,this._h[9]=E},o.prototype.finish=function(a,l){l===void 0&&(l=0);var c=new Uint16Array(10),f,u,d,h;if(this._leftover){for(h=this._leftover,this._buffer[h++]=1;h<16;h++)this._buffer[h]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=f,f=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,c[0]=this._h[0]+5,f=c[0]>>>13,c[0]&=8191,h=1;h<10;h++)c[h]=this._h[h]+f,f=c[h]>>>13,c[h]&=8191;for(c[9]-=1<<13,u=(f^1)-1,h=0;h<10;h++)c[h]&=u;for(u=~u,h=0;h<10;h++)this._h[h]=this._h[h]&u|c[h];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,h=1;h<8;h++)d=(this._h[h]+this._pad[h]|0)+(d>>>16)|0,this._h[h]=d&65535;return a[l+0]=this._h[0]>>>0,a[l+1]=this._h[0]>>>8,a[l+2]=this._h[1]>>>0,a[l+3]=this._h[1]>>>8,a[l+4]=this._h[2]>>>0,a[l+5]=this._h[2]>>>8,a[l+6]=this._h[3]>>>0,a[l+7]=this._h[3]>>>8,a[l+8]=this._h[4]>>>0,a[l+9]=this._h[4]>>>8,a[l+10]=this._h[5]>>>0,a[l+11]=this._h[5]>>>8,a[l+12]=this._h[6]>>>0,a[l+13]=this._h[6]>>>8,a[l+14]=this._h[7]>>>0,a[l+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var l=0,c=a.length,f;if(this._leftover){f=16-this._leftover,f>c&&(f=c);for(var u=0;u=16&&(f=c-c%16,this._blocks(a,l,f),l+=f,c-=f),c){for(var u=0;u16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(c,h.length-c.length);var v=new Uint8Array(32);e.stream(this._key,h,v,4);var y=f.length+this.tagLength,g;if(d){if(d.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(y);return e.streamXOR(this._key,h,f,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),v,g.subarray(0,g.length-this.tagLength),u),n.wipe(h),g},l.prototype.open=function(c,f,u,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&h.update(o.subarray(d.length%16))),h.update(u),u.length%16>0&&h.update(o.subarray(u.length%16));var v=new Uint8Array(8);d&&s.writeUint64LE(d.length,v),h.update(v),s.writeUint64LE(u.length,v),h.update(v);for(var y=h.digest(),g=0;gthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var s=0;s1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n256)throw new Error("randomString charset is too long");let d="";const h=f.length,v=256-256%h;for(;c>0;){const y=s(Math.ceil(c*256/v),u);for(let g=0;g0;g++){const b=y[g];b0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(f=i(this._temp,this._state,l,f,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[f++],c--;return this},a.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,f=this._bufferLength,u=c/536870912|0,d=c<<3,h=c%64<56?64:128;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();t.SHA256=n;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(a,l,c,f,u){for(;u>=64;){for(var d=l[0],h=l[1],v=l[2],y=l[3],g=l[4],b=l[5],p=l[6],w=l[7],E=0;E<16;E++){var k=f+E*4;a[E]=e.readUint32BE(c,k)}for(var E=16;E<64;E++){var $=a[E-2],x=($>>>17|$<<32-17)^($>>>19|$<<32-19)^$>>>10;$=a[E-15];var T=($>>>7|$<<32-7)^($>>>18|$<<32-18)^$>>>3;a[E]=(x+a[E-7]|0)+(T+a[E-16]|0)}for(var E=0;E<64;E++){var x=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&p)|0)+(w+(s[E]+a[E]|0)|0)|0,T=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&v^h&v)|0;w=p,p=b,b=g,g=y+x|0,y=v,v=h,h=d,d=x+T|0}l[0]+=d,l[1]+=h,l[2]+=v,l[3]+=y,l[4]+=g,l[5]+=b,l[6]+=p,l[7]+=w,f+=64,u-=64}return f}function o(a){var l=new n;l.update(a);var c=l.digest();return l.clean(),c}t.hash=o})(ax);var SA={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=nx,r=Gi;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(E){const k=new Float64Array(16);if(E)for(let $=0;$>16&1),$[L-1]&=65535;$[15]=x[15]-32767-($[14]>>16&1);const B=$[15]>>16&1;$[14]&=65535,a(x,$,1-B)}for(let T=0;T<16;T++)E[2*T]=x[T]&255,E[2*T+1]=x[T]>>8}function c(E,k){for(let $=0;$<16;$++)E[$]=k[2*$]+(k[2*$+1]<<8);E[15]&=32767}function f(E,k,$){for(let x=0;x<16;x++)E[x]=k[x]+$[x]}function u(E,k,$){for(let x=0;x<16;x++)E[x]=k[x]-$[x]}function d(E,k,$){let x,T,B=0,L=0,U=0,V=0,N=0,C=0,S=0,R=0,M=0,_=0,I=0,F=0,D=0,A=0,j=0,G=0,O=0,q=0,z=0,H=0,J=0,X=0,K=0,Q=0,ae=0,ie=0,ue=0,st=0,ke=0,Ae=0,at=0,me=$[0],Re=$[1],Qt=$[2],Ie=$[3],Oe=$[4],Yt=$[5],Me=$[6],De=$[7],Jt=$[8],Ne=$[9],Le=$[10],Xt=$[11],je=$[12],Fe=$[13],Zt=$[14],Be=$[15];x=k[0],B+=x*me,L+=x*Re,U+=x*Qt,V+=x*Ie,N+=x*Oe,C+=x*Yt,S+=x*Me,R+=x*De,M+=x*Jt,_+=x*Ne,I+=x*Le,F+=x*Xt,D+=x*je,A+=x*Fe,j+=x*Zt,G+=x*Be,x=k[1],L+=x*me,U+=x*Re,V+=x*Qt,N+=x*Ie,C+=x*Oe,S+=x*Yt,R+=x*Me,M+=x*De,_+=x*Jt,I+=x*Ne,F+=x*Le,D+=x*Xt,A+=x*je,j+=x*Fe,G+=x*Zt,O+=x*Be,x=k[2],U+=x*me,V+=x*Re,N+=x*Qt,C+=x*Ie,S+=x*Oe,R+=x*Yt,M+=x*Me,_+=x*De,I+=x*Jt,F+=x*Ne,D+=x*Le,A+=x*Xt,j+=x*je,G+=x*Fe,O+=x*Zt,q+=x*Be,x=k[3],V+=x*me,N+=x*Re,C+=x*Qt,S+=x*Ie,R+=x*Oe,M+=x*Yt,_+=x*Me,I+=x*De,F+=x*Jt,D+=x*Ne,A+=x*Le,j+=x*Xt,G+=x*je,O+=x*Fe,q+=x*Zt,z+=x*Be,x=k[4],N+=x*me,C+=x*Re,S+=x*Qt,R+=x*Ie,M+=x*Oe,_+=x*Yt,I+=x*Me,F+=x*De,D+=x*Jt,A+=x*Ne,j+=x*Le,G+=x*Xt,O+=x*je,q+=x*Fe,z+=x*Zt,H+=x*Be,x=k[5],C+=x*me,S+=x*Re,R+=x*Qt,M+=x*Ie,_+=x*Oe,I+=x*Yt,F+=x*Me,D+=x*De,A+=x*Jt,j+=x*Ne,G+=x*Le,O+=x*Xt,q+=x*je,z+=x*Fe,H+=x*Zt,J+=x*Be,x=k[6],S+=x*me,R+=x*Re,M+=x*Qt,_+=x*Ie,I+=x*Oe,F+=x*Yt,D+=x*Me,A+=x*De,j+=x*Jt,G+=x*Ne,O+=x*Le,q+=x*Xt,z+=x*je,H+=x*Fe,J+=x*Zt,X+=x*Be,x=k[7],R+=x*me,M+=x*Re,_+=x*Qt,I+=x*Ie,F+=x*Oe,D+=x*Yt,A+=x*Me,j+=x*De,G+=x*Jt,O+=x*Ne,q+=x*Le,z+=x*Xt,H+=x*je,J+=x*Fe,X+=x*Zt,K+=x*Be,x=k[8],M+=x*me,_+=x*Re,I+=x*Qt,F+=x*Ie,D+=x*Oe,A+=x*Yt,j+=x*Me,G+=x*De,O+=x*Jt,q+=x*Ne,z+=x*Le,H+=x*Xt,J+=x*je,X+=x*Fe,K+=x*Zt,Q+=x*Be,x=k[9],_+=x*me,I+=x*Re,F+=x*Qt,D+=x*Ie,A+=x*Oe,j+=x*Yt,G+=x*Me,O+=x*De,q+=x*Jt,z+=x*Ne,H+=x*Le,J+=x*Xt,X+=x*je,K+=x*Fe,Q+=x*Zt,ae+=x*Be,x=k[10],I+=x*me,F+=x*Re,D+=x*Qt,A+=x*Ie,j+=x*Oe,G+=x*Yt,O+=x*Me,q+=x*De,z+=x*Jt,H+=x*Ne,J+=x*Le,X+=x*Xt,K+=x*je,Q+=x*Fe,ae+=x*Zt,ie+=x*Be,x=k[11],F+=x*me,D+=x*Re,A+=x*Qt,j+=x*Ie,G+=x*Oe,O+=x*Yt,q+=x*Me,z+=x*De,H+=x*Jt,J+=x*Ne,X+=x*Le,K+=x*Xt,Q+=x*je,ae+=x*Fe,ie+=x*Zt,ue+=x*Be,x=k[12],D+=x*me,A+=x*Re,j+=x*Qt,G+=x*Ie,O+=x*Oe,q+=x*Yt,z+=x*Me,H+=x*De,J+=x*Jt,X+=x*Ne,K+=x*Le,Q+=x*Xt,ae+=x*je,ie+=x*Fe,ue+=x*Zt,st+=x*Be,x=k[13],A+=x*me,j+=x*Re,G+=x*Qt,O+=x*Ie,q+=x*Oe,z+=x*Yt,H+=x*Me,J+=x*De,X+=x*Jt,K+=x*Ne,Q+=x*Le,ae+=x*Xt,ie+=x*je,ue+=x*Fe,st+=x*Zt,ke+=x*Be,x=k[14],j+=x*me,G+=x*Re,O+=x*Qt,q+=x*Ie,z+=x*Oe,H+=x*Yt,J+=x*Me,X+=x*De,K+=x*Jt,Q+=x*Ne,ae+=x*Le,ie+=x*Xt,ue+=x*je,st+=x*Fe,ke+=x*Zt,Ae+=x*Be,x=k[15],G+=x*me,O+=x*Re,q+=x*Qt,z+=x*Ie,H+=x*Oe,J+=x*Yt,X+=x*Me,K+=x*De,Q+=x*Jt,ae+=x*Ne,ie+=x*Le,ue+=x*Xt,st+=x*je,ke+=x*Fe,Ae+=x*Zt,at+=x*Be,B+=38*O,L+=38*q,U+=38*z,V+=38*H,N+=38*J,C+=38*X,S+=38*K,R+=38*Q,M+=38*ae,_+=38*ie,I+=38*ue,F+=38*st,D+=38*ke,A+=38*Ae,j+=38*at,T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=A+T+65535,T=Math.floor(x/65536),A=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=A+T+65535,T=Math.floor(x/65536),A=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),E[0]=B,E[1]=L,E[2]=U,E[3]=V,E[4]=N,E[5]=C,E[6]=S,E[7]=R,E[8]=M,E[9]=_,E[10]=I,E[11]=F,E[12]=D,E[13]=A,E[14]=j,E[15]=G}function h(E,k){d(E,k,k)}function v(E,k){const $=n();for(let x=0;x<16;x++)$[x]=k[x];for(let x=253;x>=0;x--)h($,$),x!==2&&x!==4&&d($,$,k);for(let x=0;x<16;x++)E[x]=$[x]}function y(E,k){const $=new Uint8Array(32),x=new Float64Array(80),T=n(),B=n(),L=n(),U=n(),V=n(),N=n();for(let M=0;M<31;M++)$[M]=E[M];$[31]=E[31]&127|64,$[0]&=248,c(x,k);for(let M=0;M<16;M++)B[M]=x[M];T[0]=U[0]=1;for(let M=254;M>=0;--M){const _=$[M>>>3]>>>(M&7)&1;a(T,B,_),a(L,U,_),f(V,T,L),u(T,T,L),f(L,B,U),u(B,B,U),h(U,V),h(N,T),d(T,L,T),d(L,B,V),f(V,T,L),u(T,T,L),h(B,T),u(L,U,N),d(T,L,i),f(T,T,U),d(L,L,T),d(T,U,N),d(U,B,x),h(B,V),a(T,B,_),a(L,U,_)}for(let M=0;M<16;M++)x[M+16]=T[M],x[M+32]=L[M],x[M+48]=B[M],x[M+64]=U[M];const C=x.subarray(32),S=x.subarray(16);v(C,C),d(S,S,C);const R=new Uint8Array(32);return l(R,S),R}t.scalarMult=y;function g(E){return y(E,s)}t.scalarMultBase=g;function b(E){if(E.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const k=new Uint8Array(E);return{publicKey:g(k),secretKey:k}}t.generateKeyPairFromSeed=b;function p(E){const k=(0,e.randomBytes)(32,E),$=b(k);return(0,r.wipe)(k),$}t.generateKeyPair=p;function w(E,k,$=!1){if(E.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(k.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const x=y(E,k);if($){let T=0;for(let B=0;Bs+i.length,0));const r=hG(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return kA(r)}function j6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,E=new Uint8Array(w);b!==p;){for(var k=v[b],$=0,x=w-1;(k!==0||$>>0,E[x]=k%a>>>0,k=k/a>>>0;if(k!==0)throw new Error("Non-zero carry");g=$,b++}for(var T=w-g;T!==w&&E[T]===0;)T++;for(var B=l.repeat(y);T>>0,w=new Uint8Array(p);v[y];){var E=r[v.charCodeAt(y)];if(E===255)return;for(var k=0,$=p-1;(E!==0||k>>0,w[$]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");b=k,y++}if(v[y]!==" "){for(var x=p-b;x!==p&&w[x]===0;)x++;for(var T=new Uint8Array(g+(p-x)),B=g;x!==p;)T[B++]=w[x++];return T}}}function h(v){var y=d(v);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:u,decodeUnsafe:d,decode:h}}var F6e=j6e,B6e=F6e;const U6e=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},z6e=t=>new TextEncoder().encode(t),V6e=t=>new TextDecoder().decode(t);class q6e{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class W6e{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return vG(this,e)}}class H6e{constructor(e){this.decoders=e}or(e){return vG(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const vG=(t,e)=>new H6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class G6e{constructor(e,r,n,s){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=s,this.encoder=new q6e(e,r,n),this.decoder=new W6e(e,r,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const lx=({name:t,prefix:e,encode:r,decode:n})=>new G6e(t,e,r,n),M0=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:s}=B6e(r,e);return lx({prefix:t,name:e,encode:n,decode:i=>U6e(s(i))})},K6e=(t,e,r,n)=>{const s={};for(let f=0;f=8&&(a-=8,o[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},Q6e=(t,e,r)=>{const n=e[e.length-1]==="=",s=(1<r;)o-=r,i+=e[s&a>>o];if(o&&(i+=e[s&a<lx({prefix:e,name:t,encode(s){return Q6e(s,n,r)},decode(s){return K6e(s,n,r,t)}}),Y6e=lx({prefix:"\0",name:"identity",encode:t=>V6e(t),decode:t=>z6e(t)}),J6e=Object.freeze(Object.defineProperty({__proto__:null,identity:Y6e},Symbol.toStringTag,{value:"Module"})),X6e=vn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Z6e=Object.freeze(Object.defineProperty({__proto__:null,base2:X6e},Symbol.toStringTag,{value:"Module"})),e3e=vn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),t3e=Object.freeze(Object.defineProperty({__proto__:null,base8:e3e},Symbol.toStringTag,{value:"Module"})),r3e=M0({prefix:"9",name:"base10",alphabet:"0123456789"}),n3e=Object.freeze(Object.defineProperty({__proto__:null,base10:r3e},Symbol.toStringTag,{value:"Module"})),s3e=vn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),i3e=vn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),o3e=Object.freeze(Object.defineProperty({__proto__:null,base16:s3e,base16upper:i3e},Symbol.toStringTag,{value:"Module"})),a3e=vn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),l3e=vn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),c3e=vn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),f3e=vn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u3e=vn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),d3e=vn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),h3e=vn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),v3e=vn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),y3e=vn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),m3e=Object.freeze(Object.defineProperty({__proto__:null,base32:a3e,base32hex:u3e,base32hexpad:h3e,base32hexpadupper:v3e,base32hexupper:d3e,base32pad:c3e,base32padupper:f3e,base32upper:l3e,base32z:y3e},Symbol.toStringTag,{value:"Module"})),p3e=M0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),g3e=M0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),b3e=Object.freeze(Object.defineProperty({__proto__:null,base36:p3e,base36upper:g3e},Symbol.toStringTag,{value:"Module"})),w3e=M0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),x3e=M0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),C3e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:w3e,base58flickr:x3e},Symbol.toStringTag,{value:"Module"})),E3e=vn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),S3e=vn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),k3e=vn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$3e=vn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),A3e=Object.freeze(Object.defineProperty({__proto__:null,base64:E3e,base64pad:S3e,base64url:k3e,base64urlpad:$3e},Symbol.toStringTag,{value:"Module"})),yG=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),_3e=yG.reduce((t,e,r)=>(t[r]=e,t),[]),P3e=yG.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function T3e(t){return t.reduce((e,r)=>(e+=_3e[r],e),"")}function R3e(t){const e=[];for(const r of t){const n=P3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const I3e=lx({prefix:"🚀",name:"base256emoji",encode:T3e,decode:R3e}),O3e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:I3e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const yI={...J6e,...Z6e,...t3e,...n3e,...o3e,...m3e,...b3e,...C3e,...A3e,...O3e};function mG(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const mI=mG("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),BE=mG("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=hG(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new j3e:typeof navigator<"u"?wI(navigator.userAgent):W3e()}function V3e(t){return t!==""&&U3e.reduce(function(e,r){var n=r[0],s=r[1];if(e)return e;var i=s.exec(t);return!!i&&[n,i]},!1)}function wI(t){var e=V3e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new L3e;var s=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);s?s.length0;)_=j[q],G.call(O,_,F[_]);this._listeners={},this._listenersCount=0,z()}}});function p(_,I,F,D){var $=Object.assign({},I);if(!_)return $;if(typeof _!="object")throw TypeError("options must be an object");var j=Object.keys(_),G=j.length,O,q,z;function H(X){throw Error('Invalid "'+O+'" option value'+(X?". Reason: "+X:""))}for(var J=0;J0;)if(O===_[q])return j;G(I)}}var k=E(["function"]),A=E(["object","function"]);function x(_,I,F){var D,$,j=0,G,O=new _(function(q,z,H){F=p(F,{timeout:0,overload:!1},{timeout:function(Q,ae){return Q*=1,(typeof Q!="number"||Q<0||!Number.isFinite(Q))&&ae("timeout must be a positive number"),Q}}),D=!F.overload&&typeof _.prototype.cancel=="function"&&typeof H=="function";function J(){$&&($=null),j&&(clearTimeout(j),j=0)}var X=function(Q){J(),q(Q)},K=function(Q){J(),z(Q)};D?I(X,K,H):($=[function(Q){K(Q||Error("canceled"))}],I(X,K,function(Q){if(G)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Q!="function")throw TypeError("onCancel callback must be a function");$.push(Q)}),G=!0),F.timeout>0&&(j=setTimeout(function(){var Q=Error("timeout");Q.code="ETIMEDOUT",j=0,O.cancel(Q),z(Q)},F.timeout))});return D||(O.cancel=function(q){if($){for(var z=$.length,H=1;H0;)K=Ae[O],K!=="_listeners"&&(at=B(_,I,F[K],D+1,$),at&&(X?X.push.apply(X,at):X=at));return X}else if(nt==="**"){for(ue=D+1===$||D+2===$&&ke==="*",ue&&F._listeners&&(X=B(_,I,F,$,$)),Ae=u(F),O=Ae.length;O-- >0;)K=Ae[O],K!=="_listeners"&&(K==="*"||K==="**"?(F[K]._listeners&&!ue&&(at=B(_,I,F[K],$,$),at&&(X?X.push.apply(X,at):X=at)),at=B(_,I,F[K],D,$)):K===ke?at=B(_,I,F[K],D+2,$):at=B(_,I,F[K],D,$),at&&(X?X.push.apply(X,at):X=at));return X}else F[nt]&&(X=B(_,I,F[nt],D+1,$));if(Q=F["*"],Q&&B(_,I,Q,D+1,$),ae=F["**"],ae)if(D<$)for(ae._listeners&&B(_,I,ae,$,$),Ae=u(ae),O=Ae.length;O-- >0;)K=Ae[O],K!=="_listeners"&&(K===ke?B(_,I,ae[K],D+2,$):K===nt?B(_,I,ae[K],D+1,$):(ie={},ie[K]=ae[K],B(_,I,{"**":ie},D+1,$)));else ae._listeners?B(_,I,ae,$,$):ae["*"]&&ae["*"]._listeners&&B(_,I,ae["*"],$,$);return X}function L(_,I,F){var D=0,$=0,j,G=this.delimiter,O=G.length,q;if(typeof _=="string")if((j=_.indexOf(G))!==-1){q=new Array(5);do q[D++]=_.slice($,j),$=j+O;while((j=_.indexOf(G,$))!==-1);q[D++]=_.slice($)}else q=[_],D=1;else q=_,D=_.length;if(D>1){for(j=0;j+10&&z._listeners.length>this._maxListeners&&(z._listeners.warned=!0,v.call(this,z._listeners.length,H))):z._listeners=I,!0;return!0}function U(_,I,F,D){for(var $=u(_),j=$.length,G,O,q,z=_._listeners,H;j-- >0;)O=$[j],G=_[O],O==="_listeners"?q=F:q=F?F.concat(O):[O],H=D||typeof O=="symbol",z&&I.push(H?q:q.join(this.delimiter)),typeof G=="object"&&U.call(this,G,I,q,H);return I}function V(_){for(var I=u(_),F=I.length,D,$,j;F-- >0;)$=I[F],D=_[$],D&&(j=!0,$!=="_listeners"&&!V(D)&&delete _[$]);return j}function N(_,I,F){this.emitter=_,this.event=I,this.listener=F}N.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(_,I,F){if(F===!0)$=!0;else if(F===!1)D=!0;else{if(!F||typeof F!="object")throw TypeError("options should be an object or true");var D=F.async,$=F.promisify,j=F.nextTick,G=F.objectify}if(D||j||$){var O=I,q=I._origin||I;if(j&&!o)throw Error("process.nextTick is not supported");$===r&&($=I.constructor.name==="AsyncFunction"),I=function(){var z=arguments,H=this,J=this.event;return $?j?Promise.resolve():new Promise(function(X){f(X)}).then(function(){return H.event=J,O.apply(H,z)}):(j?process.nextTick:f)(function(){H.event=J,O.apply(H,z)})},I._async=!0,I._origin=q}return[I,G?new N(this,_,I):this]}function S(_){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,_)}S.EventEmitter2=S,S.prototype.listenTo=function(_,I,F){if(typeof _!="object")throw TypeError("target musts be an object");var D=this;F=p(F,{on:r,off:r,reducers:r},{on:k,off:k,reducers:A});function $(j){if(typeof j!="object")throw TypeError("events must be an object");var G=F.reducers,O=T.call(D,_),q;O===-1?q=new b(D,_,F):q=D._observers[O];for(var z=u(j),H=z.length,J,X=typeof G=="function",K=0;K0;)$=F[D],(!_||$._target===_)&&($.unsubscribe(I),j=!0);return j},S.prototype.delimiter=".",S.prototype.setMaxListeners=function(_){_!==r&&(this._maxListeners=_,this._conf||(this._conf={}),this._conf.maxListeners=_)},S.prototype.getMaxListeners=function(){return this._maxListeners},S.prototype.event="",S.prototype.once=function(_,I,F){return this._once(_,I,!1,F)},S.prototype.prependOnceListener=function(_,I,F){return this._once(_,I,!0,F)},S.prototype._once=function(_,I,F,D){return this._many(_,1,I,F,D)},S.prototype.many=function(_,I,F,D){return this._many(_,I,F,!1,D)},S.prototype.prependMany=function(_,I,F,D){return this._many(_,I,F,!0,D)},S.prototype._many=function(_,I,F,D,$){var j=this;if(typeof F!="function")throw new Error("many only accepts instances of Function");function G(){return--I===0&&j.off(_,G),F.apply(this,arguments)}return G._origin=F,this._on(_,G,D,$)},S.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var _=arguments[0],I,F=this.wildcard,D,$,j,G,O;if(_==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(F&&(I=_,_!=="newListener"&&_!=="removeListener"&&typeof _=="object")){if($=_.length,a){for(j=0;j<$;j++)if(typeof _[j]=="symbol"){O=!0;break}}O||(_=_.join(this.delimiter))}var q=arguments.length,z;if(this._all&&this._all.length)for(z=this._all.slice(),j=0,$=z.length;j<$;j++)switch(this.event=_,q){case 1:z[j].call(this,_);break;case 2:z[j].call(this,_,arguments[1]);break;case 3:z[j].call(this,_,arguments[1],arguments[2]);break;default:z[j].apply(this,arguments)}if(F)z=[],B.call(this,z,I,this.listenerTree,0,$);else if(z=this._events[_],typeof z=="function"){switch(this.event=_,q){case 1:z.call(this);break;case 2:z.call(this,arguments[1]);break;case 3:z.call(this,arguments[1],arguments[2]);break;default:for(D=new Array(q-1),G=1;G3)for(D=new Array(q-1),G=1;G3)for($=new Array(z-1),O=1;O0&&this._events[_].length>this._maxListeners&&(this._events[_].warned=!0,v.call(this,this._events[_].length,_))):this._events[_]=I,$)},S.prototype.off=function(_,I){if(typeof I!="function")throw new Error("removeListener only takes instances of Function");var F,D=[];if(this.wildcard){var $=typeof _=="string"?_.split(this.delimiter):_.slice();if(D=B.call(this,null,$,this.listenerTree,0),!D)return this}else{if(!this._events[_])return this;F=this._events[_],D.push({_listeners:F})}for(var j=0;j0){for(D=this._all,I=0,F=D.length;I0;)D=I[F[j]],typeof D=="function"?$.push(D):$.push.apply($,D);return $}else{if(this.wildcard){if(G=this.listenerTree,!G)return[];var O=[],q=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,O,q,G,0),O}return I?(D=I[_],D?typeof D=="function"?[D]:D:[]):[]}},S.prototype.eventNames=function(_){var I=this._events;return this.wildcard?U.call(this,this.listenerTree,[],null,_):I?u(I):[]},S.prototype.listenerCount=function(_){return this.listeners(_).length},S.prototype.hasListeners=function(_){if(this.wildcard){var I=[],F=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,I,F,this.listenerTree,0),I.length>0}var D=this._events,$=this._all;return!!($&&$.length||D&&(_===r?u(D).length:D[_]))},S.prototype.listenersAny=function(){return this._all?this._all:[]},S.prototype.waitFor=function(_,I){var F=this,D=typeof I;return D==="number"?I={timeout:I}:D==="function"&&(I={filter:I}),I=p(I,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:k,Promise:w}),x(I.Promise,function($,j,G){function O(){var q=I.filter;if(!(q&&!q.apply(F,arguments)))if(F.off(_,O),I.handleError){var z=arguments[0];z?j(z):$(y.apply(null,arguments).slice(1))}else $(y.apply(null,arguments))}G(function(){F.off(_,O)}),F._on(_,O,!1)},{timeout:I.timeout,overload:I.overload})};function R(_,I,F){F=p(F,{Promise,timeout:0,overload:!1},{Promise:w});var D=F.Promise;return x(D,function($,j,G){var O;if(typeof _.addEventListener=="function"){O=function(){$(y.apply(null,arguments))},G(function(){_.removeEventListener(I,O)}),_.addEventListener(I,O,{once:!0});return}var q=function(){z&&_.removeListener("error",z),$(y.apply(null,arguments))},z;I!=="error"&&(z=function(H){_.removeListener(I,q),j(H)},_.once("error",z)),G(function(){z&&_.removeListener("error",z),_.removeListener(I,q)}),_.once(I,q)},{timeout:F.timeout,overload:F.overload})}var M=S.prototype;Object.defineProperties(S,{defaultMaxListeners:{get:function(){return M._maxListeners},set:function(_){if(typeof _!="number"||_<0||Number.isNaN(_))throw TypeError("n must be a non-negative number");M._maxListeners=_},enumerable:!0},once:{value:R,writable:!0,configurable:!0}}),Object.defineProperties(M,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return S}):t.exports=S})()})(o5e);function ss(){return ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e++a5e;class R0{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Jd.EventEmitter2,this.sendAsync=async function(r,n,s){e.state===Ws.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},s);try{e.isOpened()||await e.waitUntilOpened();const i=await e.sendMessageRequest({idx:NH(),type:Xe.MESSAGE,data:r,chainId:s});n(void 0,i.data)}catch(i){n(i)}},this.sendMessageRequest=async function(r){return new Promise((n,s)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&s(new Error("message idx not set"));const i=(a,l)=>{if(a)s(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?s(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,i),e.isOpened()?e.sendMessage(r):(xe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=gA){let n=!1;return Promise.race([new Promise((s,i)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Ws.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),i(new Error("opening wallet timed out"))},r)}),new Promise(s=>{if(e.isOpened()){var i;n=!0,s((i=e.openPayload)==null?void 0:i.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,s(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(s=>{if(e.connectPayload){s(e.connectPayload);return}e.events.once("connect",i=>{e.connectPayload=i,s(i)})}),n=new Promise((s,i)=>{e.events.once("close",o=>{i(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Ws.CLOSED,this._registered=!1,this._init=qt.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Ws.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Xe.INIT){xe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){xe.error("invalid init nonce");return}this._init=qt.OK,this.sendMessage({idx:-1,type:Xe.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==qt.OK)return;xe.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Xe.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){xe.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw xe.error(l),this.close(),l}this.state=Ws.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===Xe.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===Xe.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ye(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Xe.CHAIN_CHANGED){this.events.emit("chainChanged",e.data);return}if(e.type===Xe.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Xe.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Xe.CLOSE&&this.state!==Ws.CLOSED&&this.close(e.data),e.type===Xe.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Xe.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Ws.CLOSED&&(this.state=Ws.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,xe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(ss({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function l5e(t){return c5e.some(e=>e.predicate(t))}const c5e=[{name:"Decentraland Exception",predicate:u5e},{name:"0x v3 Exception",predicate:d5e}],f5e=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function u5e(t){try{const e=Ia(t);return f5e.test(e)}catch{return!1}}function d5e(t){const e=new en(h5e);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const h5e=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Vp=xt(`Ethereum Signed Message: +`),LH=t=>Ta(t)||ze(t)?ne(t):xt(t),ex=t=>{const e=LH(t);return l5e(e)?e:Ht([Vp,xt(String(e.length)),e])},v5e=t=>{if(JSON.stringify(t.slice(0,Vp.length))!==JSON.stringify(Vp))return t;const e=t.slice(Vp.length),r=String(e.length).length;let n,s;try{s=Number(Ia(e.slice(0,r)))}catch{s=Number(te(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},Xd=async(t,e,r,n)=>new ye.reader.OnChainReader(n).isValidSignature(t,e,r),jH=async(t,e,r,n)=>{const s=ex(e),i=W4(s);return Xd(t,i,r,n)},FH=(t,e,r,n)=>Xd(t,zw(e),r,n),Ab=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",BH=()=>!!navigator.userAgent.match(/UnitySequence/i),UH=t=>t.onChain.deployed&&t.fullyMigrated;class zH{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class Ny{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Ny.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function _b(){return Ny.isAvailable()?new Ny:new zH}async function VH(t){return Array.isArray(t)?Promise.all(t.map(e=>mt(e))):mt(t)}const lI="@sequence.transportSession";class I0{constructor(e){var r=this;this.sendAsync=async function(n,s,i){throw new Error("abstract method")},this.handleMessage=async function(n){const s=n;if(r._init!==qt.OK){if(s.type===Xe.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case Xe.OPEN:{if(r._init!==qt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case Xe.CLOSE:return r._init!==qt.OK,void 0;case Xe.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:xe.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=rW(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=K4(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Ab()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=sW(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=nW(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){xe.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{_b().setItem(lI,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=_b().getItem(lI);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=qt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(te(n.find(s=>s.isDefaultChain).chainId)))}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:s,error:i}=e;this.sendMessage({idx:-1,type:Xe.OPEN,data:{chainId:r,sessionId:n,session:s,error:i}})}notifyClose(e){this.sendMessage({idx:-1,type:Xe.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Xe.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:Xe.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Xe.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Xe.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:Xe.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Xe.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===qt.OK)return xe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Xe.INIT)return xe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(xe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(xe.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===qt.OK){e();return}if(this._init!==qt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{xe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},gA/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=qt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Xe.INIT,data:{nonce:this._initNonce}}),this._init=qt.SENT_NONCE})}}class y5e{constructor(){const e=new CS,r=new CS;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class CS{constructor(){this.events=new Jd.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class qH extends R0{constructor(e){if(super(),this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,s)=>{if(this.state===Ws.CLOSED){this.state=Ws.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:Xe.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i}})}},this.state=Ws.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=qt.OK}closeWallet(){this.sendMessage({idx:-1,type:Xe.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class m5e extends I0{constructor(e,r){super(e),this.port=r,this._init=qt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function WH(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...s)=>{n.logfromjs(`${t}: ${FE(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${FE(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${FE(s)}`)},window.logsOverriddenForUnreal=!0}}function FE(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let hu;class HH extends R0{constructor(e){super(),this.register=()=>{var r;WH("dapp"),hu&&(hu.unregister(),hu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),hu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),hu===this&&(hu=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new T0;r&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",V4(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r,n;const s=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",s),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(s)}}class p5e extends I0{constructor(e){super(e),this.onMessageFromUnreal=r=>{xe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new T0(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:q4(n.get("intent"))}},this._init=qt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;WH("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){xe.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;xe.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;xe.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Xe.INIT&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}const s=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(s)}}const bA="sequence-extension-message-handler";class g5e extends I0{constructor(e,r){super(e),this.runtime=r,this._init=qt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:bA})}sendMessage(e){xe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class GH extends R0{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===bA&&(this._init=qt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class b5e extends Jd.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;xe.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case Xe.MESSAGE:if(i)this.emit(Xe.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case Xe.DISCONNECT:case Xe.ACCOUNTS_CHANGED:case Xe.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(l,c)=>{if(l)i(l);else if(c)s(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let vu;class KH extends R0{constructor(e){super(),this.register=()=>{vu&&(vu.unregister(),vu=this),window.addEventListener("message",this.onWindowEvent),vu=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),vu===this&&(vu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const i=new URL(this.walletURL.href),o=new T0;r&&r!==""&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Ab()&&!BH()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",V4(n))),s&&o.set("net",`${s}`);let a,l;Ab()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;i.search=o.toString(),this.walletWindow=window.open(i.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){xe.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class w5e extends I0{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let s;try{s=JSON.parse(n.data)}catch{return}if(xe.debug("RECEIVED MESSAGE",s),r._init!==qt.OK&&r.isValidInitAck(s)&&(r.appOrigin=n.origin),r._init===qt.OK&&(!r.appOrigin||r.appOrigin.length<8)){xe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(s)},this.getWindowTransportSession=n=>{const s=new T0(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:q4(s.get("intent"))}},this._init=qt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:s}=new URL(e||window.location.href);let i=this.getWindowTransportSession(s);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){xe.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(i).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}`;xe.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}, due to: ${a}`;xe.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Xe.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):xe.error("unable to postMessage as parentOrigin is invalid")}}function QH(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class tx{constructor(...e){var r=this;this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendAsync=async function(n,s,i){if(r.provider){r.provider.sendAsync(n,s,i);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,s,i;const o=new tx;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new KH(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new qH(e.proxyTransport.appPort);o.add(a)}if((s=e.extensionTransport)!=null&&s.enabled){const a=new GH(e.extensionTransport.runtime);o.add(a)}if((i=e.unrealTransport)!=null&&i.enabled&&e.windowTransport&&e.walletAppURL){const a=new HH(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;nE5e(t,s))}function E5e(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data&&ne(e.data).length>=4)throw new Error("self calls are forbidden");if(e.delegateCall)throw new Error("delegate calls are forbidden")}const S5e=1e4;class k5e{constructor(e,r,n){var s=this;this.signerReadyCallbacks=[],this.events=new Jd.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(i){if(!i&&!s._connectOptions)throw new Error("prompter connect options are empty");if(!s.prompter)return s.connect(i);const o=await s.prompter.promptConnect(i||s._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.sendAsync=async function(i,o,a){const l={jsonrpc:"2.0",id:i.id,result:null};await s.getAccount();try{var c;if((!s.account||s.account===null)&&!$5e.includes(i.method))throw DH;const f=s.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(c=s.account)==null?void 0:c.providerFor(a??s.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof xa?u:void 0;switch(i.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("net_version",[]);l.result=h;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("eth_chainId",[]);l.result=h;break}case"eth_accounts":{const h=f.address;l.result=[h];break}case"eth_getBalance":{const[h,v]=i.params,y=await u.getBalance(h,v);l.result=y.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let h;switch(i.method){case"sequence_sign":case"personal_sign":{const[b,p]=i.params;h=b;break}case"eth_sign":{const[b,p]=i.params;h=p;break}}let v="";const y=ex(h),g=i.method==="sequence_sign";if(s.prompter===null?v=await f.signMessage(y,a??s.defaultChainId(),g?"eip6492":"ignore"):v=await s.prompter.promptSignMessage({chainId:a,message:y,eip6492:g},s.connectOptions),v&&v.length>0)l.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[h,v]=i.params;let y;if(typeof v=="string")try{y=JSON.parse(v)}catch(p){console.warn("walletRequestHandler: error parsing typedData",p)}else y=v;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let g="";const b=i.method==="sequence_signTypedData_v4";if(s.prompter===null?g=await f.signTypedData(y.domain,y.types,y.message,a??s.defaultChainId(),b?"eip6492":"ignore"):g=await s.prompter.promptSignMessage({chainId:a,typedData:y,eip6492:b},s.connectOptions),g&&g.length>0)l.result=g;else throw new Error("declined by user");break}case"eth_sendTransaction":{const h=C5e(i.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));cI(f.address,h);let v="";if(s.prompter===null?v=(await f.sendTransaction(h,a??s.defaultChainId())).hash:v=await s.prompter.promptSendTransaction(h,a,s.connectOptions),v)l.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[h]=i.params;if(Ye(h.from)!==f.address)throw new Error("sender address does not match wallet");cI(f.address,h),s.prompter===null?l.result=await f.signTransactions(h,a??s.defaultChainId()):l.result=await s.prompter.promptSignTransaction(h,a,s.connectOptions);break}case"eth_sendRawTransaction":{if(ye.transaction.isSignedTransactionBundle(i.params[0])){const h=Z.from(i.params[0].chainId).toNumber(),v=await f.relayer(h).relay(i.params[0]);l.result=v.hash}else{const h=await u.sendTransaction(i.params[0]);l.result=h.hash}break}case"eth_getTransactionCount":{const h=Ye(i.params[0]),v=i.params[1],y=await u.getTransactionCount(h,v);l.result=Z.from(y).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(i.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(i.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(i.params[0]);break}case"eth_call":{const[h,v]=i.params;l.result=await u.call(h,v);break}case"eth_getCode":{const[h,v]=i.params;l.result=await u.getCode(h,v);break}case"eth_estimateGas":{const[h]=i.params;l.result=await u.estimateGas(h);break}case"eth_gasPrice":{const h=await u.getGasPrice();l.result=h.toHexString();break}case"wallet_switchEthereumChain":{const[h]=i.params;if(!h.chainId||h.chainId.length===0)throw new Error("invalid chainId");const v=Z.from(h.chainId);s.setDefaultChainId(v.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=f.contexts;break}case"sequence_getWalletConfig":{const[h]=i.params;h?l.result=[(await f.status(h)).onChain.config]:l.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[h]=i.params;h?l.result=[fI(h,await f.status(h))]:l.result=await Promise.all(f.networks.map(async function(v){const y=await f.status(v.chainId);return fI(v.chainId,y)}));break}case"sequence_getNetworks":{l.result=await s.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[h]=i.params;if(!h)throw new Error("invalid request, method argument defaultChainId cannot be empty");s.setDefaultChainId(h),l.result=await s.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send(i.method,i.params);l.result=h}}}catch(f){xe.error(f),l.result=null,l.error=ss({},new Error(f),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:s}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var i;l=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=S5e){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ce.MAINNET,i=K4(s).chainId,o={connected:!0,chainId:Hl(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry};try{o.proof=await AH(this.account,i,a)}catch(l){return xe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=await this.walletSession(i),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,s)=>{const i=ss({},e,{data:s});r(i)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=ss({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(xe.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(s=>ss({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Ni(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",te(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){xe.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(s);if(i(o))return!0;if(await e.promptConfirmWalletDeploy(s,this.connectOptions)){const l=await r.status(s);return i(l)?!0:(xe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function fI(t,e){return{context:e.original.context,config:e.onChain.config,address:ye.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const $5e=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class Lh{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!jh.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Lh(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new wA(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await VH(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await yl(async function(){const a=await o.getTransaction(i);return a?o._wrapTransaction(a,i):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=i,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class wA extends Lh{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class A5e{constructor(e){if(this.signer=e,wA.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return Xd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=ex(r),a=W4(o);return Xd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,zw(r),n,s)}}class jh extends Bw{constructor(e,r,n=Kd){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(s=>{this.emit("connect",s)}),e.onDisconnect(s=>{this.emit("disconnect",s)}),e.onDefaultChainIdChanged(s=>{this.emit("chainChanged",s)}),e.onAccountsChanged(s=>{this.emit("accountsChanged",s)}),this.signer=new Lh(this.client,this),this.utils=new A5e(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(ss({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Ni(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new JH(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return Hl(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=YH(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const s=await this._getSubprovider(),i=(n=s.prepareRequest(e,r))!=null?n:[e,r];return s.send(i[0],i[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=Ni(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return wV(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}jh.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function YH(t){return typeof t=="object"?YH(t.chainId):Z.from(t).toNumber()}class JH extends jh{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=Ni(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var _5e={name:"@0xsequence/provider",version:"1.2.1",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--loader tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class af{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(af.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(af.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(af.SESSION_LOCALSTORE_KEY)}}af.SESSION_LOCALSTORE_KEY="@sequence.session";class lf{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(lf.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(lf.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(lf.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}lf.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class xA{constructor(e,r,n){var s;if(this.callbacks={},QH(e))this.transport=tx.new(e);else if(OH(e))this.transport=e;else throw new Error("Invalid transport");const i=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new af(r),this.defaultChainId=new lf(r,i),this.transport.on("accountsChanged",o=>{var a;o.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(a=this.callbacks.accountsChanged)==null||a.forEach(l=>l(o))}),this.transport.on("connect",o=>{var a;const l=Hl(this.getChainId());(a=this.callbacks.connect)==null||a.forEach(c=>c(ss({},o,{chainId:l})))}),this.transport.on("disconnect",o=>{var a;(a=this.callbacks.disconnect)==null||a.forEach(l=>l(o))}),this.transport.on("networks",o=>{var a;(a=this.callbacks.networks)==null||a.forEach(l=>l(o))}),this.transport.on("walletContext",o=>{var a;(a=this.callbacks.walletContext)==null||a.forEach(l=>l(o))}),this.transport.on("open",o=>{var a;(a=this.callbacks.open)==null||a.forEach(l=>l(o))}),this.transport.on("close",()=>{var o;(o=this.callbacks.close)==null||o.forEach(a=>a())}),this.defaultChainId.onDefaultChainIdChanged(o=>{var a;const l=Hl(o);(a=this.callbacks.chainChanged)==null||a.forEach(c=>c(l))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:ss({},e,{networkId:this.getChainId(),clientVersion:_5e.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=Z.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,s)=>{this.transport.sendAsync(e,(i,o)=>{i?s(i):o===void 0?s(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?s(o.error):typeof o=="object"&&o.result?n(o.result):s(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),s=Yr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&Z.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],s=x5e(n);return this.send({method:"eth_sendTransaction",params:[s]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const ES={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let po;const XH=t=>{var e,r,n;if(po)return po;const s=ss({},ES,t,{transports:ss({},ES.transports,t==null?void 0:t.transports)}),i={},o=(e=(r=s.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Kd.find(h=>h.chainId===d.chainId)}))!=null?e:[],a=Kd.map(d=>{var h;const v=(h=s.networks)==null?void 0:h.find(y=>y.chainId===d.chainId);return v?ss({},d,v):d}).concat(o),l=d=>{if(!i[d]){var h;const v=(h=a.find(b=>b.chainId===d))==null?void 0:h.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${d}`);const y=new xa(v),g=new Q4([bW,gW,new Y4],new bb(y));i[d]=new Oq(g,d)}return i[d]},c=s.defaultNetwork?(n=Ni(a,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!c&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||_b(),u=new xA(s.transports,f,{defaultChainId:c,defaultEIP6492:s.defaultEIP6492});return po=new jh(u,l),po},ZH=()=>{po&&(po.client.closeWallet(),po.client.transport.unregister(),po=void 0)},eG=()=>{if(!po)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return po},P5e=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:b5e,BaseProviderTransport:R0,BaseWalletTransport:I0,CHANNEL_ID:bA,DefaultChainIdTracker:lf,DefaultProviderConfig:ES,ErrSignedInRequired:DH,EventType:Xe,ExtensionMessageHandler:g5e,ExtensionMessageProvider:GH,InitState:qt,LocalStorage:Ny,MemoryItemStore:zH,MuxMessageProvider:tx,OpenState:Ws,PROVIDER_OPEN_TIMEOUT:gA,ProviderError:MH,ProxyMessageChannel:y5e,ProxyMessageChannelPort:CS,ProxyMessageHandler:m5e,ProxyMessageProvider:qH,SequenceClient:xA,SequenceClientSession:af,SequenceProvider:jh,SequenceSigner:Lh,SingleNetworkSequenceProvider:JH,SingleNetworkSequenceSigner:wA,UnrealMessageHandler:p5e,UnrealMessageProvider:HH,WalletRequestHandler:k5e,WindowMessageHandler:w5e,WindowMessageProvider:KH,WindowSessionParams:T0,getWallet:eG,initWallet:XH,isBrowserExtension:Ab,isMuxTransportTemplate:QH,isProviderTransport:OH,isUnityPlugin:BH,isValidMessageSignature:jH,isValidSignature:Xd,isValidTypedDataSignature:FH,isWalletUpToDate:UH,messageToBytes:LH,nextMessageIdx:NH,prefixEIP191Message:ex,resolveArrayProperties:VH,trimEIP191Prefix:v5e,unregisterWallet:ZH,useBestStore:_b},Symbol.toStringTag,{value:"Module"}));function Rn(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var T5e=Rn({__proto__:null},[ume]),R5e=Rn({__proto__:null},[gme]),I5e=Rn({__proto__:null},[qEe]),O5e=Rn({__proto__:null},[YEe]),M5e=Rn({__proto__:null},[XCe]),D5e=Rn({__proto__:null},[aEe]),N5e=Rn({__proto__:null},[i5e]),L5e=Rn({__proto__:null},[Exe]),j5e=Rn({__proto__:null},[P5e]),F5e=Rn({__proto__:null},[OCe]);const B5e=ye.transaction;var U5e=Object.freeze({__proto__:null,transactions:B5e}),z5e=Rn({__proto__:null,isValidSignature:Xd,isValidMessageSignature:jH,isValidTypedDataSignature:FH,isWalletUpToDate:UH},[lxe]),V5e=Rn({__proto__:null},[dCe]),q5e=Rn({__proto__:null},[DCe]),W5e=Rn({__proto__:null},[UEe]),H5e=Rn({__proto__:null},[gCe]),G5e=Rn({__proto__:null},[zCe]),tG=Object.freeze({__proto__:null,abi:T5e,api:R5e,auth:I5e,guard:O5e,indexer:M5e,metadata:D5e,multicall:N5e,network:L5e,provider:j5e,relayer:F5e,transactions:U5e,utils:z5e,core:V5e,signhub:q5e,sessions:W5e,migration:H5e,account:G5e,initWallet:XH,getWallet:eG,unregisterWallet:ZH,SequenceProvider:jh,SequenceClient:xA,SequenceSigner:Lh}),qp,K5e=class extends qz{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(i){if(i!=null&&i.isMetaMask&&!(i.isBraveWallet&&!i._events&&!i._state)&&!i.isApexWallet&&!i.isAvalanche&&!i.isBitKeep&&!i.isBlockWallet&&!i.isMathWallet&&!(i.isOkxWallet||i.isOKExWallet)&&!(i.isOneInchIOSWallet||i.isOneInchAndroidWallet)&&!i.isOpera&&!i.isPortal&&!i.isRabby&&!i.isDefiant&&!i.isTokenPocket&&!i.isTokenary&&!i.isZerion)return i}if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers.find(n):n(s)},...e};super({chains:t,options:r}),ar(this,"id","metaMask"),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ps(this,qp,void 0),pw(this,qp,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,s;try{const i=await this.getProvider();if(!i)throw new sl;i.on&&(i.on("accountsChanged",this.onAccountsChanged),i.on("chainChanged",this.onChainChanged),i.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(er(this,qp)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(f){if(this.isUserRejectedRequestError(f))throw new Sn(f);if(f.code===new zl(f).code)throw f}if(!o){const c=await i.request({method:"eth_requestAccounts"});o=Tl(c[0])}let a=await this.getChainId(),l=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,l=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((s=this.storage)==null||s.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:l},provider:i}}catch(i){throw this.isUserRejectedRequestError(i)?new Sn(i):i.code===-32002?new zl(i):i}}};qp=new WeakMap;var CA={},rx={},qe={},rG={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,l){var c=a>>>16&65535,f=a&65535,u=l>>>16&65535,d=l&65535;return f*d+(c*d+f*u<<16>>>0)|0}t.mul=Math.imul||e;function r(a,l){return a+l|0}t.add=r;function n(a,l){return a-l|0}t.sub=n;function s(a,l){return a<>>32-l}t.rotl=s;function i(a,l){return a<<32-l|a>>>l}t.rotr=i;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(a){return t.isInteger(a)&&a>=-t.MAX_SAFE_INTEGER&&a<=t.MAX_SAFE_INTEGER}})(rG);Object.defineProperty(qe,"__esModule",{value:!0});var nG=rG;function Q5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}qe.readInt16BE=Q5e;function Y5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}qe.readUint16BE=Y5e;function J5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}qe.readInt16LE=J5e;function X5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}qe.readUint16LE=X5e;function sG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}qe.writeUint16BE=sG;qe.writeInt16BE=sG;function iG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}qe.writeUint16LE=iG;qe.writeInt16LE=iG;function SS(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}qe.readInt32BE=SS;function kS(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}qe.readUint32BE=kS;function $S(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}qe.readInt32LE=$S;function AS(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}qe.readUint32LE=AS;function Pb(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}qe.writeUint32BE=Pb;qe.writeInt32BE=Pb;function Tb(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}qe.writeUint32LE=Tb;qe.writeInt32LE=Tb;function Z5e(t,e){e===void 0&&(e=0);var r=SS(t,e),n=SS(t,e+4);return r*4294967296+n-(n>>31)*4294967296}qe.readInt64BE=Z5e;function e6e(t,e){e===void 0&&(e=0);var r=kS(t,e),n=kS(t,e+4);return r*4294967296+n}qe.readUint64BE=e6e;function t6e(t,e){e===void 0&&(e=0);var r=$S(t,e),n=$S(t,e+4);return n*4294967296+r-(r>>31)*4294967296}qe.readInt64LE=t6e;function r6e(t,e){e===void 0&&(e=0);var r=AS(t,e),n=AS(t,e+4);return n*4294967296+r}qe.readUint64LE=r6e;function oG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Pb(t/4294967296>>>0,e,r),Pb(t>>>0,e,r+4),e}qe.writeUint64BE=oG;qe.writeInt64BE=oG;function aG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Tb(t>>>0,e,r),Tb(t/4294967296>>>0,e,r+4),e}qe.writeUint64LE=aG;qe.writeInt64LE=aG;function n6e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,s=1,i=t/8+r-1;i>=r;i--)n+=e[i]*s,s*=256;return n}qe.readUintBE=n6e;function s6e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,s=1,i=r;i=n;i--)r[i]=e/s&255,s*=256;return r}qe.writeUintBE=i6e;function o6e(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!nG.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,i=n;i>>32-16|S<<16,U=U+S|0,x^=U,x=x>>>32-12|x<<12,E=E+T|0,R^=E,R=R>>>32-16|R<<16,V=V+R|0,T^=V,T=T>>>32-12|T<<12,k=k+B|0,M^=k,M=M>>>32-16|M<<16,N=N+M|0,B^=N,B=B>>>32-12|B<<12,A=A+L|0,_^=A,_=_>>>32-16|_<<16,C=C+_|0,L^=C,L=L>>>32-12|L<<12,k=k+B|0,M^=k,M=M>>>32-8|M<<8,N=N+M|0,B^=N,B=B>>>32-7|B<<7,A=A+L|0,_^=A,_=_>>>32-8|_<<8,C=C+_|0,L^=C,L=L>>>32-7|L<<7,E=E+T|0,R^=E,R=R>>>32-8|R<<8,V=V+R|0,T^=V,T=T>>>32-7|T<<7,w=w+x|0,S^=w,S=S>>>32-8|S<<8,U=U+S|0,x^=U,x=x>>>32-7|x<<7,w=w+T|0,_^=w,_=_>>>32-16|_<<16,N=N+_|0,T^=N,T=T>>>32-12|T<<12,E=E+B|0,S^=E,S=S>>>32-16|S<<16,C=C+S|0,B^=C,B=B>>>32-12|B<<12,k=k+L|0,R^=k,R=R>>>32-16|R<<16,U=U+R|0,L^=U,L=L>>>32-12|L<<12,A=A+x|0,M^=A,M=M>>>32-16|M<<16,V=V+M|0,x^=V,x=x>>>32-12|x<<12,k=k+L|0,R^=k,R=R>>>32-8|R<<8,U=U+R|0,L^=U,L=L>>>32-7|L<<7,A=A+x|0,M^=A,M=M>>>32-8|M<<8,V=V+M|0,x^=V,x=x>>>32-7|x<<7,E=E+B|0,S^=E,S=S>>>32-8|S<<8,C=C+S|0,B^=C,B=B>>>32-7|B<<7,w=w+T|0,_^=w,_=_>>>32-8|_<<8,N=N+_|0,T^=N,T=T>>>32-7|T<<7;pn.writeUint32LE(w+n|0,t,0),pn.writeUint32LE(E+s|0,t,4),pn.writeUint32LE(k+i|0,t,8),pn.writeUint32LE(A+o|0,t,12),pn.writeUint32LE(x+a|0,t,16),pn.writeUint32LE(T+l|0,t,20),pn.writeUint32LE(B+c|0,t,24),pn.writeUint32LE(L+f|0,t,28),pn.writeUint32LE(U+u|0,t,32),pn.writeUint32LE(V+d|0,t,36),pn.writeUint32LE(N+h|0,t,40),pn.writeUint32LE(C+v|0,t,44),pn.writeUint32LE(S+y|0,t,48),pn.writeUint32LE(R+g|0,t,52),pn.writeUint32LE(M+b|0,t,56),pn.writeUint32LE(_+p|0,t,60)}function lG(t,e,r,n,s){if(s===void 0&&(s=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var cG={},hc={};Object.defineProperty(hc,"__esModule",{value:!0});function w6e(t,e,r){return~(t-1)&e|t-1&r}hc.select=w6e;function x6e(t,e){return(t|0)-(e|0)-1>>>31&1}hc.lessOrEqual=x6e;function fG(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}hc.compare=fG;function C6e(t,e){return t.length===0||e.length===0?!1:fG(t,e)!==0}hc.equal=C6e;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hc,r=Hi;t.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=a[0]|a[1]<<8;this._r[0]=l&8191;var c=a[2]|a[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var f=a[4]|a[5]<<8;this._r[2]=(c>>>10|f<<6)&7939;var u=a[6]|a[7]<<8;this._r[3]=(f>>>7|u<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(u>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var h=a[10]|a[11]<<8;this._r[6]=(d>>>14|h<<2)&8191;var v=a[12]|a[13]<<8;this._r[7]=(h>>>11|v<<5)&8065;var y=a[14]|a[15]<<8;this._r[8]=(v>>>8|y<<8)&8191,this._r[9]=y>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,l,c){for(var f=this._fin?0:2048,u=this._h[0],d=this._h[1],h=this._h[2],v=this._h[3],y=this._h[4],g=this._h[5],b=this._h[6],p=this._h[7],w=this._h[8],E=this._h[9],k=this._r[0],A=this._r[1],x=this._r[2],T=this._r[3],B=this._r[4],L=this._r[5],U=this._r[6],V=this._r[7],N=this._r[8],C=this._r[9];c>=16;){var S=a[l+0]|a[l+1]<<8;u+=S&8191;var R=a[l+2]|a[l+3]<<8;d+=(S>>>13|R<<3)&8191;var M=a[l+4]|a[l+5]<<8;h+=(R>>>10|M<<6)&8191;var _=a[l+6]|a[l+7]<<8;v+=(M>>>7|_<<9)&8191;var I=a[l+8]|a[l+9]<<8;y+=(_>>>4|I<<12)&8191,g+=I>>>1&8191;var F=a[l+10]|a[l+11]<<8;b+=(I>>>14|F<<2)&8191;var D=a[l+12]|a[l+13]<<8;p+=(F>>>11|D<<5)&8191;var $=a[l+14]|a[l+15]<<8;w+=(D>>>8|$<<8)&8191,E+=$>>>5|f;var j=0,G=j;G+=u*k,G+=d*(5*C),G+=h*(5*N),G+=v*(5*V),G+=y*(5*U),j=G>>>13,G&=8191,G+=g*(5*L),G+=b*(5*B),G+=p*(5*T),G+=w*(5*x),G+=E*(5*A),j+=G>>>13,G&=8191;var O=j;O+=u*A,O+=d*k,O+=h*(5*C),O+=v*(5*N),O+=y*(5*V),j=O>>>13,O&=8191,O+=g*(5*U),O+=b*(5*L),O+=p*(5*B),O+=w*(5*T),O+=E*(5*x),j+=O>>>13,O&=8191;var q=j;q+=u*x,q+=d*A,q+=h*k,q+=v*(5*C),q+=y*(5*N),j=q>>>13,q&=8191,q+=g*(5*V),q+=b*(5*U),q+=p*(5*L),q+=w*(5*B),q+=E*(5*T),j+=q>>>13,q&=8191;var z=j;z+=u*T,z+=d*x,z+=h*A,z+=v*k,z+=y*(5*C),j=z>>>13,z&=8191,z+=g*(5*N),z+=b*(5*V),z+=p*(5*U),z+=w*(5*L),z+=E*(5*B),j+=z>>>13,z&=8191;var H=j;H+=u*B,H+=d*T,H+=h*x,H+=v*A,H+=y*k,j=H>>>13,H&=8191,H+=g*(5*C),H+=b*(5*N),H+=p*(5*V),H+=w*(5*U),H+=E*(5*L),j+=H>>>13,H&=8191;var J=j;J+=u*L,J+=d*B,J+=h*T,J+=v*x,J+=y*A,j=J>>>13,J&=8191,J+=g*k,J+=b*(5*C),J+=p*(5*N),J+=w*(5*V),J+=E*(5*U),j+=J>>>13,J&=8191;var X=j;X+=u*U,X+=d*L,X+=h*B,X+=v*T,X+=y*x,j=X>>>13,X&=8191,X+=g*A,X+=b*k,X+=p*(5*C),X+=w*(5*N),X+=E*(5*V),j+=X>>>13,X&=8191;var K=j;K+=u*V,K+=d*U,K+=h*L,K+=v*B,K+=y*T,j=K>>>13,K&=8191,K+=g*x,K+=b*A,K+=p*k,K+=w*(5*C),K+=E*(5*N),j+=K>>>13,K&=8191;var Q=j;Q+=u*N,Q+=d*V,Q+=h*U,Q+=v*L,Q+=y*B,j=Q>>>13,Q&=8191,Q+=g*T,Q+=b*x,Q+=p*A,Q+=w*k,Q+=E*(5*C),j+=Q>>>13,Q&=8191;var ae=j;ae+=u*C,ae+=d*N,ae+=h*V,ae+=v*U,ae+=y*L,j=ae>>>13,ae&=8191,ae+=g*B,ae+=b*T,ae+=p*x,ae+=w*A,ae+=E*k,j+=ae>>>13,ae&=8191,j=(j<<2)+j|0,j=j+G|0,G=j&8191,j=j>>>13,O+=j,u=G,d=O,h=q,v=z,y=H,g=J,b=X,p=K,w=Q,E=ae,l+=16,c-=16}this._h[0]=u,this._h[1]=d,this._h[2]=h,this._h[3]=v,this._h[4]=y,this._h[5]=g,this._h[6]=b,this._h[7]=p,this._h[8]=w,this._h[9]=E},o.prototype.finish=function(a,l){l===void 0&&(l=0);var c=new Uint16Array(10),f,u,d,h;if(this._leftover){for(h=this._leftover,this._buffer[h++]=1;h<16;h++)this._buffer[h]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=f,f=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,c[0]=this._h[0]+5,f=c[0]>>>13,c[0]&=8191,h=1;h<10;h++)c[h]=this._h[h]+f,f=c[h]>>>13,c[h]&=8191;for(c[9]-=1<<13,u=(f^1)-1,h=0;h<10;h++)c[h]&=u;for(u=~u,h=0;h<10;h++)this._h[h]=this._h[h]&u|c[h];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,h=1;h<8;h++)d=(this._h[h]+this._pad[h]|0)+(d>>>16)|0,this._h[h]=d&65535;return a[l+0]=this._h[0]>>>0,a[l+1]=this._h[0]>>>8,a[l+2]=this._h[1]>>>0,a[l+3]=this._h[1]>>>8,a[l+4]=this._h[2]>>>0,a[l+5]=this._h[2]>>>8,a[l+6]=this._h[3]>>>0,a[l+7]=this._h[3]>>>8,a[l+8]=this._h[4]>>>0,a[l+9]=this._h[4]>>>8,a[l+10]=this._h[5]>>>0,a[l+11]=this._h[5]>>>8,a[l+12]=this._h[6]>>>0,a[l+13]=this._h[6]>>>8,a[l+14]=this._h[7]>>>0,a[l+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var l=0,c=a.length,f;if(this._leftover){f=16-this._leftover,f>c&&(f=c);for(var u=0;u=16&&(f=c-c%16,this._blocks(a,l,f),l+=f,c-=f),c){for(var u=0;u16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(c,h.length-c.length);var v=new Uint8Array(32);e.stream(this._key,h,v,4);var y=f.length+this.tagLength,g;if(d){if(d.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(y);return e.streamXOR(this._key,h,f,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),v,g.subarray(0,g.length-this.tagLength),u),n.wipe(h),g},l.prototype.open=function(c,f,u,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&h.update(o.subarray(d.length%16))),h.update(u),u.length%16>0&&h.update(o.subarray(u.length%16));var v=new Uint8Array(8);d&&s.writeUint64LE(d.length,v),h.update(v),s.writeUint64LE(u.length,v),h.update(v);for(var y=h.digest(),g=0;gthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var s=0;s1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n256)throw new Error("randomString charset is too long");let d="";const h=f.length,v=256-256%h;for(;c>0;){const y=s(Math.ceil(c*256/v),u);for(let g=0;g0;g++){const b=y[g];b0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(f=i(this._temp,this._state,l,f,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[f++],c--;return this},a.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,f=this._bufferLength,u=c/536870912|0,d=c<<3,h=c%64<56?64:128;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();t.SHA256=n;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(a,l,c,f,u){for(;u>=64;){for(var d=l[0],h=l[1],v=l[2],y=l[3],g=l[4],b=l[5],p=l[6],w=l[7],E=0;E<16;E++){var k=f+E*4;a[E]=e.readUint32BE(c,k)}for(var E=16;E<64;E++){var A=a[E-2],x=(A>>>17|A<<32-17)^(A>>>19|A<<32-19)^A>>>10;A=a[E-15];var T=(A>>>7|A<<32-7)^(A>>>18|A<<32-18)^A>>>3;a[E]=(x+a[E-7]|0)+(T+a[E-16]|0)}for(var E=0;E<64;E++){var x=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&p)|0)+(w+(s[E]+a[E]|0)|0)|0,T=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&v^h&v)|0;w=p,p=b,b=g,g=y+x|0,y=v,v=h,h=d,d=x+T|0}l[0]+=d,l[1]+=h,l[2]+=v,l[3]+=y,l[4]+=g,l[5]+=b,l[6]+=p,l[7]+=w,f+=64,u-=64}return f}function o(a){var l=new n;l.update(a);var c=l.digest();return l.clean(),c}t.hash=o})(ax);var SA={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=nx,r=Hi;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(E){const k=new Float64Array(16);if(E)for(let A=0;A>16&1),A[L-1]&=65535;A[15]=x[15]-32767-(A[14]>>16&1);const B=A[15]>>16&1;A[14]&=65535,a(x,A,1-B)}for(let T=0;T<16;T++)E[2*T]=x[T]&255,E[2*T+1]=x[T]>>8}function c(E,k){for(let A=0;A<16;A++)E[A]=k[2*A]+(k[2*A+1]<<8);E[15]&=32767}function f(E,k,A){for(let x=0;x<16;x++)E[x]=k[x]+A[x]}function u(E,k,A){for(let x=0;x<16;x++)E[x]=k[x]-A[x]}function d(E,k,A){let x,T,B=0,L=0,U=0,V=0,N=0,C=0,S=0,R=0,M=0,_=0,I=0,F=0,D=0,$=0,j=0,G=0,O=0,q=0,z=0,H=0,J=0,X=0,K=0,Q=0,ae=0,ie=0,ue=0,nt=0,ke=0,Ae=0,at=0,me=A[0],Re=A[1],Qt=A[2],Ie=A[3],Oe=A[4],Yt=A[5],Me=A[6],De=A[7],Jt=A[8],Ne=A[9],Le=A[10],Xt=A[11],je=A[12],Fe=A[13],Zt=A[14],Be=A[15];x=k[0],B+=x*me,L+=x*Re,U+=x*Qt,V+=x*Ie,N+=x*Oe,C+=x*Yt,S+=x*Me,R+=x*De,M+=x*Jt,_+=x*Ne,I+=x*Le,F+=x*Xt,D+=x*je,$+=x*Fe,j+=x*Zt,G+=x*Be,x=k[1],L+=x*me,U+=x*Re,V+=x*Qt,N+=x*Ie,C+=x*Oe,S+=x*Yt,R+=x*Me,M+=x*De,_+=x*Jt,I+=x*Ne,F+=x*Le,D+=x*Xt,$+=x*je,j+=x*Fe,G+=x*Zt,O+=x*Be,x=k[2],U+=x*me,V+=x*Re,N+=x*Qt,C+=x*Ie,S+=x*Oe,R+=x*Yt,M+=x*Me,_+=x*De,I+=x*Jt,F+=x*Ne,D+=x*Le,$+=x*Xt,j+=x*je,G+=x*Fe,O+=x*Zt,q+=x*Be,x=k[3],V+=x*me,N+=x*Re,C+=x*Qt,S+=x*Ie,R+=x*Oe,M+=x*Yt,_+=x*Me,I+=x*De,F+=x*Jt,D+=x*Ne,$+=x*Le,j+=x*Xt,G+=x*je,O+=x*Fe,q+=x*Zt,z+=x*Be,x=k[4],N+=x*me,C+=x*Re,S+=x*Qt,R+=x*Ie,M+=x*Oe,_+=x*Yt,I+=x*Me,F+=x*De,D+=x*Jt,$+=x*Ne,j+=x*Le,G+=x*Xt,O+=x*je,q+=x*Fe,z+=x*Zt,H+=x*Be,x=k[5],C+=x*me,S+=x*Re,R+=x*Qt,M+=x*Ie,_+=x*Oe,I+=x*Yt,F+=x*Me,D+=x*De,$+=x*Jt,j+=x*Ne,G+=x*Le,O+=x*Xt,q+=x*je,z+=x*Fe,H+=x*Zt,J+=x*Be,x=k[6],S+=x*me,R+=x*Re,M+=x*Qt,_+=x*Ie,I+=x*Oe,F+=x*Yt,D+=x*Me,$+=x*De,j+=x*Jt,G+=x*Ne,O+=x*Le,q+=x*Xt,z+=x*je,H+=x*Fe,J+=x*Zt,X+=x*Be,x=k[7],R+=x*me,M+=x*Re,_+=x*Qt,I+=x*Ie,F+=x*Oe,D+=x*Yt,$+=x*Me,j+=x*De,G+=x*Jt,O+=x*Ne,q+=x*Le,z+=x*Xt,H+=x*je,J+=x*Fe,X+=x*Zt,K+=x*Be,x=k[8],M+=x*me,_+=x*Re,I+=x*Qt,F+=x*Ie,D+=x*Oe,$+=x*Yt,j+=x*Me,G+=x*De,O+=x*Jt,q+=x*Ne,z+=x*Le,H+=x*Xt,J+=x*je,X+=x*Fe,K+=x*Zt,Q+=x*Be,x=k[9],_+=x*me,I+=x*Re,F+=x*Qt,D+=x*Ie,$+=x*Oe,j+=x*Yt,G+=x*Me,O+=x*De,q+=x*Jt,z+=x*Ne,H+=x*Le,J+=x*Xt,X+=x*je,K+=x*Fe,Q+=x*Zt,ae+=x*Be,x=k[10],I+=x*me,F+=x*Re,D+=x*Qt,$+=x*Ie,j+=x*Oe,G+=x*Yt,O+=x*Me,q+=x*De,z+=x*Jt,H+=x*Ne,J+=x*Le,X+=x*Xt,K+=x*je,Q+=x*Fe,ae+=x*Zt,ie+=x*Be,x=k[11],F+=x*me,D+=x*Re,$+=x*Qt,j+=x*Ie,G+=x*Oe,O+=x*Yt,q+=x*Me,z+=x*De,H+=x*Jt,J+=x*Ne,X+=x*Le,K+=x*Xt,Q+=x*je,ae+=x*Fe,ie+=x*Zt,ue+=x*Be,x=k[12],D+=x*me,$+=x*Re,j+=x*Qt,G+=x*Ie,O+=x*Oe,q+=x*Yt,z+=x*Me,H+=x*De,J+=x*Jt,X+=x*Ne,K+=x*Le,Q+=x*Xt,ae+=x*je,ie+=x*Fe,ue+=x*Zt,nt+=x*Be,x=k[13],$+=x*me,j+=x*Re,G+=x*Qt,O+=x*Ie,q+=x*Oe,z+=x*Yt,H+=x*Me,J+=x*De,X+=x*Jt,K+=x*Ne,Q+=x*Le,ae+=x*Xt,ie+=x*je,ue+=x*Fe,nt+=x*Zt,ke+=x*Be,x=k[14],j+=x*me,G+=x*Re,O+=x*Qt,q+=x*Ie,z+=x*Oe,H+=x*Yt,J+=x*Me,X+=x*De,K+=x*Jt,Q+=x*Ne,ae+=x*Le,ie+=x*Xt,ue+=x*je,nt+=x*Fe,ke+=x*Zt,Ae+=x*Be,x=k[15],G+=x*me,O+=x*Re,q+=x*Qt,z+=x*Ie,H+=x*Oe,J+=x*Yt,X+=x*Me,K+=x*De,Q+=x*Jt,ae+=x*Ne,ie+=x*Le,ue+=x*Xt,nt+=x*je,ke+=x*Fe,Ae+=x*Zt,at+=x*Be,B+=38*O,L+=38*q,U+=38*z,V+=38*H,N+=38*J,C+=38*X,S+=38*K,R+=38*Q,M+=38*ae,_+=38*ie,I+=38*ue,F+=38*nt,D+=38*ke,$+=38*Ae,j+=38*at,T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=$+T+65535,T=Math.floor(x/65536),$=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=$+T+65535,T=Math.floor(x/65536),$=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),E[0]=B,E[1]=L,E[2]=U,E[3]=V,E[4]=N,E[5]=C,E[6]=S,E[7]=R,E[8]=M,E[9]=_,E[10]=I,E[11]=F,E[12]=D,E[13]=$,E[14]=j,E[15]=G}function h(E,k){d(E,k,k)}function v(E,k){const A=n();for(let x=0;x<16;x++)A[x]=k[x];for(let x=253;x>=0;x--)h(A,A),x!==2&&x!==4&&d(A,A,k);for(let x=0;x<16;x++)E[x]=A[x]}function y(E,k){const A=new Uint8Array(32),x=new Float64Array(80),T=n(),B=n(),L=n(),U=n(),V=n(),N=n();for(let M=0;M<31;M++)A[M]=E[M];A[31]=E[31]&127|64,A[0]&=248,c(x,k);for(let M=0;M<16;M++)B[M]=x[M];T[0]=U[0]=1;for(let M=254;M>=0;--M){const _=A[M>>>3]>>>(M&7)&1;a(T,B,_),a(L,U,_),f(V,T,L),u(T,T,L),f(L,B,U),u(B,B,U),h(U,V),h(N,T),d(T,L,T),d(L,B,V),f(V,T,L),u(T,T,L),h(B,T),u(L,U,N),d(T,L,i),f(T,T,U),d(L,L,T),d(T,U,N),d(U,B,x),h(B,V),a(T,B,_),a(L,U,_)}for(let M=0;M<16;M++)x[M+16]=T[M],x[M+32]=L[M],x[M+48]=B[M],x[M+64]=U[M];const C=x.subarray(32),S=x.subarray(16);v(C,C),d(S,S,C);const R=new Uint8Array(32);return l(R,S),R}t.scalarMult=y;function g(E){return y(E,s)}t.scalarMultBase=g;function b(E){if(E.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const k=new Uint8Array(E);return{publicKey:g(k),secretKey:k}}t.generateKeyPairFromSeed=b;function p(E){const k=(0,e.randomBytes)(32,E),A=b(k);return(0,r.wipe)(k),A}t.generateKeyPair=p;function w(E,k,A=!1){if(E.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(k.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const x=y(E,k);if(A){let T=0;for(let B=0;Bs+i.length,0));const r=hG(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return kA(r)}function N6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,E=new Uint8Array(w);b!==p;){for(var k=v[b],A=0,x=w-1;(k!==0||A>>0,E[x]=k%a>>>0,k=k/a>>>0;if(k!==0)throw new Error("Non-zero carry");g=A,b++}for(var T=w-g;T!==w&&E[T]===0;)T++;for(var B=l.repeat(y);T>>0,w=new Uint8Array(p);v[y];){var E=r[v.charCodeAt(y)];if(E===255)return;for(var k=0,A=p-1;(E!==0||k>>0,w[A]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");b=k,y++}if(v[y]!==" "){for(var x=p-b;x!==p&&w[x]===0;)x++;for(var T=new Uint8Array(g+(p-x)),B=g;x!==p;)T[B++]=w[x++];return T}}}function h(v){var y=d(v);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:u,decodeUnsafe:d,decode:h}}var L6e=N6e,j6e=L6e;const F6e=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},B6e=t=>new TextEncoder().encode(t),U6e=t=>new TextDecoder().decode(t);class z6e{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class V6e{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return vG(this,e)}}class q6e{constructor(e){this.decoders=e}or(e){return vG(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const vG=(t,e)=>new q6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class W6e{constructor(e,r,n,s){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=s,this.encoder=new z6e(e,r,n),this.decoder=new V6e(e,r,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const lx=({name:t,prefix:e,encode:r,decode:n})=>new W6e(t,e,r,n),M0=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:s}=j6e(r,e);return lx({prefix:t,name:e,encode:n,decode:i=>F6e(s(i))})},H6e=(t,e,r,n)=>{const s={};for(let f=0;f=8&&(a-=8,o[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},G6e=(t,e,r)=>{const n=e[e.length-1]==="=",s=(1<r;)o-=r,i+=e[s&a>>o];if(o&&(i+=e[s&a<lx({prefix:e,name:t,encode(s){return G6e(s,n,r)},decode(s){return H6e(s,n,r,t)}}),K6e=lx({prefix:"\0",name:"identity",encode:t=>U6e(t),decode:t=>B6e(t)}),Q6e=Object.freeze(Object.defineProperty({__proto__:null,identity:K6e},Symbol.toStringTag,{value:"Module"})),Y6e=vn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),J6e=Object.freeze(Object.defineProperty({__proto__:null,base2:Y6e},Symbol.toStringTag,{value:"Module"})),X6e=vn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Z6e=Object.freeze(Object.defineProperty({__proto__:null,base8:X6e},Symbol.toStringTag,{value:"Module"})),e3e=M0({prefix:"9",name:"base10",alphabet:"0123456789"}),t3e=Object.freeze(Object.defineProperty({__proto__:null,base10:e3e},Symbol.toStringTag,{value:"Module"})),r3e=vn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),n3e=vn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),s3e=Object.freeze(Object.defineProperty({__proto__:null,base16:r3e,base16upper:n3e},Symbol.toStringTag,{value:"Module"})),i3e=vn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o3e=vn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),a3e=vn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),l3e=vn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),c3e=vn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),f3e=vn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),u3e=vn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),d3e=vn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),h3e=vn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),v3e=Object.freeze(Object.defineProperty({__proto__:null,base32:i3e,base32hex:c3e,base32hexpad:u3e,base32hexpadupper:d3e,base32hexupper:f3e,base32pad:a3e,base32padupper:l3e,base32upper:o3e,base32z:h3e},Symbol.toStringTag,{value:"Module"})),y3e=M0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),m3e=M0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),p3e=Object.freeze(Object.defineProperty({__proto__:null,base36:y3e,base36upper:m3e},Symbol.toStringTag,{value:"Module"})),g3e=M0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),b3e=M0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),w3e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:g3e,base58flickr:b3e},Symbol.toStringTag,{value:"Module"})),x3e=vn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),C3e=vn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),E3e=vn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),S3e=vn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),k3e=Object.freeze(Object.defineProperty({__proto__:null,base64:x3e,base64pad:C3e,base64url:E3e,base64urlpad:S3e},Symbol.toStringTag,{value:"Module"})),yG=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),$3e=yG.reduce((t,e,r)=>(t[r]=e,t),[]),A3e=yG.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function _3e(t){return t.reduce((e,r)=>(e+=$3e[r],e),"")}function P3e(t){const e=[];for(const r of t){const n=A3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const T3e=lx({prefix:"🚀",name:"base256emoji",encode:_3e,decode:P3e}),R3e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:T3e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const yI={...Q6e,...J6e,...Z6e,...t3e,...s3e,...v3e,...p3e,...w3e,...k3e,...R3e};function mG(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const mI=mG("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),BE=mG("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=hG(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new N3e:typeof navigator<"u"?wI(navigator.userAgent):V3e()}function U3e(t){return t!==""&&F3e.reduce(function(e,r){var n=r[0],s=r[1];if(e)return e;var i=s.exec(t);return!!i&&[n,i]},!1)}function wI(t){var e=U3e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new D3e;var s=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);s?s.length=0;M--)(R=L[M])&&(S=(C<3?R(S):C>3?R(U,V,S):R(U,V))||S);return C>3&&S&&Object.defineProperty(U,V,S),S},i=function(L,U){return function(V,N){U(V,N,L)}},o=function(L,U){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(L,U)},a=function(L,U,V,N){function C(S){return S instanceof V?S:new V(function(R){R(S)})}return new(V||(V=Promise))(function(S,R){function M(F){try{I(N.next(F))}catch(D){R(D)}}function _(F){try{I(N.throw(F))}catch(D){R(D)}}function I(F){F.done?S(F.value):C(F.value).then(M,_)}I((N=N.apply(L,U||[])).next())})},l=function(L,U){var V={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},N,C,S,R;return R={next:M(0),throw:M(1),return:M(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function M(I){return function(F){return _([I,F])}}function _(I){if(N)throw new TypeError("Generator is already executing.");for(;V;)try{if(N=1,C&&(S=I[0]&2?C.return:I[0]?C.throw||((S=C.return)&&S.call(C),0):C.next)&&!(S=S.call(C,I[1])).done)return S;switch(C=0,S&&(I=[I[0]&2,S.value]),I[0]){case 0:case 1:S=I;break;case 4:return V.label++,{value:I[1],done:!1};case 5:V.label++,C=I[1],I=[0];continue;case 7:I=V.ops.pop(),V.trys.pop();continue;default:if(S=V.trys,!(S=S.length>0&&S[S.length-1])&&(I[0]===6||I[0]===2)){V=0;continue}if(I[0]===3&&(!S||I[1]>S[0]&&I[1]=L.length&&(L=void 0),{value:L&&L[N++],done:!L}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(L,U){var V=typeof Symbol=="function"&&L[Symbol.iterator];if(!V)return L;var N=V.call(L),C,S=[],R;try{for(;(U===void 0||U-- >0)&&!(C=N.next()).done;)S.push(C.value)}catch(M){R={error:M}}finally{try{C&&!C.done&&(V=N.return)&&V.call(N)}finally{if(R)throw R.error}}return S},d=function(){for(var L=[],U=0;U1||M(A,j)})})}function M(A,j){try{_(N[A](j))}catch(G){D(S[0][3],G)}}function _(A){A.value instanceof v?Promise.resolve(A.value.v).then(I,F):D(S[0][2],A)}function I(A){M("next",A)}function F(A){M("throw",A)}function D(A,j){A(j),S.shift(),S.length&&M(S[0][0],S[0][1])}},g=function(L){var U,V;return U={},N("next"),N("throw",function(C){throw C}),N("return"),U[Symbol.iterator]=function(){return this},U;function N(C,S){U[C]=L[C]?function(R){return(V=!V)?{value:v(L[C](R)),done:C==="return"}:S?S(R):R}:S}},b=function(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=L[Symbol.asyncIterator],V;return U?U.call(L):(L=typeof f=="function"?f(L):L[Symbol.iterator](),V={},N("next"),N("throw"),N("return"),V[Symbol.asyncIterator]=function(){return this},V);function N(S){V[S]=L[S]&&function(R){return new Promise(function(M,_){R=L[S](R),C(M,_,R.done,R.value)})}}function C(S,R,M,_){Promise.resolve(_).then(function(I){S({value:I,done:M})},R)}},p=function(L,U){return Object.defineProperty?Object.defineProperty(L,"raw",{value:U}):L.raw=U,L},w=function(L){if(L&&L.__esModule)return L;var U={};if(L!=null)for(var V in L)Object.hasOwnProperty.call(L,V)&&(U[V]=L[V]);return U.default=L,U},E=function(L){return L&&L.__esModule?L:{default:L}},k=function(L,U){if(!U.has(L))throw new TypeError("attempted to get private field on non-instance");return U.get(L)},$=function(L,U,V){if(!U.has(L))throw new TypeError("attempted to set private field on non-instance");return U.set(L,V),V},T("__extends",e),T("__assign",r),T("__rest",n),T("__decorate",s),T("__param",i),T("__metadata",o),T("__awaiter",a),T("__generator",l),T("__exportStar",c),T("__createBinding",x),T("__values",f),T("__read",u),T("__spread",d),T("__spreadArrays",h),T("__await",v),T("__asyncGenerator",y),T("__asyncDelegator",g),T("__asyncValues",b),T("__makeTemplateObject",p),T("__importStar",w),T("__importDefault",E),T("__classPrivateFieldGet",k),T("__classPrivateFieldSet",$)})})(G3e);var UE={},b1={},xI;function K3e(){if(xI)return b1;xI=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return b1.delay=t,b1}var Ac={},zE={},_c={},CI;function Q3e(){return CI||(CI=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.ONE_THOUSAND=_c.ONE_HUNDRED=void 0,_c.ONE_HUNDRED=100,_c.ONE_THOUSAND=1e3),_c}var VE={},EI;function Y3e(){return EI||(EI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(VE)),VE}var SI;function gG(){return SI||(SI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(Q3e(),t),e.__exportStar(Y3e(),t)}(zE)),zE}var kI;function J3e(){if(kI)return Ac;kI=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.fromMiliseconds=Ac.toMiliseconds=void 0;const t=gG();function e(n){return n*t.ONE_THOUSAND}Ac.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Ac.fromMiliseconds=r,Ac}var $I;function X3e(){return $I||($I=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(K3e(),t),e.__exportStar(J3e(),t)}(UE)),UE}var yu={},AI;function Z3e(){if(AI)return yu;AI=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const s=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:s})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return yu.Watch=t,yu.default=t,yu}var qE={},w1={},_I;function eSe(){if(_I)return w1;_I=1,Object.defineProperty(w1,"__esModule",{value:!0}),w1.IWatch=void 0;class t{}return w1.IWatch=t,w1}var PI;function tSe(){return PI||(PI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zd.__exportStar(eSe(),t)}(qE)),qE}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(X3e(),t),e.__exportStar(Z3e(),t),e.__exportStar(tSe(),t),e.__exportStar(gG(),t)})(cf);var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.getLocalStorage=yt.getLocalStorageOrThrow=yt.getCrypto=yt.getCryptoOrThrow=wG=yt.getLocation=yt.getLocationOrThrow=$A=yt.getNavigator=yt.getNavigatorOrThrow=bG=yt.getDocument=yt.getDocumentOrThrow=yt.getFromWindowOrThrow=yt.getFromWindow=void 0;function Gf(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}yt.getFromWindow=Gf;function Fh(t){const e=Gf(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}yt.getFromWindowOrThrow=Fh;function rSe(){return Fh("document")}yt.getDocumentOrThrow=rSe;function nSe(){return Gf("document")}var bG=yt.getDocument=nSe;function sSe(){return Fh("navigator")}yt.getNavigatorOrThrow=sSe;function iSe(){return Gf("navigator")}var $A=yt.getNavigator=iSe;function oSe(){return Fh("location")}yt.getLocationOrThrow=oSe;function aSe(){return Gf("location")}var wG=yt.getLocation=aSe;function lSe(){return Fh("crypto")}yt.getCryptoOrThrow=lSe;function cSe(){return Gf("crypto")}yt.getCrypto=cSe;function fSe(){return Fh("localStorage")}yt.getLocalStorageOrThrow=fSe;function uSe(){return Gf("localStorage")}yt.getLocalStorage=uSe;var AA={};Object.defineProperty(AA,"__esModule",{value:!0});var xG=AA.getWindowMetadata=void 0;const TI=yt;function dSe(){let t,e;try{t=TI.getDocumentOrThrow(),e=TI.getLocationOrThrow()}catch{return null}function r(){const u=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const g=v.getAttribute("href");if(g)if(g.toLowerCase().indexOf("https:")===-1&&g.toLowerCase().indexOf("http:")===-1&&g.indexOf("//")!==0){let b=e.protocol+"//"+e.host;if(g.indexOf("/")===0)b+=g;else{const p=e.pathname.split("/");p.pop();const w=p.join("/");b+=w+"/"+g}d.push(b)}else if(g.indexOf("//")===0){const b=e.protocol+g;d.push(b)}else d.push(g)}}return d}function n(...u){const d=t.getElementsByTagName("meta");for(let h=0;hv.getAttribute(g)).filter(g=>g?u.includes(g):!1);if(y.length&&y){const g=v.getAttribute("content");if(g)return g}}return""}function s(){let u=n("name","og:site_name","og:title","twitter:title");return u||(u=t.title),u}function i(){return n("description","og:description","twitter:description","keywords")}const o=s(),a=i(),l=e.origin,c=r();return{description:a,url:l,icons:c,name:o}}xG=AA.getWindowMetadata=dSe;var Ly={},hSe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),CG="%[a-f0-9]{2}",RI=new RegExp("("+CG+")|([^%]+?)","gi"),II=new RegExp("("+CG+")+","gi");function PS(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],PS(r),PS(n))}function vSe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(RI)||[],r=1;r{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},gSe=function(t,e){for(var r={},n=Object.keys(t),s=Array.isArray(e),i=0;ip==null,o=Symbol("encodeFragmentIdentifier");function a(p){switch(p.arrayFormat){case"index":return w=>(E,k)=>{const $=E.length;return k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[",$,"]"].join("")]:[...E,[f(w,p),"[",f($,p),"]=",f(k,p)].join("")]};case"bracket":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[]"].join("")]:[...E,[f(w,p),"[]=",f(k,p)].join("")];case"colon-list-separator":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),":list="].join("")]:[...E,[f(w,p),":list=",f(k,p)].join("")];case"comma":case"separator":case"bracket-separator":{const w=p.arrayFormat==="bracket-separator"?"[]=":"=";return E=>(k,$)=>$===void 0||p.skipNull&&$===null||p.skipEmptyString&&$===""?k:($=$===null?"":$,k.length===0?[[f(E,p),w,f($,p)].join("")]:[[k,f($,p)].join(p.arrayFormatSeparator)])}default:return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,f(w,p)]:[...E,[f(w,p),"=",f(k,p)].join("")]}}function l(p){let w;switch(p.arrayFormat){case"index":return(E,k,$)=>{if(w=/\[(\d*)\]$/.exec(E),E=E.replace(/\[\d*\]$/,""),!w){$[E]=k;return}$[E]===void 0&&($[E]={}),$[E][w[1]]=k};case"bracket":return(E,k,$)=>{if(w=/(\[\])$/.exec(E),E=E.replace(/\[\]$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"colon-list-separator":return(E,k,$)=>{if(w=/(:list)$/.exec(E),E=E.replace(/:list$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"comma":case"separator":return(E,k,$)=>{const x=typeof k=="string"&&k.includes(p.arrayFormatSeparator),T=typeof k=="string"&&!x&&u(k,p).includes(p.arrayFormatSeparator);k=T?u(k,p):k;const B=x||T?k.split(p.arrayFormatSeparator).map(L=>u(L,p)):k===null?k:u(k,p);$[E]=B};case"bracket-separator":return(E,k,$)=>{const x=/(\[\])$/.test(E);if(E=E.replace(/\[\]$/,""),!x){$[E]=k&&u(k,p);return}const T=k===null?[]:k.split(p.arrayFormatSeparator).map(B=>u(B,p));if($[E]===void 0){$[E]=T;return}$[E]=[].concat($[E],T)};default:return(E,k,$)=>{if($[E]===void 0){$[E]=k;return}$[E]=[].concat($[E],k)}}}function c(p){if(typeof p!="string"||p.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(p,w){return w.encode?w.strict?e(p):encodeURIComponent(p):p}function u(p,w){return w.decode?r(p):p}function d(p){return Array.isArray(p)?p.sort():typeof p=="object"?d(Object.keys(p)).sort((w,E)=>Number(w)-Number(E)).map(w=>p[w]):p}function h(p){const w=p.indexOf("#");return w!==-1&&(p=p.slice(0,w)),p}function v(p){let w="";const E=p.indexOf("#");return E!==-1&&(w=p.slice(E)),w}function y(p){p=h(p);const w=p.indexOf("?");return w===-1?"":p.slice(w+1)}function g(p,w){return w.parseNumbers&&!Number.isNaN(Number(p))&&typeof p=="string"&&p.trim()!==""?p=Number(p):w.parseBooleans&&p!==null&&(p.toLowerCase()==="true"||p.toLowerCase()==="false")&&(p=p.toLowerCase()==="true"),p}function b(p,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const E=l(w),k=Object.create(null);if(typeof p!="string"||(p=p.trim().replace(/^[?#&]/,""),!p))return k;for(const $ of p.split("&")){if($==="")continue;let[x,T]=n(w.decode?$.replace(/\+/g," "):$,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?T:u(T,w),E(u(x,w),T,k)}for(const $ of Object.keys(k)){const x=k[$];if(typeof x=="object"&&x!==null)for(const T of Object.keys(x))x[T]=g(x[T],w);else k[$]=g(x,w)}return w.sort===!1?k:(w.sort===!0?Object.keys(k).sort():Object.keys(k).sort(w.sort)).reduce(($,x)=>{const T=k[x];return Boolean(T)&&typeof T=="object"&&!Array.isArray(T)?$[x]=d(T):$[x]=T,$},Object.create(null))}t.extract=y,t.parse=b,t.stringify=(p,w)=>{if(!p)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const E=T=>w.skipNull&&i(p[T])||w.skipEmptyString&&p[T]==="",k=a(w),$={};for(const T of Object.keys(p))E(T)||($[T]=p[T]);const x=Object.keys($);return w.sort!==!1&&x.sort(w.sort),x.map(T=>{const B=p[T];return B===void 0?"":B===null?f(T,w):Array.isArray(B)?B.length===0&&w.arrayFormat==="bracket-separator"?f(T,w)+"[]":B.reduce(k(T),[]).join("&"):f(T,w)+"="+f(B,w)}).filter(T=>T.length>0).join("&")},t.parseUrl=(p,w)=>{w=Object.assign({decode:!0},w);const[E,k]=n(p,"#");return Object.assign({url:E.split("?")[0]||"",query:b(y(p),w)},w&&w.parseFragmentIdentifier&&k?{fragmentIdentifier:u(k,w)}:{})},t.stringifyUrl=(p,w)=>{w=Object.assign({encode:!0,strict:!0,[o]:!0},w);const E=h(p.url).split("?")[0]||"",k=t.extract(p.url),$=t.parse(k,{sort:!1}),x=Object.assign($,p.query);let T=t.stringify(x,w);T&&(T=`?${T}`);let B=v(p.url);return p.fragmentIdentifier&&(B=`#${w[o]?f(p.fragmentIdentifier,w):p.fragmentIdentifier}`),`${E}${T}${B}`},t.pick=(p,w,E)=>{E=Object.assign({parseFragmentIdentifier:!0,[o]:!1},E);const{url:k,query:$,fragmentIdentifier:x}=t.parseUrl(p,E);return t.stringifyUrl({url:k,query:s($,w),fragmentIdentifier:x},E)},t.exclude=(p,w,E)=>{const k=Array.isArray(w)?$=>!w.includes($):($,x)=>!w($,x);return t.pick(p,k,E)}})(Ly);const bSe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function mWe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const s=t[n];r.push(...s.accounts)}),r}function EG(t,e){return t.includes(":")?[t]:e.chains||[]}const SG="base10",cs="base16",TS="base64pad",_A="utf8",kG=0,D0=1,wSe=0,OI=1,RS=12,PA=32;function pWe(){const t=SA.generateKeyPair();return{privateKey:Wi(t.secretKey,cs),publicKey:Wi(t.publicKey,cs)}}function gWe(){const t=nx.randomBytes(PA);return Wi(t,cs)}function bWe(t,e){const r=SA.sharedKey(Ii(t,cs),Ii(e,cs)),n=new T6e(ax.SHA256,r).expand(PA);return Wi(n,cs)}function wWe(t){const e=ax.hash(Ii(t,cs));return Wi(e,cs)}function xWe(t){const e=ax.hash(Ii(t,_A));return Wi(e,cs)}function xSe(t){return Ii(`${t}`,SG)}function cx(t){return Number(Wi(t,SG))}function CWe(t){const e=xSe(typeof t.type<"u"?t.type:kG);if(cx(e)===D0&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Ii(t.senderPublicKey,cs):void 0,n=typeof t.iv<"u"?Ii(t.iv,cs):nx.randomBytes(RS),s=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)).seal(n,Ii(t.message,_A));return CSe({type:e,sealed:s,iv:n,senderPublicKey:r})}function EWe(t){const e=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)),{sealed:r,iv:n}=$G(t.encoded),s=e.open(n,r);if(s===null)throw new Error("Failed to decrypt");return Wi(s,_A)}function CSe(t){if(cx(t.type)===D0){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Wi(vI([t.type,t.senderPublicKey,t.iv,t.sealed]),TS)}return Wi(vI([t.type,t.iv,t.sealed]),TS)}function $G(t){const e=Ii(t,TS),r=e.slice(wSe,OI),n=OI;if(cx(r)===D0){const a=n+PA,l=a+RS,c=e.slice(n,a),f=e.slice(a,l),u=e.slice(l);return{type:r,sealed:u,iv:f,senderPublicKey:c}}const s=n+RS,i=e.slice(n,s),o=e.slice(s);return{type:r,sealed:o,iv:i}}function SWe(t,e){const r=$G(t);return ESe({type:cx(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Wi(r.senderPublicKey,cs):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function ESe(t){const e=(t==null?void 0:t.type)||kG;if(e===D0){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function kWe(t){return t.type===D0&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var SSe=Object.defineProperty,MI=Object.getOwnPropertySymbols,kSe=Object.prototype.hasOwnProperty,$Se=Object.prototype.propertyIsEnumerable,DI=(t,e,r)=>e in t?SSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,NI=(t,e)=>{for(var r in e||(e={}))kSe.call(e,r)&&DI(t,r,e[r]);if(MI)for(var r of MI(e))$Se.call(e,r)&&DI(t,r,e[r]);return t};const ASe="ReactNative",pl={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_Se="js";function AG(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function PSe(){return!bG()&&!!$A()&&navigator.product===ASe}function TSe(){return!AG()&&!!$A()}function TA(){return PSe()?pl.reactNative:AG()?pl.node:TSe()?pl.browser:pl.unknown}function RSe(t,e){let r=Ly.parse(t);return r=NI(NI({},r),e),t=Ly.stringify(r),t}function $We(){return xG()||{name:"",description:"",url:"",icons:[""]}}function ISe(){if(TA()===pl.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=z3e();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function OSe(){var t;const e=TA();return e===pl.browser?[e,((t=wG())==null?void 0:t.host)||"unknown"].join(":"):e}function MSe(t,e,r){const n=ISe(),s=OSe();return[[t,e].join("-"),[_Se,r].join("-"),n,s].join("/")}function AWe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:s,projectId:i,useOnCloseEvent:o}){const a=r.split("?"),l=MSe(t,e,n),c={auth:s,ua:l,projectId:i,useOnCloseEvent:o||void 0},f=RSe(a[1]||"",c);return a[0]+"?"+f}function Xc(t,e){return t.filter(r=>e.includes(r)).length===t.length}function _We(t){return Object.fromEntries(t.entries())}function PWe(t){return new Map(Object.entries(t))}function TWe(t=cf.FIVE_MINUTES,e){const r=cf.toMiliseconds(t||cf.FIVE_MINUTES);let n,s,i;return{resolve:o=>{i&&n&&(clearTimeout(i),n(o))},reject:o=>{i&&s&&(clearTimeout(i),s(o))},done:()=>new Promise((o,a)=>{i=setTimeout(()=>{a(new Error(e))},r),n=o,s=a})}}function RWe(t,e,r){return new Promise(async(n,s)=>{const i=setTimeout(()=>s(new Error(r)),e);try{const o=await t;n(o)}catch(o){s(o)}clearTimeout(i)})}function _G(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function IWe(t){return _G("topic",t)}function OWe(t){return _G("id",t)}function MWe(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function DWe(t,e){return cf.fromMiliseconds((e||Date.now())+cf.toMiliseconds(t))}function NWe(t){return Date.now()>=cf.toMiliseconds(t)}function LWe(t,e){return`${t}${e?`:${e}`:""}`}function WE(t=[],e=[]){return[...new Set([...t,...e])]}async function jWe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let s=n==null?void 0:n.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));const i=`${s}/wc?requestId=${t}&sessionTopic=${e}`,o=TA();o===pl.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):o===pl.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(i)}catch(n){console.error(n)}}const DSe="irn";function FWe(t){return(t==null?void 0:t.relay)||{protocol:DSe}}function BWe(t){const e=bSe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var NSe=Object.defineProperty,LI=Object.getOwnPropertySymbols,LSe=Object.prototype.hasOwnProperty,jSe=Object.prototype.propertyIsEnumerable,jI=(t,e,r)=>e in t?NSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FSe=(t,e)=>{for(var r in e||(e={}))LSe.call(e,r)&&jI(t,r,e[r]);if(LI)for(var r of LI(e))jSe.call(e,r)&&jI(t,r,e[r]);return t};function BSe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(s=>{if(s.startsWith(n)){const i=s.replace(n,""),o=t[s];r[i]=o}}),r}function UWe(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),s=t.substring(e+1,r).split("@"),i=typeof r<"u"?t.substring(r):"",o=Ly.parse(i);return{protocol:n,topic:USe(s[0]),version:parseInt(s[1],10),symKey:o.symKey,relay:BSe(o)}}function USe(t){return t.startsWith("//")?t.substring(2):t}function zSe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(s=>{const i=r+e+s;t[s]&&(n[i]=t[s])}),n}function zWe(t){return`${t.protocol}:${t.topic}@${t.version}?`+Ly.stringify(FSe({symKey:t.symKey},zSe(t.relay)))}var VSe=Object.defineProperty,qSe=Object.defineProperties,WSe=Object.getOwnPropertyDescriptors,FI=Object.getOwnPropertySymbols,HSe=Object.prototype.hasOwnProperty,GSe=Object.prototype.propertyIsEnumerable,BI=(t,e,r)=>e in t?VSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KSe=(t,e)=>{for(var r in e||(e={}))HSe.call(e,r)&&BI(t,r,e[r]);if(FI)for(var r of FI(e))GSe.call(e,r)&&BI(t,r,e[r]);return t},QSe=(t,e)=>qSe(t,WSe(e));function Bh(t){const e=[];return t.forEach(r=>{const[n,s]=r.split(":");e.push(`${n}:${s}`)}),e}function YSe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Bh(r.accounts))}),e}function JSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.methods)}),r}function XSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.events)}),r}function VWe(t,e){const r=lke(t,e);if(r)throw new Error(r.message);const n={};for(const[s,i]of Object.entries(t))n[s]={methods:i.methods,events:i.events,chains:i.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function PG(t){return t.includes(":")}function ZSe(t){return PG(t)?t.split(":")[0]:t}function TG(t){var e,r,n;const s={};if(!RA(t))return s;for(const[i,o]of Object.entries(t)){const a=PG(i)?[i]:o.chains,l=o.methods||[],c=o.events||[],f=ZSe(i);s[f]=QSe(KSe({},s[f]),{chains:WE(a,(e=s[f])==null?void 0:e.chains),methods:WE(l,(r=s[f])==null?void 0:r.methods),events:WE(c,(n=s[f])==null?void 0:n.events)})}return s}const eke={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},tke={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function cl(t,e){const{message:r,code:n}=tke[t];return{message:e?`${r} ${e}`:r,code:n}}function eh(t,e){const{message:r,code:n}=eke[t];return{message:e?`${r} ${e}`:r,code:n}}function fx(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function RA(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function ff(t){return typeof t>"u"}function di(t,e){return e&&ff(t)?!0:typeof t=="string"&&!!t.trim().length}function IA(t,e){return e&&ff(t)?!0:typeof t=="number"&&!isNaN(t)}function qWe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),s=Object.keys(r);let i=!0;return Xc(s,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:c}=t.namespaces[o],f=Bh(a),u=r[o];(!Xc(EG(o,u),f)||!Xc(u.methods,l)||!Xc(u.events,c))&&(i=!1)}),i):!1}function Rb(t){return di(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function rke(t){if(di(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Rb(r)}}return!1}function WWe(t){if(di(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function HWe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function GWe(t){return t==null?void 0:t.topic}function KWe(t,e){let r=null;return di(t==null?void 0:t.publicKey,!1)||(r=cl("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function UI(t){let e=!0;return fx(t)?t.length&&(e=t.every(r=>di(r,!1))):e=!1,e}function nke(t,e,r){let n=null;return fx(e)&&e.length?e.forEach(s=>{n||Rb(s)||(n=eh("UNSUPPORTED_CHAINS",`${r}, chain ${s} should be a string and conform to "namespace:chainId" format`))}):Rb(t)||(n=eh("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function ske(t,e,r){let n=null;return Object.entries(t).forEach(([s,i])=>{if(n)return;const o=nke(s,EG(s,i),`${e} ${r}`);o&&(n=o)}),n}function ike(t,e){let r=null;return fx(t)?t.forEach(n=>{r||rke(n)||(r=eh("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=eh("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function oke(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ike(n==null?void 0:n.accounts,`${e} namespace`);s&&(r=s)}),r}function ake(t,e){let r=null;return UI(t==null?void 0:t.methods)?UI(t==null?void 0:t.events)||(r=eh("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=eh("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function RG(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ake(n,`${e}, namespace`);s&&(r=s)}),r}function QWe(t,e,r){let n=null;if(t&&RA(t)){const s=RG(t,e);s&&(n=s);const i=ske(t,e,r);i&&(n=i)}else n=cl("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function lke(t,e){let r=null;if(t&&RA(t)){const n=RG(t,e);n&&(r=n);const s=oke(t,e);s&&(r=s)}else r=cl("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function cke(t){return di(t.protocol,!0)}function YWe(t,e){let r=!1;return e&&!t?r=!0:t&&fx(t)&&t.length&&t.forEach(n=>{r=cke(n)}),r}function JWe(t){return typeof t=="number"}function XWe(t){return typeof t<"u"&&typeof t!==null}function ZWe(t){return!(!t||typeof t!="object"||!t.code||!IA(t.code,!1)||!t.message||!di(t.message,!1))}function eHe(t){return!(ff(t)||!di(t.method,!1))}function tHe(t){return!(ff(t)||ff(t.result)&&ff(t.error)||!IA(t.id,!1)||!di(t.jsonrpc,!1))}function rHe(t){return!(ff(t)||!di(t.name,!1))}function nHe(t,e){return!(!Rb(e)||!YSe(t).includes(e))}function sHe(t,e,r){return di(r,!1)?JSe(t,e).includes(r):!1}function iHe(t,e,r){return di(r,!1)?XSe(t,e).includes(r):!1}function oHe(t,e,r){let n=null;const s=fke(t),i=uke(e),o=Object.keys(s),a=Object.keys(i),l=zI(Object.keys(t)),c=zI(Object.keys(e)),f=l.filter(u=>!c.includes(u));return f.length&&(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. +***************************************************************************** */(function(t){var e,r,n,s,i,o,a,l,c,f,u,d,h,v,y,g,b,p,w,E,k,A,x;(function(T){var B=typeof Wr=="object"?Wr:typeof self=="object"?self:typeof this=="object"?this:{};T(L(B,L(t.exports)));function L(U,V){return U!==B&&(typeof Object.create=="function"?Object.defineProperty(U,"__esModule",{value:!0}):U.__esModule=!0),function(N,C){return U[N]=V?V(N,C):C}}})(function(T){var B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,U){L.__proto__=U}||function(L,U){for(var V in U)U.hasOwnProperty(V)&&(L[V]=U[V])};e=function(L,U){B(L,U);function V(){this.constructor=L}L.prototype=U===null?Object.create(U):(V.prototype=U.prototype,new V)},r=Object.assign||function(L){for(var U,V=1,N=arguments.length;V=0;M--)(R=L[M])&&(S=(C<3?R(S):C>3?R(U,V,S):R(U,V))||S);return C>3&&S&&Object.defineProperty(U,V,S),S},i=function(L,U){return function(V,N){U(V,N,L)}},o=function(L,U){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(L,U)},a=function(L,U,V,N){function C(S){return S instanceof V?S:new V(function(R){R(S)})}return new(V||(V=Promise))(function(S,R){function M(F){try{I(N.next(F))}catch(D){R(D)}}function _(F){try{I(N.throw(F))}catch(D){R(D)}}function I(F){F.done?S(F.value):C(F.value).then(M,_)}I((N=N.apply(L,U||[])).next())})},l=function(L,U){var V={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},N,C,S,R;return R={next:M(0),throw:M(1),return:M(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function M(I){return function(F){return _([I,F])}}function _(I){if(N)throw new TypeError("Generator is already executing.");for(;V;)try{if(N=1,C&&(S=I[0]&2?C.return:I[0]?C.throw||((S=C.return)&&S.call(C),0):C.next)&&!(S=S.call(C,I[1])).done)return S;switch(C=0,S&&(I=[I[0]&2,S.value]),I[0]){case 0:case 1:S=I;break;case 4:return V.label++,{value:I[1],done:!1};case 5:V.label++,C=I[1],I=[0];continue;case 7:I=V.ops.pop(),V.trys.pop();continue;default:if(S=V.trys,!(S=S.length>0&&S[S.length-1])&&(I[0]===6||I[0]===2)){V=0;continue}if(I[0]===3&&(!S||I[1]>S[0]&&I[1]=L.length&&(L=void 0),{value:L&&L[N++],done:!L}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(L,U){var V=typeof Symbol=="function"&&L[Symbol.iterator];if(!V)return L;var N=V.call(L),C,S=[],R;try{for(;(U===void 0||U-- >0)&&!(C=N.next()).done;)S.push(C.value)}catch(M){R={error:M}}finally{try{C&&!C.done&&(V=N.return)&&V.call(N)}finally{if(R)throw R.error}}return S},d=function(){for(var L=[],U=0;U1||M($,j)})})}function M($,j){try{_(N[$](j))}catch(G){D(S[0][3],G)}}function _($){$.value instanceof v?Promise.resolve($.value.v).then(I,F):D(S[0][2],$)}function I($){M("next",$)}function F($){M("throw",$)}function D($,j){$(j),S.shift(),S.length&&M(S[0][0],S[0][1])}},g=function(L){var U,V;return U={},N("next"),N("throw",function(C){throw C}),N("return"),U[Symbol.iterator]=function(){return this},U;function N(C,S){U[C]=L[C]?function(R){return(V=!V)?{value:v(L[C](R)),done:C==="return"}:S?S(R):R}:S}},b=function(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=L[Symbol.asyncIterator],V;return U?U.call(L):(L=typeof f=="function"?f(L):L[Symbol.iterator](),V={},N("next"),N("throw"),N("return"),V[Symbol.asyncIterator]=function(){return this},V);function N(S){V[S]=L[S]&&function(R){return new Promise(function(M,_){R=L[S](R),C(M,_,R.done,R.value)})}}function C(S,R,M,_){Promise.resolve(_).then(function(I){S({value:I,done:M})},R)}},p=function(L,U){return Object.defineProperty?Object.defineProperty(L,"raw",{value:U}):L.raw=U,L},w=function(L){if(L&&L.__esModule)return L;var U={};if(L!=null)for(var V in L)Object.hasOwnProperty.call(L,V)&&(U[V]=L[V]);return U.default=L,U},E=function(L){return L&&L.__esModule?L:{default:L}},k=function(L,U){if(!U.has(L))throw new TypeError("attempted to get private field on non-instance");return U.get(L)},A=function(L,U,V){if(!U.has(L))throw new TypeError("attempted to set private field on non-instance");return U.set(L,V),V},T("__extends",e),T("__assign",r),T("__rest",n),T("__decorate",s),T("__param",i),T("__metadata",o),T("__awaiter",a),T("__generator",l),T("__exportStar",c),T("__createBinding",x),T("__values",f),T("__read",u),T("__spread",d),T("__spreadArrays",h),T("__await",v),T("__asyncGenerator",y),T("__asyncDelegator",g),T("__asyncValues",b),T("__makeTemplateObject",p),T("__importStar",w),T("__importDefault",E),T("__classPrivateFieldGet",k),T("__classPrivateFieldSet",A)})})(W3e);var UE={},b1={},xI;function H3e(){if(xI)return b1;xI=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return b1.delay=t,b1}var Ac={},zE={},_c={},CI;function G3e(){return CI||(CI=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.ONE_THOUSAND=_c.ONE_HUNDRED=void 0,_c.ONE_HUNDRED=100,_c.ONE_THOUSAND=1e3),_c}var VE={},EI;function K3e(){return EI||(EI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(VE)),VE}var SI;function gG(){return SI||(SI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(G3e(),t),e.__exportStar(K3e(),t)}(zE)),zE}var kI;function Q3e(){if(kI)return Ac;kI=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.fromMiliseconds=Ac.toMiliseconds=void 0;const t=gG();function e(n){return n*t.ONE_THOUSAND}Ac.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Ac.fromMiliseconds=r,Ac}var $I;function Y3e(){return $I||($I=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(H3e(),t),e.__exportStar(Q3e(),t)}(UE)),UE}var yu={},AI;function J3e(){if(AI)return yu;AI=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const s=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:s})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return yu.Watch=t,yu.default=t,yu}var qE={},w1={},_I;function X3e(){if(_I)return w1;_I=1,Object.defineProperty(w1,"__esModule",{value:!0}),w1.IWatch=void 0;class t{}return w1.IWatch=t,w1}var PI;function Z3e(){return PI||(PI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zd.__exportStar(X3e(),t)}(qE)),qE}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(Y3e(),t),e.__exportStar(J3e(),t),e.__exportStar(Z3e(),t),e.__exportStar(gG(),t)})(cf);var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.getLocalStorage=yt.getLocalStorageOrThrow=yt.getCrypto=yt.getCryptoOrThrow=wG=yt.getLocation=yt.getLocationOrThrow=$A=yt.getNavigator=yt.getNavigatorOrThrow=bG=yt.getDocument=yt.getDocumentOrThrow=yt.getFromWindowOrThrow=yt.getFromWindow=void 0;function Gf(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}yt.getFromWindow=Gf;function Fh(t){const e=Gf(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}yt.getFromWindowOrThrow=Fh;function eSe(){return Fh("document")}yt.getDocumentOrThrow=eSe;function tSe(){return Gf("document")}var bG=yt.getDocument=tSe;function rSe(){return Fh("navigator")}yt.getNavigatorOrThrow=rSe;function nSe(){return Gf("navigator")}var $A=yt.getNavigator=nSe;function sSe(){return Fh("location")}yt.getLocationOrThrow=sSe;function iSe(){return Gf("location")}var wG=yt.getLocation=iSe;function oSe(){return Fh("crypto")}yt.getCryptoOrThrow=oSe;function aSe(){return Gf("crypto")}yt.getCrypto=aSe;function lSe(){return Fh("localStorage")}yt.getLocalStorageOrThrow=lSe;function cSe(){return Gf("localStorage")}yt.getLocalStorage=cSe;var AA={};Object.defineProperty(AA,"__esModule",{value:!0});var xG=AA.getWindowMetadata=void 0;const TI=yt;function fSe(){let t,e;try{t=TI.getDocumentOrThrow(),e=TI.getLocationOrThrow()}catch{return null}function r(){const u=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const g=v.getAttribute("href");if(g)if(g.toLowerCase().indexOf("https:")===-1&&g.toLowerCase().indexOf("http:")===-1&&g.indexOf("//")!==0){let b=e.protocol+"//"+e.host;if(g.indexOf("/")===0)b+=g;else{const p=e.pathname.split("/");p.pop();const w=p.join("/");b+=w+"/"+g}d.push(b)}else if(g.indexOf("//")===0){const b=e.protocol+g;d.push(b)}else d.push(g)}}return d}function n(...u){const d=t.getElementsByTagName("meta");for(let h=0;hv.getAttribute(g)).filter(g=>g?u.includes(g):!1);if(y.length&&y){const g=v.getAttribute("content");if(g)return g}}return""}function s(){let u=n("name","og:site_name","og:title","twitter:title");return u||(u=t.title),u}function i(){return n("description","og:description","twitter:description","keywords")}const o=s(),a=i(),l=e.origin,c=r();return{description:a,url:l,icons:c,name:o}}xG=AA.getWindowMetadata=fSe;var Ly={},uSe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),CG="%[a-f0-9]{2}",RI=new RegExp("("+CG+")|([^%]+?)","gi"),II=new RegExp("("+CG+")+","gi");function PS(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],PS(r),PS(n))}function dSe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(RI)||[],r=1;r{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},mSe=function(t,e){for(var r={},n=Object.keys(t),s=Array.isArray(e),i=0;ip==null,o=Symbol("encodeFragmentIdentifier");function a(p){switch(p.arrayFormat){case"index":return w=>(E,k)=>{const A=E.length;return k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[",A,"]"].join("")]:[...E,[f(w,p),"[",f(A,p),"]=",f(k,p)].join("")]};case"bracket":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[]"].join("")]:[...E,[f(w,p),"[]=",f(k,p)].join("")];case"colon-list-separator":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),":list="].join("")]:[...E,[f(w,p),":list=",f(k,p)].join("")];case"comma":case"separator":case"bracket-separator":{const w=p.arrayFormat==="bracket-separator"?"[]=":"=";return E=>(k,A)=>A===void 0||p.skipNull&&A===null||p.skipEmptyString&&A===""?k:(A=A===null?"":A,k.length===0?[[f(E,p),w,f(A,p)].join("")]:[[k,f(A,p)].join(p.arrayFormatSeparator)])}default:return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,f(w,p)]:[...E,[f(w,p),"=",f(k,p)].join("")]}}function l(p){let w;switch(p.arrayFormat){case"index":return(E,k,A)=>{if(w=/\[(\d*)\]$/.exec(E),E=E.replace(/\[\d*\]$/,""),!w){A[E]=k;return}A[E]===void 0&&(A[E]={}),A[E][w[1]]=k};case"bracket":return(E,k,A)=>{if(w=/(\[\])$/.exec(E),E=E.replace(/\[\]$/,""),!w){A[E]=k;return}if(A[E]===void 0){A[E]=[k];return}A[E]=[].concat(A[E],k)};case"colon-list-separator":return(E,k,A)=>{if(w=/(:list)$/.exec(E),E=E.replace(/:list$/,""),!w){A[E]=k;return}if(A[E]===void 0){A[E]=[k];return}A[E]=[].concat(A[E],k)};case"comma":case"separator":return(E,k,A)=>{const x=typeof k=="string"&&k.includes(p.arrayFormatSeparator),T=typeof k=="string"&&!x&&u(k,p).includes(p.arrayFormatSeparator);k=T?u(k,p):k;const B=x||T?k.split(p.arrayFormatSeparator).map(L=>u(L,p)):k===null?k:u(k,p);A[E]=B};case"bracket-separator":return(E,k,A)=>{const x=/(\[\])$/.test(E);if(E=E.replace(/\[\]$/,""),!x){A[E]=k&&u(k,p);return}const T=k===null?[]:k.split(p.arrayFormatSeparator).map(B=>u(B,p));if(A[E]===void 0){A[E]=T;return}A[E]=[].concat(A[E],T)};default:return(E,k,A)=>{if(A[E]===void 0){A[E]=k;return}A[E]=[].concat(A[E],k)}}}function c(p){if(typeof p!="string"||p.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(p,w){return w.encode?w.strict?e(p):encodeURIComponent(p):p}function u(p,w){return w.decode?r(p):p}function d(p){return Array.isArray(p)?p.sort():typeof p=="object"?d(Object.keys(p)).sort((w,E)=>Number(w)-Number(E)).map(w=>p[w]):p}function h(p){const w=p.indexOf("#");return w!==-1&&(p=p.slice(0,w)),p}function v(p){let w="";const E=p.indexOf("#");return E!==-1&&(w=p.slice(E)),w}function y(p){p=h(p);const w=p.indexOf("?");return w===-1?"":p.slice(w+1)}function g(p,w){return w.parseNumbers&&!Number.isNaN(Number(p))&&typeof p=="string"&&p.trim()!==""?p=Number(p):w.parseBooleans&&p!==null&&(p.toLowerCase()==="true"||p.toLowerCase()==="false")&&(p=p.toLowerCase()==="true"),p}function b(p,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const E=l(w),k=Object.create(null);if(typeof p!="string"||(p=p.trim().replace(/^[?#&]/,""),!p))return k;for(const A of p.split("&")){if(A==="")continue;let[x,T]=n(w.decode?A.replace(/\+/g," "):A,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?T:u(T,w),E(u(x,w),T,k)}for(const A of Object.keys(k)){const x=k[A];if(typeof x=="object"&&x!==null)for(const T of Object.keys(x))x[T]=g(x[T],w);else k[A]=g(x,w)}return w.sort===!1?k:(w.sort===!0?Object.keys(k).sort():Object.keys(k).sort(w.sort)).reduce((A,x)=>{const T=k[x];return Boolean(T)&&typeof T=="object"&&!Array.isArray(T)?A[x]=d(T):A[x]=T,A},Object.create(null))}t.extract=y,t.parse=b,t.stringify=(p,w)=>{if(!p)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const E=T=>w.skipNull&&i(p[T])||w.skipEmptyString&&p[T]==="",k=a(w),A={};for(const T of Object.keys(p))E(T)||(A[T]=p[T]);const x=Object.keys(A);return w.sort!==!1&&x.sort(w.sort),x.map(T=>{const B=p[T];return B===void 0?"":B===null?f(T,w):Array.isArray(B)?B.length===0&&w.arrayFormat==="bracket-separator"?f(T,w)+"[]":B.reduce(k(T),[]).join("&"):f(T,w)+"="+f(B,w)}).filter(T=>T.length>0).join("&")},t.parseUrl=(p,w)=>{w=Object.assign({decode:!0},w);const[E,k]=n(p,"#");return Object.assign({url:E.split("?")[0]||"",query:b(y(p),w)},w&&w.parseFragmentIdentifier&&k?{fragmentIdentifier:u(k,w)}:{})},t.stringifyUrl=(p,w)=>{w=Object.assign({encode:!0,strict:!0,[o]:!0},w);const E=h(p.url).split("?")[0]||"",k=t.extract(p.url),A=t.parse(k,{sort:!1}),x=Object.assign(A,p.query);let T=t.stringify(x,w);T&&(T=`?${T}`);let B=v(p.url);return p.fragmentIdentifier&&(B=`#${w[o]?f(p.fragmentIdentifier,w):p.fragmentIdentifier}`),`${E}${T}${B}`},t.pick=(p,w,E)=>{E=Object.assign({parseFragmentIdentifier:!0,[o]:!1},E);const{url:k,query:A,fragmentIdentifier:x}=t.parseUrl(p,E);return t.stringifyUrl({url:k,query:s(A,w),fragmentIdentifier:x},E)},t.exclude=(p,w,E)=>{const k=Array.isArray(w)?A=>!w.includes(A):(A,x)=>!w(A,x);return t.pick(p,k,E)}})(Ly);const pSe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function hWe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const s=t[n];r.push(...s.accounts)}),r}function EG(t,e){return t.includes(":")?[t]:e.chains||[]}const SG="base10",cs="base16",TS="base64pad",_A="utf8",kG=0,D0=1,gSe=0,OI=1,RS=12,PA=32;function vWe(){const t=SA.generateKeyPair();return{privateKey:qi(t.secretKey,cs),publicKey:qi(t.publicKey,cs)}}function yWe(){const t=nx.randomBytes(PA);return qi(t,cs)}function mWe(t,e){const r=SA.sharedKey(Ii(t,cs),Ii(e,cs)),n=new _6e(ax.SHA256,r).expand(PA);return qi(n,cs)}function pWe(t){const e=ax.hash(Ii(t,cs));return qi(e,cs)}function gWe(t){const e=ax.hash(Ii(t,_A));return qi(e,cs)}function bSe(t){return Ii(`${t}`,SG)}function cx(t){return Number(qi(t,SG))}function bWe(t){const e=bSe(typeof t.type<"u"?t.type:kG);if(cx(e)===D0&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Ii(t.senderPublicKey,cs):void 0,n=typeof t.iv<"u"?Ii(t.iv,cs):nx.randomBytes(RS),s=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)).seal(n,Ii(t.message,_A));return wSe({type:e,sealed:s,iv:n,senderPublicKey:r})}function wWe(t){const e=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)),{sealed:r,iv:n}=$G(t.encoded),s=e.open(n,r);if(s===null)throw new Error("Failed to decrypt");return qi(s,_A)}function wSe(t){if(cx(t.type)===D0){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return qi(vI([t.type,t.senderPublicKey,t.iv,t.sealed]),TS)}return qi(vI([t.type,t.iv,t.sealed]),TS)}function $G(t){const e=Ii(t,TS),r=e.slice(gSe,OI),n=OI;if(cx(r)===D0){const a=n+PA,l=a+RS,c=e.slice(n,a),f=e.slice(a,l),u=e.slice(l);return{type:r,sealed:u,iv:f,senderPublicKey:c}}const s=n+RS,i=e.slice(n,s),o=e.slice(s);return{type:r,sealed:o,iv:i}}function xWe(t,e){const r=$G(t);return xSe({type:cx(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?qi(r.senderPublicKey,cs):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function xSe(t){const e=(t==null?void 0:t.type)||kG;if(e===D0){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function CWe(t){return t.type===D0&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var CSe=Object.defineProperty,MI=Object.getOwnPropertySymbols,ESe=Object.prototype.hasOwnProperty,SSe=Object.prototype.propertyIsEnumerable,DI=(t,e,r)=>e in t?CSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,NI=(t,e)=>{for(var r in e||(e={}))ESe.call(e,r)&&DI(t,r,e[r]);if(MI)for(var r of MI(e))SSe.call(e,r)&&DI(t,r,e[r]);return t};const kSe="ReactNative",pl={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},$Se="js";function AG(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function ASe(){return!bG()&&!!$A()&&navigator.product===kSe}function _Se(){return!AG()&&!!$A()}function TA(){return ASe()?pl.reactNative:AG()?pl.node:_Se()?pl.browser:pl.unknown}function PSe(t,e){let r=Ly.parse(t);return r=NI(NI({},r),e),t=Ly.stringify(r),t}function EWe(){return xG()||{name:"",description:"",url:"",icons:[""]}}function TSe(){if(TA()===pl.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=B3e();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function RSe(){var t;const e=TA();return e===pl.browser?[e,((t=wG())==null?void 0:t.host)||"unknown"].join(":"):e}function ISe(t,e,r){const n=TSe(),s=RSe();return[[t,e].join("-"),[$Se,r].join("-"),n,s].join("/")}function SWe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:s,projectId:i,useOnCloseEvent:o}){const a=r.split("?"),l=ISe(t,e,n),c={auth:s,ua:l,projectId:i,useOnCloseEvent:o||void 0},f=PSe(a[1]||"",c);return a[0]+"?"+f}function Xc(t,e){return t.filter(r=>e.includes(r)).length===t.length}function kWe(t){return Object.fromEntries(t.entries())}function $We(t){return new Map(Object.entries(t))}function AWe(t=cf.FIVE_MINUTES,e){const r=cf.toMiliseconds(t||cf.FIVE_MINUTES);let n,s,i;return{resolve:o=>{i&&n&&(clearTimeout(i),n(o))},reject:o=>{i&&s&&(clearTimeout(i),s(o))},done:()=>new Promise((o,a)=>{i=setTimeout(()=>{a(new Error(e))},r),n=o,s=a})}}function _We(t,e,r){return new Promise(async(n,s)=>{const i=setTimeout(()=>s(new Error(r)),e);try{const o=await t;n(o)}catch(o){s(o)}clearTimeout(i)})}function _G(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function PWe(t){return _G("topic",t)}function TWe(t){return _G("id",t)}function RWe(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function IWe(t,e){return cf.fromMiliseconds((e||Date.now())+cf.toMiliseconds(t))}function OWe(t){return Date.now()>=cf.toMiliseconds(t)}function MWe(t,e){return`${t}${e?`:${e}`:""}`}function WE(t=[],e=[]){return[...new Set([...t,...e])]}async function DWe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let s=n==null?void 0:n.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));const i=`${s}/wc?requestId=${t}&sessionTopic=${e}`,o=TA();o===pl.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):o===pl.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(i)}catch(n){console.error(n)}}const OSe="irn";function NWe(t){return(t==null?void 0:t.relay)||{protocol:OSe}}function LWe(t){const e=pSe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var MSe=Object.defineProperty,LI=Object.getOwnPropertySymbols,DSe=Object.prototype.hasOwnProperty,NSe=Object.prototype.propertyIsEnumerable,jI=(t,e,r)=>e in t?MSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,LSe=(t,e)=>{for(var r in e||(e={}))DSe.call(e,r)&&jI(t,r,e[r]);if(LI)for(var r of LI(e))NSe.call(e,r)&&jI(t,r,e[r]);return t};function jSe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(s=>{if(s.startsWith(n)){const i=s.replace(n,""),o=t[s];r[i]=o}}),r}function jWe(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),s=t.substring(e+1,r).split("@"),i=typeof r<"u"?t.substring(r):"",o=Ly.parse(i);return{protocol:n,topic:FSe(s[0]),version:parseInt(s[1],10),symKey:o.symKey,relay:jSe(o)}}function FSe(t){return t.startsWith("//")?t.substring(2):t}function BSe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(s=>{const i=r+e+s;t[s]&&(n[i]=t[s])}),n}function FWe(t){return`${t.protocol}:${t.topic}@${t.version}?`+Ly.stringify(LSe({symKey:t.symKey},BSe(t.relay)))}var USe=Object.defineProperty,zSe=Object.defineProperties,VSe=Object.getOwnPropertyDescriptors,FI=Object.getOwnPropertySymbols,qSe=Object.prototype.hasOwnProperty,WSe=Object.prototype.propertyIsEnumerable,BI=(t,e,r)=>e in t?USe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,HSe=(t,e)=>{for(var r in e||(e={}))qSe.call(e,r)&&BI(t,r,e[r]);if(FI)for(var r of FI(e))WSe.call(e,r)&&BI(t,r,e[r]);return t},GSe=(t,e)=>zSe(t,VSe(e));function Bh(t){const e=[];return t.forEach(r=>{const[n,s]=r.split(":");e.push(`${n}:${s}`)}),e}function KSe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Bh(r.accounts))}),e}function QSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.methods)}),r}function YSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.events)}),r}function BWe(t,e){const r=oke(t,e);if(r)throw new Error(r.message);const n={};for(const[s,i]of Object.entries(t))n[s]={methods:i.methods,events:i.events,chains:i.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function PG(t){return t.includes(":")}function JSe(t){return PG(t)?t.split(":")[0]:t}function TG(t){var e,r,n;const s={};if(!RA(t))return s;for(const[i,o]of Object.entries(t)){const a=PG(i)?[i]:o.chains,l=o.methods||[],c=o.events||[],f=JSe(i);s[f]=GSe(HSe({},s[f]),{chains:WE(a,(e=s[f])==null?void 0:e.chains),methods:WE(l,(r=s[f])==null?void 0:r.methods),events:WE(c,(n=s[f])==null?void 0:n.events)})}return s}const XSe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},ZSe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function cl(t,e){const{message:r,code:n}=ZSe[t];return{message:e?`${r} ${e}`:r,code:n}}function eh(t,e){const{message:r,code:n}=XSe[t];return{message:e?`${r} ${e}`:r,code:n}}function fx(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function RA(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function ff(t){return typeof t>"u"}function di(t,e){return e&&ff(t)?!0:typeof t=="string"&&!!t.trim().length}function IA(t,e){return e&&ff(t)?!0:typeof t=="number"&&!isNaN(t)}function UWe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),s=Object.keys(r);let i=!0;return Xc(s,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:c}=t.namespaces[o],f=Bh(a),u=r[o];(!Xc(EG(o,u),f)||!Xc(u.methods,l)||!Xc(u.events,c))&&(i=!1)}),i):!1}function Rb(t){return di(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function eke(t){if(di(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Rb(r)}}return!1}function zWe(t){if(di(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function VWe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function qWe(t){return t==null?void 0:t.topic}function WWe(t,e){let r=null;return di(t==null?void 0:t.publicKey,!1)||(r=cl("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function UI(t){let e=!0;return fx(t)?t.length&&(e=t.every(r=>di(r,!1))):e=!1,e}function tke(t,e,r){let n=null;return fx(e)&&e.length?e.forEach(s=>{n||Rb(s)||(n=eh("UNSUPPORTED_CHAINS",`${r}, chain ${s} should be a string and conform to "namespace:chainId" format`))}):Rb(t)||(n=eh("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function rke(t,e,r){let n=null;return Object.entries(t).forEach(([s,i])=>{if(n)return;const o=tke(s,EG(s,i),`${e} ${r}`);o&&(n=o)}),n}function nke(t,e){let r=null;return fx(t)?t.forEach(n=>{r||eke(n)||(r=eh("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=eh("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function ske(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=nke(n==null?void 0:n.accounts,`${e} namespace`);s&&(r=s)}),r}function ike(t,e){let r=null;return UI(t==null?void 0:t.methods)?UI(t==null?void 0:t.events)||(r=eh("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=eh("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function RG(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ike(n,`${e}, namespace`);s&&(r=s)}),r}function HWe(t,e,r){let n=null;if(t&&RA(t)){const s=RG(t,e);s&&(n=s);const i=rke(t,e,r);i&&(n=i)}else n=cl("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function oke(t,e){let r=null;if(t&&RA(t)){const n=RG(t,e);n&&(r=n);const s=ske(t,e);s&&(r=s)}else r=cl("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function ake(t){return di(t.protocol,!0)}function GWe(t,e){let r=!1;return e&&!t?r=!0:t&&fx(t)&&t.length&&t.forEach(n=>{r=ake(n)}),r}function KWe(t){return typeof t=="number"}function QWe(t){return typeof t<"u"&&typeof t!==null}function YWe(t){return!(!t||typeof t!="object"||!t.code||!IA(t.code,!1)||!t.message||!di(t.message,!1))}function JWe(t){return!(ff(t)||!di(t.method,!1))}function XWe(t){return!(ff(t)||ff(t.result)&&ff(t.error)||!IA(t.id,!1)||!di(t.jsonrpc,!1))}function ZWe(t){return!(ff(t)||!di(t.name,!1))}function eHe(t,e){return!(!Rb(e)||!KSe(t).includes(e))}function tHe(t,e,r){return di(r,!1)?QSe(t,e).includes(r):!1}function rHe(t,e,r){return di(r,!1)?YSe(t,e).includes(r):!1}function nHe(t,e,r){let n=null;const s=lke(t),i=cke(e),o=Object.keys(s),a=Object.keys(i),l=zI(Object.keys(t)),c=zI(Object.keys(e)),f=l.filter(u=>!c.includes(u));return f.length&&(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. Required: ${f.toString()} Received: ${Object.keys(e).toString()}`)),Xc(o,a)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. Required: ${o.toString()} Approved: ${a.toString()}`)),Object.keys(e).forEach(u=>{if(!u.includes(":")||n)return;const d=Bh(e[u].accounts);d.includes(u)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${u} Required: ${u} - Approved: ${d.toString()}`))}),o.forEach(u=>{n||(Xc(s[u].methods,i[u].methods)?Xc(s[u].events,i[u].events)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${u}`)):n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${u}`))}),n}function fke(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(s=>{e[s]={methods:t[r].methods,events:t[r].events}})}),e}function zI(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function uke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Bh(t[r].accounts);n==null||n.forEach(s=>{e[s]={accounts:t[r].accounts.filter(i=>i.includes(`${s}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function aHe(t,e){return IA(t,!1)&&t<=e.max&&t>=e.min}var IG="eip155",dke="store",OG="requestedChains",IS="wallet_addEthereumChain",lr,wv,Wp,OS,OA,MG,Hp,MS,DS,DG,Ib,MA,_u,j1,Ob,DA,Mb,NA,Db,LA,hke=class extends V${constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),ps(this,Wp),ps(this,OA),ps(this,Hp),ps(this,DS),ps(this,Ib),ps(this,_u),ps(this,Ob),ps(this,Mb),ps(this,Db),ar(this,"id","walletConnect"),ar(this,"name","WalletConnect"),ar(this,"ready",!0),ps(this,lr,void 0),ps(this,wv,void 0),ar(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(e[0])})}),ar(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),ar(this,"onDisconnect",()=>{Qr(this,_u,j1).call(this,[]),this.emit("disconnect")}),ar(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),ar(this,"onConnect",()=>{this.emit("connect",{})}),Qr(this,Wp,OS).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,s,i,o;try{let a=t;if(!a){const v=(r=this.storage)==null?void 0:r.getItem(dke),y=(i=(s=(n=v==null?void 0:v.state)==null?void 0:n.data)==null?void 0:s.chain)==null?void 0:i.id;y&&!this.isChainUnsupported(y)?a=y:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const l=await this.getProvider();Qr(this,DS,DG).call(this);const c=Qr(this,Hp,MS).call(this);if(l.session&&c&&await l.disconnect(),!l.session||c){const v=this.chains.filter(y=>y.id!==a).map(y=>y.id);this.emit("message",{type:"connecting"}),await l.connect({pairingTopic:e,chains:[a],optionalChains:v.length?v:void 0}),Qr(this,_u,j1).call(this,this.chains.map(({id:y})=>y))}const f=await l.enable(),u=Tl(f[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:u,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new Sn(a):a}}async disconnect(){const t=await this.getProvider();try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{Qr(this,Ib,MA).call(this),Qr(this,_u,j1).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Tl(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return er(this,lr)||await Qr(this,Wp,OS).call(this),t&&await this.switchChain(t),er(this,lr)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Qr(this,Hp,MS).call(this);if(!t)return!1;if(r&&e.session){try{await e.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(t){var r,n;const e=this.chains.find(s=>s.id===t);if(!e)throw new Vl(new Error("chain not found on connector."));try{const s=await this.getProvider(),i=Qr(this,Mb,NA).call(this),o=Qr(this,Db,LA).call(this);if(!i.includes(t)&&o.includes(IS)){await s.request({method:IS,params:[{chainId:We(e.id),blockExplorerUrls:[(n=(r=e.blockExplorers)==null?void 0:r.default)==null?void 0:n.url],chainName:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:[...e.rpcUrls.default.http]}]});const l=Qr(this,Ob,DA).call(this);l.push(t),Qr(this,_u,j1).call(this,l)}return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:We(t)}]}),e}catch(s){const i=typeof s=="string"?s:s==null?void 0:s.message;throw/user rejected request/i.test(i)?new Sn(s):new Vl(s)}}};lr=new WeakMap;wv=new WeakMap;Wp=new WeakSet;OS=async function(){return!er(this,wv)&&typeof window<"u"&&pw(this,wv,Qr(this,OA,MG).call(this)),er(this,wv)};OA=new WeakSet;MG=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await xz(()=>import("./index.es-d71ec09d.js"),[],import.meta.url),[n,...s]=this.chains.map(({id:i})=>i);if(n){const{projectId:i,showQrModal:o=!0,qrModalOptions:a,metadata:l,relayUrl:c}=this.options;pw(this,lr,await t.init({showQrModal:o,qrModalOptions:a,projectId:i,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:s.length?s:void 0,rpcMap:Object.fromEntries(this.chains.map(f=>[f.id,f.rpcUrls.default.http[0]])),metadata:l,relayUrl:c}))}};Hp=new WeakSet;MS=function(){if(Qr(this,Db,LA).call(this).includes(IS)||!this.options.isNewChainsStale)return!1;const e=Qr(this,Ob,DA).call(this),r=this.chains.map(({id:s})=>s),n=Qr(this,Mb,NA).call(this);return n.length&&!n.some(s=>r.includes(s))?!1:!r.every(s=>e.includes(s))};DS=new WeakSet;DG=function(){er(this,lr)&&(Qr(this,Ib,MA).call(this),er(this,lr).on("accountsChanged",this.onAccountsChanged),er(this,lr).on("chainChanged",this.onChainChanged),er(this,lr).on("disconnect",this.onDisconnect),er(this,lr).on("session_delete",this.onDisconnect),er(this,lr).on("display_uri",this.onDisplayUri),er(this,lr).on("connect",this.onConnect))};Ib=new WeakSet;MA=function(){er(this,lr)&&(er(this,lr).removeListener("accountsChanged",this.onAccountsChanged),er(this,lr).removeListener("chainChanged",this.onChainChanged),er(this,lr).removeListener("disconnect",this.onDisconnect),er(this,lr).removeListener("session_delete",this.onDisconnect),er(this,lr).removeListener("display_uri",this.onDisplayUri),er(this,lr).removeListener("connect",this.onConnect))};_u=new WeakSet;j1=function(t){var e;(e=this.storage)==null||e.setItem(OG,t)};Ob=new WeakSet;DA=function(){var t;return((t=this.storage)==null?void 0:t.getItem(OG))??[]};Mb=new WeakSet;NA=function(){var n,s,i;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((i=(s=TG(t)[IG])==null?void 0:s.chains)==null?void 0:i.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Db=new WeakSet;LA=function(){var n,s;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((s=TG(t)[IG])==null?void 0:s.methods)??[]:[]};const jA=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ux=m.createContext({});function vke(){return m.useContext(ux).visualElement}const dx=m.createContext(null),hx=typeof document<"u",VI=hx?m.useLayoutEffect:m.useEffect,NG=m.createContext({strict:!1});function yke(t,e,r,n){const s=vke(),i=m.useContext(NG),o=m.useContext(dx),a=m.useContext(jA).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return VI(()=>{c&&c.render()}),(window.HandoffAppearAnimations?VI:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Ku(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mke(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Ku(r)&&(r.current=n))},[e])}function jy(t){return typeof t=="string"||Array.isArray(t)}function vx(t){return typeof t=="object"&&typeof t.start=="function"}const pke=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function yx(t){return vx(t.animate)||pke.some(e=>jy(t[e]))}function LG(t){return Boolean(yx(t)||t.variants)}function gke(t,e){if(yx(t)){const{initial:r,animate:n}=t;return{initial:r===!1||jy(r)?r:void 0,animate:jy(n)?n:void 0}}return t.inherit!==!1?e:{}}function bke(t){const{initial:e,animate:r}=gke(t,m.useContext(ux));return m.useMemo(()=>({initial:e,animate:r}),[qI(e),qI(r)])}function qI(t){return Array.isArray(t)?t.join(" "):t}const zo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Fy={measureLayout:zo(["layout","layoutId","drag"]),animation:zo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:zo(["exit"]),drag:zo(["drag","dragControls"]),focus:zo(["whileFocus"]),hover:zo(["whileHover","onHoverStart","onHoverEnd"]),tap:zo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:zo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:zo(["whileInView","onViewportEnter","onViewportLeave"])};function wke(t){for(const e in t)e==="projectionNodeConstructor"?Fy.projectionNodeConstructor=t[e]:Fy[e].Component=t[e]}function FA(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const xv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let xke=1;function Cke(){return FA(()=>{if(xv.hasEverUpdated)return xke++})}const jG=m.createContext({});class Eke extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const FG=m.createContext({}),Ske=Symbol.for("motionComponentSymbol");function kke({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&wke(t);function o(l,c){const f={...m.useContext(jA),...l,layoutId:$ke(l)},{isStatic:u}=f;let d=null;const h=bke(l),v=u?void 0:Cke(),y=s(l,u);if(!u&&hx){h.visualElement=yke(i,y,f,e);const g=m.useContext(NG).strict,b=m.useContext(FG);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Fy.projectionNodeConstructor,b))}return m.createElement(Eke,{visualElement:h.visualElement,props:f},d,m.createElement(ux.Provider,{value:h},n(i,l,v,mke(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Ske]=i,a}function $ke({layoutId:t}){const e=m.useContext(jG).id;return e&&t!==void 0?e+"-"+t:t}function Ake(t){function e(n,s={}){return kke(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const _ke=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function BA(t){return typeof t!="string"||t.includes("-")?!1:!!(_ke.indexOf(t)>-1||/[A-Z]/.test(t))}const Nb={};function Pke(t){Object.assign(Nb,t)}const Lb=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Uh=new Set(Lb);function BG(t,{layout:e,layoutId:r}){return Uh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Nb[t]||t==="opacity")}const ds=t=>!!(t!=null&&t.getVelocity),Tke={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rke=(t,e)=>Lb.indexOf(t)-Lb.indexOf(e);function Ike({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Rke);for(const a of e)o+=`${Tke[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function UG(t){return t.startsWith("--")}const Oke=(t,e)=>e&&typeof t=="number"?e.transform(t):t,th=(t,e,r)=>Math.min(Math.max(r,t),e),Kf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Cv={...Kf,transform:t=>th(0,1,t)},jm={...Kf,default:1},Ev=t=>Math.round(t*1e5)/1e5,By=/(-)?([\d]*\.?[\d])+/g,NS=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mke=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function N0(t){return typeof t=="string"}const L0=t=>({test:e=>N0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Qa=L0("deg"),Ao=L0("%"),Ee=L0("px"),Dke=L0("vh"),Nke=L0("vw"),WI={...Ao,parse:t=>Ao.parse(t)/100,transform:t=>Ao.transform(t*100)},HI={...Kf,transform:Math.round},zG={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,size:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,rotate:Qa,rotateX:Qa,rotateY:Qa,rotateZ:Qa,scale:jm,scaleX:jm,scaleY:jm,scaleZ:jm,skew:Qa,skewX:Qa,skewY:Qa,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Cv,originX:WI,originY:WI,originZ:Ee,zIndex:HI,fillOpacity:Cv,strokeOpacity:Cv,numOctaves:HI};function UA(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(UG(d)){i[d]=h;continue}const v=zG[d],y=Oke(h,v);if(Uh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Ike(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const zA=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function VG(t,e,r){for(const n in e)!ds(e[n])&&!BG(n,r)&&(t[n]=e[n])}function Lke({transformTemplate:t},e,r){return m.useMemo(()=>{const n=zA();return UA(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function jke(t,e,r){const n=t.style||{},s={};return VG(s,n,t),Object.assign(s,Lke(t,e,r)),t.transformValues?t.transformValues(s):s}function Fke(t,e,r){const n={},s=jke(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const Bke=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function jb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Bke.has(t)}let qG=t=>!jb(t);function Uke(t){t&&(qG=e=>e.startsWith("on")?!jb(e):t(e))}try{Uke(require("@emotion/is-prop-valid").default)}catch{}function zke(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(qG(s)||r===!0&&jb(s)||!e&&!jb(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function GI(t,e,r){return typeof t=="string"?t:Ee.transform(e+r*t)}function Vke(t,e,r){const n=GI(e,t.x,t.width),s=GI(r,t.y,t.height);return`${n} ${s}`}const qke={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wke={offset:"strokeDashoffset",array:"strokeDasharray"};function Hke(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?qke:Wke;t[i.offset]=Ee.transform(-n);const o=Ee.transform(e),a=Ee.transform(r);t[i.array]=`${o} ${a}`}function VA(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(UA(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Vke(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&Hke(d,i,o,a,!1)}const WG=()=>({...zA(),attrs:{}}),qA=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Gke(t,e,r,n){const s=m.useMemo(()=>{const i=WG();return VA(i,e,{enableHardwareAcceleration:!1},qA(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};VG(i,t.style,t),s.style={...i,...s.style}}return s}function Kke(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(BA(r)?Gke:Fke)(n,o,a,r),u={...zke(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>ds(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const WA=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HG(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const GG=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function KG(t,e,r,n){HG(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(GG.has(s)?s:WA(s),e.attrs[s])}function HA(t,e){const{style:r}=t,n={};for(const s in r)(ds(r[s])||e.style&&ds(e.style[s])||BG(s,t))&&(n[s]=r[s]);return n}function QG(t,e){const r=HA(t,e);for(const n in t)if(ds(t[n])||ds(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function GA(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Fb=t=>Array.isArray(t),Qke=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),Yke=t=>Fb(t)?t[t.length-1]||0:t;function Gp(t){const e=ds(t)?t.get():t;return Qke(e)?e.toValue():e}function Jke({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Xke(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const YG=t=>(e,r)=>{const n=m.useContext(ux),s=m.useContext(dx),i=()=>Jke(t,e,n,s);return r?i():FA(i)};function Xke(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Gp(i[d]);let{initial:o,animate:a}=t;const l=yx(t),c=LG(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!vx(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=GA(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const Zke={useVisualState:YG({scrapeMotionValuesFromProps:QG,createRenderState:WG,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}VA(r,n,{enableHardwareAcceleration:!1},qA(e.tagName),t.transformTemplate),KG(e,r)}})},e8e={useVisualState:YG({scrapeMotionValuesFromProps:HA,createRenderState:zA})};function t8e(t,{forwardMotionProps:e=!1},r,n,s){return{...BA(t)?Zke:e8e,preloadedFeatures:r,useRender:Kke(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var gt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(gt||(gt={}));function mx(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function LS(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return mx(s,e,r,n)},[t,e,r,n])}function r8e({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(gt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(gt.Focus,!1)},[r]);LS(e,"focus",t?n:void 0),LS(e,"blur",t?s:void 0)}const JG=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function KA(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const XG=t=>e=>JG(e)&&t(e,KA(e));function wd(t,e,r,n){return mx(t,e,XG(r),n)}function Bb(t,e,r,n){return LS(t,e,r&&XG(r),n)}function ZG(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const KI=ZG("dragHorizontal"),QI=ZG("dragVertical");function eK(t){let e=!1;if(t==="y")e=QI();else if(t==="x")e=KI();else{const r=KI(),n=QI();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function tK(){const t=eK(!0);return t?(t(),!1):!0}function YI(t,e,r,n){return(s,i)=>{s.type==="touch"||tK()||(r&&t.animationState&&t.animationState.setActive(gt.Hover,e),n&&n(s,i))}}function n8e({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Bb(n,"pointerenter",m.useMemo(()=>t||r?YI(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Bb(n,"pointerleave",m.useMemo(()=>e||r?YI(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const rK=(t,e)=>e?t===e?!0:rK(t,e.parentElement):!1;function nK(t){return m.useEffect(()=>()=>t(),[])}const s8e=(t,e)=>r=>e(t(r)),px=(...t)=>t.reduce(s8e);function i8e({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!1),!tK()}function d(y,g){var b,p,w,E;u()&&(rK(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=px(wd(window,"pointerup",d,c),wd(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Bb(s,"pointerdown",o?v:void 0,c),nK(f)}const jS=new WeakMap,HE=new WeakMap,o8e=t=>{const e=jS.get(t.target);e&&e(t)},a8e=t=>{t.forEach(o8e)};function l8e({root:t,...e}){const r=t||document;HE.has(r)||HE.set(r,{});const n=HE.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(a8e,{root:t,...e})),n[s]}function c8e(t,e,r){const n=l8e(e);return jS.set(t,r),n.observe(t),()=>{jS.delete(t),n.unobserve(t)}}function f8e({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?h8e:d8e)(o,i.current,t,s)}const u8e={some:0,all:1};function d8e(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:u8e[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(gt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return c8e(r.current,a,l)},[t,n,s,i])}function h8e(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(gt.InView,!0)})},[t])}const gl=t=>e=>(t(e),null),v8e={inView:gl(f8e),tap:gl(i8e),focus:gl(r8e),hover:gl(n8e)};function sK(){const t=m.useContext(dx);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function iK(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),m8e=t=>/^0[^.\s]+$/.test(t),la={delta:0,timestamp:0},oK=1/60*1e3,p8e=typeof performance<"u"?()=>performance.now():()=>Date.now(),aK=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(p8e()),oK);function g8e(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=g8e(()=>Uy=!0),t),{}),Hn=j0.reduce((t,e)=>{const r=gx[e];return t[e]=(n,s=!1,i=!1)=>(Uy||x8e(),r.schedule(n,s,i)),t},{}),Ql=j0.reduce((t,e)=>(t[e]=gx[e].cancel,t),{}),GE=j0.reduce((t,e)=>(t[e]=()=>gx[e].process(la),t),{}),w8e=t=>gx[t].process(la),lK=t=>{Uy=!1,la.delta=FS?oK:Math.max(Math.min(t-la.timestamp,b8e),1),la.timestamp=t,BS=!0,j0.forEach(w8e),BS=!1,Uy&&(FS=!1,aK(lK))},x8e=()=>{Uy=!0,FS=!0,BS||aK(lK)};function QA(t,e){t.indexOf(e)===-1&&t.push(e)}function YA(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class JA{constructor(){this.subscriptions=[]}add(e){return QA(this.subscriptions,e),()=>YA(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class E8e{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=la;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Hn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Hn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=C8e(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new JA);const n=this.events[e].add(r);return e==="change"?()=>{n(),Hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?XA(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rh(t,e){return new E8e(t,e)}const ZA=(t,e)=>r=>Boolean(N0(r)&&Mke.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),cK=(t,e,r)=>n=>{if(!N0(n))return n;const[s,i,o,a]=n.match(By);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},S8e=t=>th(0,255,t),KE={...Kf,transform:t=>Math.round(S8e(t))},Zc={test:ZA("rgb","red"),parse:cK("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+KE.transform(t)+", "+KE.transform(e)+", "+KE.transform(r)+", "+Ev(Cv.transform(n))+")"};function k8e(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const US={test:ZA("#"),parse:k8e,transform:Zc.transform},Qu={test:ZA("hsl","hue"),parse:cK("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ao.transform(Ev(e))+", "+Ao.transform(Ev(r))+", "+Ev(Cv.transform(n))+")"},Dn={test:t=>Zc.test(t)||US.test(t)||Qu.test(t),parse:t=>Zc.test(t)?Zc.parse(t):Qu.test(t)?Qu.parse(t):US.parse(t),transform:t=>N0(t)?t:t.hasOwnProperty("red")?Zc.transform(t):Qu.transform(t)},fK="${c}",uK="${n}";function $8e(t){var e,r;return isNaN(t)&&N0(t)&&(((e=t.match(By))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(NS))===null||r===void 0?void 0:r.length)||0)>0}function Ub(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(NS);s&&(r=s.length,t=t.replace(NS,fK),e.push(...s.map(Dn.parse)));const i=t.match(By);return i&&(n=i.length,t=t.replace(By,uK),e.push(...i.map(Kf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function dK(t){return Ub(t).values}function hK(t){const{values:e,numColors:r,tokenised:n}=Ub(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function _8e(t){const e=dK(t);return hK(t)(e.map(A8e))}const Yl={test:$8e,parse:dK,createTransformer:hK,getAnimatableNone:_8e},P8e=new Set(["brightness","contrast","saturate","opacity"]);function T8e(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(By)||[];if(!n)return t;const s=r.replace(n,"");let i=P8e.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const R8e=/([a-z-]*)\(.*?\)/g,zS={...Yl,getAnimatableNone:t=>{const e=t.match(R8e);return e?e.map(T8e).join(" "):t}},I8e={...zG,color:Dn,backgroundColor:Dn,outlineColor:Dn,fill:Dn,stroke:Dn,borderColor:Dn,borderTopColor:Dn,borderRightColor:Dn,borderBottomColor:Dn,borderLeftColor:Dn,filter:zS,WebkitFilter:zS},e_=t=>I8e[t];function t_(t,e){var r;let n=e_(t);return n!==zS&&(n=Yl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const vK=t=>e=>e.test(t),O8e={test:t=>t==="auto",parse:t=>t},yK=[Kf,Ee,Ao,Qa,Nke,Dke,O8e],x1=t=>yK.find(vK(t)),M8e=[...yK,Dn,Yl],D8e=t=>M8e.find(vK(t));function N8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function L8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function bx(t,e,r){const n=t.getProps();return GA(n,e,r!==void 0?r:n.custom,N8e(t),L8e(t))}function j8e(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,rh(r))}function F8e(t,e){const r=bx(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=Yke(i[o]);j8e(t,o,a)}}function B8e(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,W8e={current:!1},r_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,n_=t=>e=>1-t(1-e),s_=t=>t*t,H8e=n_(s_),i_=r_(s_),xr=(t,e,r)=>-r*t+r*e+t;function QE(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function G8e({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=QE(l,a,t+1/3),i=QE(l,a,t),o=QE(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const YE=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},K8e=[US,Zc,Qu],Q8e=t=>K8e.find(e=>e.test(t));function JI(t){const e=Q8e(t);let r=e.parse(t);return e===Qu&&(r=G8e(r)),r}const mK=(t,e)=>{const r=JI(t),n=JI(e),s={...r};return i=>(s.red=YE(r.red,n.red,i),s.green=YE(r.green,n.green,i),s.blue=YE(r.blue,n.blue,i),s.alpha=xr(r.alpha,n.alpha,i),Zc.transform(s))};function pK(t,e){return typeof t=="number"?r=>xr(t,e,r):Dn.test(t)?mK(t,e):bK(t,e)}const gK=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>pK(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=pK(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},bK=(t,e)=>{const r=Yl.createTransformer(e),n=Ub(t),s=Ub(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?px(gK(n.values,s.values),r):o=>`${o>0?e:t}`},Vb=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},XI=(t,e)=>r=>xr(t,e,r);function J8e(t){return typeof t=="number"?XI:typeof t=="string"?Dn.test(t)?mK:bK:Array.isArray(t)?gK:typeof t=="object"?Y8e:XI}function X8e(t,e,r){const n=[],s=r||J8e(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=X8e(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(th(t[0],t[i-1],c)):l}const o_=t=>t,xK=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Z8e=1e-7,e$e=12;function t$e(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=xK(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>Z8e&&++at$e(i,0,1,t,r);return i=>i===0||i===1?i:xK(s(i),e,n)}const EK=t=>1-Math.sin(Math.acos(t)),a_=n_(EK),r$e=r_(a_),SK=CK(.33,1.53,.69,.99),l_=n_(SK),n$e=r_(l_),s$e=t=>(t*=2)<1?.5*l_(t):.5*(2-Math.pow(2,-10*(t-1))),i$e={linear:o_,easeIn:s_,easeInOut:i_,easeOut:H8e,circIn:EK,circInOut:r$e,circOut:a_,backIn:l_,backInOut:n$e,backOut:SK,anticipate:s$e},ZI=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return CK(e,r,n,s)}else if(typeof t=="string")return i$e[t];return t},o$e=t=>Array.isArray(t)&&typeof t[0]!="number";function a$e(t,e){return t.map(()=>e||i_).splice(0,t.length-1)}function l$e(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function c$e(t,e){return t.map(r=>r*e)}function VS({keyframes:t,ease:e=i_,times:r,duration:n=300}){t=[...t];const s=o$e(e)?e.map(ZI):ZI(e),i={done:!1,value:t[0]},o=c$e(r&&r.length===t.length?r:l$e(t),n);function a(){return wK(o,t,{ease:Array.isArray(s)?s:a$e(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const JE=.001,f$e=.01,eO=10,u$e=.05,d$e=1;function h$e({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=eO*1e3);let o=1-e;o=th(u$e,d$e,o),t=th(f$e,eO,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=qS(c,o),v=Math.exp(-u);return JE-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=qS(Math.pow(c,2),o);return(-s(c)+JE>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-JE+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=y$e(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const v$e=12;function y$e(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function g$e(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!tO(t,p$e)&&tO(t,m$e)){const r=h$e(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const b$e=5;function kK({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=g$e(n);let h=w$e,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=qS(p,y);h=k=>{const $=Math.exp(-y*p*k);return i-$*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-$*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const $=Math.max(0,b-b$e);w=XA(p-h($),b-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}kK.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const w$e=t=>0;function x$e({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const C$e={decay:x$e,keyframes:VS,tween:VS,spring:kK};function $K(t,e,r=0){return t-e-r}function E$e(t,e=0,r=0,n=!0){return n?$K(e+-t,e,r):e-(t-e)+r}function S$e(t,e,r,n){return n?t>=e+r:t<=-r}const k$e=t=>{const e=({delta:r})=>t(r);return{start:()=>Hn.update(e,!0),stop:()=>Ql.update(e)}};function qb({duration:t,driver:e=k$e,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,$=!0,x;const T=C$e[o.length>2?"keyframes":h]||VS,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=wK([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=E$e(r,E,i,$)):(r=$K(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function $$e(t){return!t||Array.isArray(t)||typeof t=="string"&&AK[t]}const F1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,AK={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:F1([0,.65,.55,1]),circOut:F1([.55,0,1,.45]),backIn:F1([.31,.01,.66,-.59]),backOut:F1([.33,1.53,.69,.99])};function A$e(t){if(t)return Array.isArray(t)?F1(t):AK[t]}function _$e(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:A$e(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const rO={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},XE={},_K={};for(const t in rO)_K[t]=()=>(XE[t]===void 0&&(XE[t]=rO[t]()),XE[t]);function P$e(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const T$e=new Set(["opacity"]),Fm=10;function R$e(t,e,{onUpdate:r,onComplete:n,...s}){if(!(_K.waapi()&&T$e.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!$$e(s.ease)){if(s.repeat===1/0)return;const u=qb({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=Fm;o=h,a=v-Fm,c="linear"}const f=_$e(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(P$e(o,s)),Hn.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=qb({...s,autoplay:!1});t.setWithVelocity(d.sample(u-Fm).value,d.sample(u).value,Fm)}Hn.update(()=>f.cancel())}}}function PK(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ql.read(n),t(i-e))};return Hn.read(n,!0),()=>Ql.read(n)}function I$e({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:PK(s,-e)}:s()}function O$e({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),$=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=XA(L-x,la.delta),($===1&&L>k||$===-1&&Ly==null?void 0:y.stop()}}const Pc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Bm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ZE=()=>({type:"keyframes",ease:"linear",duration:.3}),M$e={type:"keyframes",duration:.8},nO={x:Pc,y:Pc,z:Pc,rotate:Pc,rotateX:Pc,rotateY:Pc,rotateZ:Pc,scaleX:Bm,scaleY:Bm,scale:Bm,opacity:ZE,backgroundColor:ZE,color:ZE,default:Bm},D$e=(t,{keyframes:e})=>e.length>2?M$e:(nO[t]||nO.default)(e[1]),WS=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Yl.test(e)&&!e.startsWith("url("));function N$e({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function sO(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function iO(t){return typeof t=="number"?0:t_("",t)}function TK(t,e){return t[e]||t.default||t}function L$e(t,e,r,n){const s=WS(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=t_(e,r):sO(i)&&typeof r=="string"?i=iO(r):!Array.isArray(r)&&sO(r)&&typeof i=="string"&&(r=iO(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const c_=(t,e,r,n={})=>s=>{const i=TK(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Kp(o);const l=L$e(e,t,r,i),c=l[0],f=l[l.length-1],u=WS(t,c),d=WS(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||W8e.current||i.type===!1)return I$e(h);if(i.type==="inertia")return O$e(h);N$e(i)||(h={...h,...D$e(t,h)}),h.duration&&(h.duration=Kp(h.duration)),h.repeatDelay&&(h.repeatDelay=Kp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=R$e(e,t,h);if(g)return g}return qb(h)};function j$e(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>HS(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=HS(t,e,r);else{const s=typeof e=="function"?bx(t,e,r.custom):e;n=RK(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function HS(t,e,r={}){var n;const s=bx(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>RK(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return F$e(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function RK(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&U$e(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[q8e];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,Hn))}let g=h.start(c_(d,h,v,t.shouldReduceMotion&&Uh.has(d)?{type:!1}:y));zb(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&F8e(t,a)})}function F$e(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(B$e).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(HS(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function B$e(t,e){return t.sortNodePosition(e)}function U$e({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const f_=[gt.Animate,gt.InView,gt.Focus,gt.Hover,gt.Tap,gt.Drag,gt.Exit],z$e=[...f_].reverse(),V$e=f_.length;function q$e(t){return e=>Promise.all(e.map(({animation:r,options:n})=>j$e(t,r,n)))}function W$e(t){let e=q$e(t);const r=G$e();let n=!0;const s=(l,c)=>{const f=bx(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Fb(R)&&Fb(M)?!iK(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function H$e(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!iK(e,t):!1}function Tc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function G$e(){return{[gt.Animate]:Tc(!0),[gt.InView]:Tc(),[gt.Hover]:Tc(),[gt.Tap]:Tc(),[gt.Drag]:Tc(),[gt.Focus]:Tc(),[gt.Exit]:Tc()}}const K$e={animation:gl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=W$e(t)),vx(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:gl(t=>{const{custom:e,visualElement:r}=t,[n,s]=sK(),i=m.useContext(dx);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(gt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},oO=(t,e)=>Math.abs(t-e);function Q$e(t,e){const r=oO(t.x,e.x),n=oO(t.y,e.y);return Math.sqrt(r**2+n**2)}class IK{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=t5(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=Q$e(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=la;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=e5(f,this.transformPagePoint),Hn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=t5(c.type==="pointercancel"?this.lastMoveEventInfo:e5(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!JG(e))return;this.handlers=r,this.transformPagePoint=n;const s=KA(e),i=e5(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=la;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,t5(i,this.history)),this.removeListeners=px(wd(window,"pointermove",this.handlePointerMove),wd(window,"pointerup",this.handlePointerUp),wd(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ql.update(this.updatePoint)}}function e5(t,e){return e?{point:e(t.point)}:t}function aO(t,e){return{x:t.x-e.x,y:t.y-e.y}}function t5({point:t},e){return{point:t,delta:aO(t,OK(e)),offset:aO(t,Y$e(e)),velocity:J$e(e,.1)}}function Y$e(t){return t[0]}function OK(t){return t[t.length-1]}function J$e(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=OK(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Kp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Os(t){return t.max-t.min}function GS(t,e=0,r=.01){return Math.abs(t-e)<=r}function lO(t,e,r,n=.5){t.origin=n,t.originPoint=xr(e.min,e.max,t.origin),t.scale=Os(r)/Os(e),(GS(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=xr(r.min,r.max,t.origin)-t.originPoint,(GS(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Sv(t,e,r,n){lO(t.x,e.x,r.x,n==null?void 0:n.originX),lO(t.y,e.y,r.y,n==null?void 0:n.originY)}function cO(t,e,r){t.min=r.min+e.min,t.max=t.min+Os(e)}function X$e(t,e,r){cO(t.x,e.x,r.x),cO(t.y,e.y,r.y)}function fO(t,e,r){t.min=e.min-r.min,t.max=t.min+Os(e)}function kv(t,e,r){fO(t.x,e.x,r.x),fO(t.y,e.y,r.y)}function Z$e(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?xr(r,t,n.max):Math.min(t,r)),t}function uO(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function e4e(t,{top:e,left:r,bottom:n,right:s}){return{x:uO(t.x,r,s),y:uO(t.y,e,n)}}function dO(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Vb(e.min,e.max-n,t.min):n>s&&(r=Vb(t.min,t.max-s,e.min)),th(0,1,r)}function n4e(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const KS=.35;function s4e(t=KS){return t===!1?t=0:t===!0&&(t=KS),{x:hO(t,"left","right"),y:hO(t,"top","bottom")}}function hO(t,e,r){return{min:vO(t,e),max:vO(t,r)}}function vO(t,e){return typeof t=="number"?t:t[e]||0}const yO=()=>({translate:0,scale:1,origin:0,originPoint:0}),$v=()=>({x:yO(),y:yO()}),mO=()=>({min:0,max:0}),Br=()=>({x:mO(),y:mO()});function so(t){return[t("x"),t("y")]}function MK({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function i4e({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function o4e(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function r5(t){return t===void 0||t===1}function QS({scale:t,scaleX:e,scaleY:r}){return!r5(t)||!r5(e)||!r5(r)}function Nc(t){return QS(t)||DK(t)||t.z||t.rotate||t.rotateX||t.rotateY}function DK(t){return pO(t.x)||pO(t.y)}function pO(t){return t&&t!=="0%"}function Wb(t,e,r){const n=t-r,s=e*n;return r+s}function gO(t,e,r,n,s){return s!==void 0&&(t=Wb(t,s,n)),Wb(t,r,n)+e}function YS(t,e=0,r=1,n,s){t.min=gO(t.min,e,r,n,s),t.max=gO(t.max,e,r,n,s)}function NK(t,{x:e,y:r}){YS(t.x,e.translate,e.scale,e.originPoint),YS(t.y,r.translate,r.scale,r.originPoint)}function a4e(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function il(t,e){t.min=t.min+e,t.max=t.max+e}function wO(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=xr(t.min,t.max,i);YS(t,e[r],e[n],o,e.scale)}const l4e=["x","scaleX","originX"],c4e=["y","scaleY","originY"];function Yu(t,e){wO(t.x,e,l4e),wO(t.y,e,c4e)}function LK(t,e){return MK(o4e(t.getBoundingClientRect(),e))}function f4e(t,e,r){const n=LK(t,r),{scroll:s}=e;return s&&(il(n.x,s.offset.x),il(n.y,s.offset.y)),n}const u4e=new WeakMap;class d4e{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Br(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(KA(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eK(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),so(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(Ao.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Os(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(gt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=h4e(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new IK(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(gt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!Um(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Z$e(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Ku(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=e4e(n.layoutBox,e):this.constraints=!1,this.elastic=s4e(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&so(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=n4e(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Ku(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=f4e(n,s.root,this.visualElement.getTransformPagePoint());let o=t4e(s.layout.layoutBox,i);if(r){const a=r(i4e(o));this.hasMutatedConstraints=!!a,a&&(o=MK(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=so(f=>{if(!Um(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(c_(e,n,0,r))}stopAnimation(){so(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){so(r=>{const{drag:n}=this.getProps();if(!Um(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-xr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ku(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};so(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=r4e({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),so(a=>{if(!Um(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(xr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;u4e.set(this.visualElement,this);const r=this.visualElement.current,n=wd(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Ku(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=mx(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(so(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=KS,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Um(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function h4e(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function v4e(t){const{dragControls:e,visualElement:r}=t,n=FA(()=>new d4e(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function y4e({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(jA),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new IK(f,l,{transformPagePoint:a})}Bb(s,"pointerdown",i&&c),nK(()=>o.current&&o.current.end())}const m4e={pan:gl(y4e),drag:gl(v4e)};function JS(t){return typeof t=="string"&&t.startsWith("var(--")}const jK=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function p4e(t){const e=jK.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function XS(t,e,r=1){const[n,s]=p4e(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():JS(s)?XS(s,e,r+1):s}function g4e(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!JS(i))return;const o=XS(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!JS(i))continue;const o=XS(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const b4e=new Set(["width","height","top","left","right","bottom","x","y"]),FK=t=>b4e.has(t),w4e=t=>Object.keys(t).some(FK),xO=t=>t===Kf||t===Ee;var CO;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(CO||(CO={}));const EO=(t,e)=>parseFloat(t.split(", ")[e]),SO=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return EO(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?EO(i[1],t):0}},x4e=new Set(["x","y","z"]),C4e=Lb.filter(t=>!x4e.has(t));function E4e(t){const e=[];return C4e.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const kO={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:SO(4,13),y:SO(5,14)},S4e=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=kO[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=kO[c](l,i)}),t},k4e=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(FK);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=x1(f);const d=e[l];let h;if(Fb(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=x1(f);for(let g=y;g=0?window.pageYOffset:null,c=S4e(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),hx&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function $4e(t,e,r,n){return w4e(e)?k4e(t,e,r,n):{target:e,transitionEnd:n}}const A4e=(t,e,r,n)=>{const s=g4e(t,e,n);return e=s.target,n=s.transitionEnd,$4e(t,e,r,n)},ZS={current:null},BK={current:!1};function _4e(){if(BK.current=!0,!!hx)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ZS.current=t.matches;t.addListener(e),e()}else ZS.current=!1}function P4e(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(ds(i))t.addValue(s,i),zb(n)&&n.add(s);else if(ds(o))t.addValue(s,rh(i,{owner:t})),zb(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,rh(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const UK=Object.keys(Fy),T4e=UK.length,$O=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class R4e{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Hn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=yx(r),this.isVariantNode=LG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&ds(u)&&(u.set(o[f],!1),zb(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),BK.current||_4e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ZS.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Ql.update(this.notifyUpdate),Ql.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=Uh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Hn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Br()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;n<$O.length;n++){const s=$O[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=P4e(this,this.scrapeMotionValuesFromProps(e,r),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var r,n;if(e)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){const i=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const s={};for(let i=0;in.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=rh(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=GA(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ds(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new JA),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const zK=["initial",...f_],I4e=zK.length;class VK extends R4e{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=z8e(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){B8e(this,n,o);const a=A4e(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function O4e(t){return window.getComputedStyle(t)}class M4e extends VK{readValueFromInstance(e,r){if(Uh.has(r)){const n=e_(r);return n&&n.default||0}else{const n=O4e(e),s=(UG(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return LK(e,r)}build(e,r,n,s){UA(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return HA(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ds(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){HG(e,r,n,s)}}class D4e extends VK{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Uh.has(r)?((n=e_(r))===null||n===void 0?void 0:n.default)||0:(r=GG.has(r)?r:WA(r),e.getAttribute(r))}measureInstanceViewportBox(){return Br()}scrapeMotionValuesFromProps(e,r){return QG(e,r)}build(e,r,n,s){VA(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){KG(e,r,n,s)}mount(e){this.isSVGTag=qA(e.tagName),super.mount(e)}}const N4e=(t,e)=>BA(t)?new D4e(e,{enableHardwareAcceleration:!1}):new M4e(e,{enableHardwareAcceleration:!0});function AO(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const C1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ee.test(t))t=parseFloat(t);else return t;const r=AO(t,e.target.x),n=AO(t,e.target.y);return`${r}% ${n}%`}},_O="_$css",L4e={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(jK,h=>(i.push(h),_O)));const o=Yl.parse(t);if(o.length>5)return n;const a=Yl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=xr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(_O,()=>{const v=i[h];return h++,v})}return d}};class j4e extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Pke(B4e),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),xv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Hn.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function F4e(t){const[e,r]=sK(),n=m.useContext(jG);return P.createElement(j4e,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(FG),isPresent:e,safeToRemove:r})}const B4e={borderRadius:{...C1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:C1,borderTopRightRadius:C1,borderBottomLeftRadius:C1,borderBottomRightRadius:C1,boxShadow:L4e},U4e={measureLayout:F4e};function z4e(t,e,r={}){const n=ds(t)?t:rh(t);return n.start(c_("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const qK=["TopLeft","TopRight","BottomLeft","BottomRight"],V4e=qK.length,PO=t=>typeof t=="string"?parseFloat(t):t,TO=t=>typeof t=="number"||Ee.test(t);function q4e(t,e,r,n,s,i){s?(t.opacity=xr(0,r.opacity!==void 0?r.opacity:1,W4e(n)),t.opacityExit=xr(e.opacity!==void 0?e.opacity:1,0,H4e(n))):i&&(t.opacity=xr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Vb(t,e,n))}function IO(t,e){t.min=e.min,t.max=e.max}function wi(t,e){IO(t.x,e.x),IO(t.y,e.y)}function OO(t,e,r,n,s){return t-=e,t=Wb(t,1/r,n),s!==void 0&&(t=Wb(t,1/s,n)),t}function G4e(t,e=0,r=1,n=.5,s,i=t,o=t){if(Ao.test(e)&&(e=parseFloat(e),e=xr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=xr(i.min,i.max,n);t===i&&(a-=e),t.min=OO(t.min,e,r,a,s),t.max=OO(t.max,e,r,a,s)}function MO(t,e,[r,n,s],i,o){G4e(t,e[r],e[n],e[s],e.scale,i,o)}const K4e=["x","scaleX","originX"],Q4e=["y","scaleY","originY"];function DO(t,e,r,n){MO(t.x,e,K4e,r==null?void 0:r.x,n==null?void 0:n.x),MO(t.y,e,Q4e,r==null?void 0:r.y,n==null?void 0:n.y)}function NO(t){return t.translate===0&&t.scale===1}function HK(t){return NO(t.x)&&NO(t.y)}function GK(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function LO(t){return Os(t.x)/Os(t.y)}class Y4e{constructor(){this.members=[]}add(e){QA(this.members,e),e.scheduleRender()}remove(e){if(YA(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jO(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const J4e=(t,e)=>t.depth-e.depth;class X4e{constructor(){this.children=[],this.isDirty=!1}add(e){QA(this.children,e),this.isDirty=!0}remove(e){YA(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(J4e),this.isDirty=!1,this.children.forEach(e)}}const FO=["","X","Y","Z"],BO=1e3;let Z4e=0;function KK({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=Z4e++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(rAe),this.nodes.forEach(iAe),this.nodes.forEach(oAe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=PK(h,250),xv.hasAnimatedSinceResize&&(xv.hasAnimatedSinceResize=!1,this.nodes.forEach(zO))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:uAe,{onLayoutAnimationStart:$,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!GK(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={...TK(k,"layout"),onPlay:$,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&zO(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Ql.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(aAe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var w;const E=p/1e3;VO(h.x,o.x,E),VO(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(kv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cAe(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,q4e(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ql.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hn.update(()=>{xv.hasAnimatedSinceResize=!0,this.currentAnimation=z4e(0,BO,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,BO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&QK(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Br();const u=Os(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Os(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}wi(a,l),Yu(a,f),Sv(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Y4e),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(UO),this.root.sharedNodes.clear()}}}function eAe(t){t.updateLayout()}function tAe(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?so(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(v);v.min=i[h].min,v.max=v.min+y}):QK(a,s.layoutBox,i)&&so(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(i[h]);v.max=v.min+y});const c=$v();Sv(c,i,s.layoutBox);const f=$v();l?Sv(f,t.applyTransform(o,!0),s.measuredBox):Sv(f,i,s.layoutBox);const u=!HK(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Br();kv(g,s.layoutBox,v.layoutBox);const b=Br();kv(b,i,y.layoutBox),GK(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function rAe(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function nAe(t){t.clearSnapshot()}function UO(t){t.clearMeasurements()}function sAe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zO(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function iAe(t){t.resolveTargetDelta()}function oAe(t){t.calcProjection()}function aAe(t){t.resetRotation()}function lAe(t){t.removeLeadSnapshot()}function VO(t,e,r){t.translate=xr(e.translate,0,r),t.scale=xr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function qO(t,e,r,n){t.min=xr(e.min,r.min,n),t.max=xr(e.max,r.max,n)}function cAe(t,e,r,n){qO(t.x,e.x,r.x,n),qO(t.y,e.y,r.y,n)}function fAe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uAe={duration:.45,ease:[.4,0,.1,1]};function dAe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function WO(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function hAe(t){WO(t.x),WO(t.y)}function QK(t,e,r){return t==="position"||t==="preserve-aspect"&&!GS(LO(e),LO(r),.2)}const vAe=KK({attachResizeListener:(t,e)=>mx(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),n5={current:void 0},yAe=KK({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!n5.current){const t=new vAe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),n5.current=t}return n5.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),mAe={...K$e,...v8e,...m4e,...U4e},pAe=Ake((t,e)=>t8e(t,e,mAe,N4e,yAe)),gAe={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};function bAe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wAe(t){var e=bAe(t,"string");return typeof e=="symbol"?e:String(e)}function xAe(t,e,r){return e=wAe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function s5(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=s5({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?s5(s5({},f),u):l,p=function(){var $=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(x.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var B=$[T];if(B!=null){var L=x.responsiveArray[T];c.push(x.values[B].conditions[L])}}else for(var U in $){var V=$[U];V!=null&&c.push(x.values[V].conditions[U])}}catch(N){throw N}};for(var w in b)var E=p();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},EAe=t=>t,SAe=function(){return CAe(EAe)(...arguments)},YK=SAe({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},backgroundRaised:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderNormal:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},borderFocus:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonGlass:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonEmphasis:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},buttonInverse:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text80:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},text100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},textInverse100:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumDark:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},arbitrumLight:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceDark:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},avalanceLight:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscDark:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},bscLight:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumDark:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},ethereumLight:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisDark:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},gnosisLight:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonDark:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},polygonLight:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundPrimary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundSecondary:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundContrast:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundMuted:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundControl:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundInverse:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundBackdrop:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},backgroundOverlay:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},backgroundRaised:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},borderNormal:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},borderFocus:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonGlass:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},buttonEmphasis:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},buttonInverse:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},text80:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},text100:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},textInverse100:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},arbitrumDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},arbitrumLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},avalanceDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},avalanceLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},bscDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},bscLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},ethereumDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},ethereumLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},gnosisDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},gnosisLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},polygonDark:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},polygonLight:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundPrimary:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundSecondary:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundContrast:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundMuted:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundControl:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundInverse:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},backgroundBackdrop:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},backgroundOverlay:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},backgroundRaised:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},borderNormal:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},borderFocus:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},buttonGlass:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},buttonEmphasis:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},buttonInverse:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},text80:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},text100:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},textInverse100:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},arbitrumDark:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},arbitrumLight:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},avalanceDark:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},avalanceLight:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},bscDark:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},bscLight:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},ethereumDark:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},ethereumLight:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},gnosisDark:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},gnosisLight:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},polygonDark:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},polygonLight:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundPrimary:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundSecondary:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundContrast:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundMuted:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundControl:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},backgroundInverse:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},backgroundBackdrop:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},backgroundOverlay:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},backgroundRaised:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},borderNormal:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},borderFocus:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},buttonGlass:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},buttonEmphasis:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},buttonInverse:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},text80:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},text100:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},textInverse100:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},arbitrumDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},arbitrumLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},avalanceDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},avalanceLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},bscDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},bscLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},ethereumDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},ethereumLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},gnosisDark:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},gnosisLight:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},polygonDark:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},polygonLight:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundPrimary:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundSecondary:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundContrast:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundMuted:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},backgroundControl:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},backgroundInverse:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},backgroundBackdrop:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},backgroundOverlay:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},backgroundRaised:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},borderNormal:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},borderFocus:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},buttonGlass:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},buttonEmphasis:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},buttonInverse:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},text80:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},text100:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},textInverse100:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},arbitrumDark:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},arbitrumLight:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},avalanceDark:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},avalanceLight:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},bscDark:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},bscLight:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},ethereumDark:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},ethereumLight:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},gnosisDark:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},gnosisLight:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},polygonDark:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},polygonLight:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundPrimary:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundSecondary:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundContrast:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},backgroundMuted:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},backgroundControl:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},backgroundInverse:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},backgroundBackdrop:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},backgroundOverlay:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},backgroundRaised:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},borderNormal:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},borderFocus:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},buttonGlass:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},buttonEmphasis:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},buttonInverse:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},text80:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},text100:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},textInverse100:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},arbitrumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},arbitrumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},avalanceDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},avalanceLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},bscDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},bscLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},ethereumDark:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},ethereumLight:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},gnosisDark:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},gnosisLight:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},polygonDark:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},polygonLight:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const kAe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],ek=t=>(t.display||(t.display=Object.keys(t).some(e=>kAe.includes(e))?"flex":void 0),YK(t));ek.properties=YK.properties;function JK(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const c in i)ek.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=ek({...o,...n});return m.createElement(r,{className:js(l,s),...a,ref:e})});var XK={exports:{}},E1={};/** + Approved: ${d.toString()}`))}),o.forEach(u=>{n||(Xc(s[u].methods,i[u].methods)?Xc(s[u].events,i[u].events)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${u}`)):n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${u}`))}),n}function lke(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(s=>{e[s]={methods:t[r].methods,events:t[r].events}})}),e}function zI(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function cke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Bh(t[r].accounts);n==null||n.forEach(s=>{e[s]={accounts:t[r].accounts.filter(i=>i.includes(`${s}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function sHe(t,e){return IA(t,!1)&&t<=e.max&&t>=e.min}var IG="eip155",fke="store",OG="requestedChains",IS="wallet_addEthereumChain",lr,wv,Wp,OS,OA,MG,Hp,MS,DS,DG,Ib,MA,_u,j1,Ob,DA,Mb,NA,Db,LA,uke=class extends V${constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),ps(this,Wp),ps(this,OA),ps(this,Hp),ps(this,DS),ps(this,Ib),ps(this,_u),ps(this,Ob),ps(this,Mb),ps(this,Db),ar(this,"id","walletConnect"),ar(this,"name","WalletConnect"),ar(this,"ready",!0),ps(this,lr,void 0),ps(this,wv,void 0),ar(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(e[0])})}),ar(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),ar(this,"onDisconnect",()=>{Qr(this,_u,j1).call(this,[]),this.emit("disconnect")}),ar(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),ar(this,"onConnect",()=>{this.emit("connect",{})}),Qr(this,Wp,OS).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,s,i,o;try{let a=t;if(!a){const v=(r=this.storage)==null?void 0:r.getItem(fke),y=(i=(s=(n=v==null?void 0:v.state)==null?void 0:n.data)==null?void 0:s.chain)==null?void 0:i.id;y&&!this.isChainUnsupported(y)?a=y:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const l=await this.getProvider();Qr(this,DS,DG).call(this);const c=Qr(this,Hp,MS).call(this);if(l.session&&c&&await l.disconnect(),!l.session||c){const v=this.chains.filter(y=>y.id!==a).map(y=>y.id);this.emit("message",{type:"connecting"}),await l.connect({pairingTopic:e,chains:[a],optionalChains:v.length?v:void 0}),Qr(this,_u,j1).call(this,this.chains.map(({id:y})=>y))}const f=await l.enable(),u=Tl(f[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:u,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new Sn(a):a}}async disconnect(){const t=await this.getProvider();try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{Qr(this,Ib,MA).call(this),Qr(this,_u,j1).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Tl(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return er(this,lr)||await Qr(this,Wp,OS).call(this),t&&await this.switchChain(t),er(this,lr)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Qr(this,Hp,MS).call(this);if(!t)return!1;if(r&&e.session){try{await e.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(t){var r,n;const e=this.chains.find(s=>s.id===t);if(!e)throw new Vl(new Error("chain not found on connector."));try{const s=await this.getProvider(),i=Qr(this,Mb,NA).call(this),o=Qr(this,Db,LA).call(this);if(!i.includes(t)&&o.includes(IS)){await s.request({method:IS,params:[{chainId:We(e.id),blockExplorerUrls:[(n=(r=e.blockExplorers)==null?void 0:r.default)==null?void 0:n.url],chainName:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:[...e.rpcUrls.default.http]}]});const l=Qr(this,Ob,DA).call(this);l.push(t),Qr(this,_u,j1).call(this,l)}return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:We(t)}]}),e}catch(s){const i=typeof s=="string"?s:s==null?void 0:s.message;throw/user rejected request/i.test(i)?new Sn(s):new Vl(s)}}};lr=new WeakMap;wv=new WeakMap;Wp=new WeakSet;OS=async function(){return!er(this,wv)&&typeof window<"u"&&pw(this,wv,Qr(this,OA,MG).call(this)),er(this,wv)};OA=new WeakSet;MG=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await xz(()=>import("./index.es-2d618dfa.js"),[],import.meta.url),[n,...s]=this.chains.map(({id:i})=>i);if(n){const{projectId:i,showQrModal:o=!0,qrModalOptions:a,metadata:l,relayUrl:c}=this.options;pw(this,lr,await t.init({showQrModal:o,qrModalOptions:a,projectId:i,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:s.length?s:void 0,rpcMap:Object.fromEntries(this.chains.map(f=>[f.id,f.rpcUrls.default.http[0]])),metadata:l,relayUrl:c}))}};Hp=new WeakSet;MS=function(){if(Qr(this,Db,LA).call(this).includes(IS)||!this.options.isNewChainsStale)return!1;const e=Qr(this,Ob,DA).call(this),r=this.chains.map(({id:s})=>s),n=Qr(this,Mb,NA).call(this);return n.length&&!n.some(s=>r.includes(s))?!1:!r.every(s=>e.includes(s))};DS=new WeakSet;DG=function(){er(this,lr)&&(Qr(this,Ib,MA).call(this),er(this,lr).on("accountsChanged",this.onAccountsChanged),er(this,lr).on("chainChanged",this.onChainChanged),er(this,lr).on("disconnect",this.onDisconnect),er(this,lr).on("session_delete",this.onDisconnect),er(this,lr).on("display_uri",this.onDisplayUri),er(this,lr).on("connect",this.onConnect))};Ib=new WeakSet;MA=function(){er(this,lr)&&(er(this,lr).removeListener("accountsChanged",this.onAccountsChanged),er(this,lr).removeListener("chainChanged",this.onChainChanged),er(this,lr).removeListener("disconnect",this.onDisconnect),er(this,lr).removeListener("session_delete",this.onDisconnect),er(this,lr).removeListener("display_uri",this.onDisplayUri),er(this,lr).removeListener("connect",this.onConnect))};_u=new WeakSet;j1=function(t){var e;(e=this.storage)==null||e.setItem(OG,t)};Ob=new WeakSet;DA=function(){var t;return((t=this.storage)==null?void 0:t.getItem(OG))??[]};Mb=new WeakSet;NA=function(){var n,s,i;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((i=(s=TG(t)[IG])==null?void 0:s.chains)==null?void 0:i.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Db=new WeakSet;LA=function(){var n,s;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((s=TG(t)[IG])==null?void 0:s.methods)??[]:[]};const jA=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ux=m.createContext({});function dke(){return m.useContext(ux).visualElement}const dx=m.createContext(null),hx=typeof document<"u",VI=hx?m.useLayoutEffect:m.useEffect,NG=m.createContext({strict:!1});function hke(t,e,r,n){const s=dke(),i=m.useContext(NG),o=m.useContext(dx),a=m.useContext(jA).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return VI(()=>{c&&c.render()}),(window.HandoffAppearAnimations?VI:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Ku(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vke(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Ku(r)&&(r.current=n))},[e])}function jy(t){return typeof t=="string"||Array.isArray(t)}function vx(t){return typeof t=="object"&&typeof t.start=="function"}const yke=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function yx(t){return vx(t.animate)||yke.some(e=>jy(t[e]))}function LG(t){return Boolean(yx(t)||t.variants)}function mke(t,e){if(yx(t)){const{initial:r,animate:n}=t;return{initial:r===!1||jy(r)?r:void 0,animate:jy(n)?n:void 0}}return t.inherit!==!1?e:{}}function pke(t){const{initial:e,animate:r}=mke(t,m.useContext(ux));return m.useMemo(()=>({initial:e,animate:r}),[qI(e),qI(r)])}function qI(t){return Array.isArray(t)?t.join(" "):t}const zo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Fy={measureLayout:zo(["layout","layoutId","drag"]),animation:zo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:zo(["exit"]),drag:zo(["drag","dragControls"]),focus:zo(["whileFocus"]),hover:zo(["whileHover","onHoverStart","onHoverEnd"]),tap:zo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:zo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:zo(["whileInView","onViewportEnter","onViewportLeave"])};function gke(t){for(const e in t)e==="projectionNodeConstructor"?Fy.projectionNodeConstructor=t[e]:Fy[e].Component=t[e]}function FA(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const xv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let bke=1;function wke(){return FA(()=>{if(xv.hasEverUpdated)return bke++})}const jG=m.createContext({});class xke extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const FG=m.createContext({}),Cke=Symbol.for("motionComponentSymbol");function Eke({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&gke(t);function o(l,c){const f={...m.useContext(jA),...l,layoutId:Ske(l)},{isStatic:u}=f;let d=null;const h=pke(l),v=u?void 0:wke(),y=s(l,u);if(!u&&hx){h.visualElement=hke(i,y,f,e);const g=m.useContext(NG).strict,b=m.useContext(FG);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Fy.projectionNodeConstructor,b))}return m.createElement(xke,{visualElement:h.visualElement,props:f},d,m.createElement(ux.Provider,{value:h},n(i,l,v,vke(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Cke]=i,a}function Ske({layoutId:t}){const e=m.useContext(jG).id;return e&&t!==void 0?e+"-"+t:t}function kke(t){function e(n,s={}){return Eke(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const $ke=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function BA(t){return typeof t!="string"||t.includes("-")?!1:!!($ke.indexOf(t)>-1||/[A-Z]/.test(t))}const Nb={};function Ake(t){Object.assign(Nb,t)}const Lb=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Uh=new Set(Lb);function BG(t,{layout:e,layoutId:r}){return Uh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Nb[t]||t==="opacity")}const ds=t=>!!(t!=null&&t.getVelocity),_ke={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pke=(t,e)=>Lb.indexOf(t)-Lb.indexOf(e);function Tke({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Pke);for(const a of e)o+=`${_ke[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function UG(t){return t.startsWith("--")}const Rke=(t,e)=>e&&typeof t=="number"?e.transform(t):t,th=(t,e,r)=>Math.min(Math.max(r,t),e),Kf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Cv={...Kf,transform:t=>th(0,1,t)},jm={...Kf,default:1},Ev=t=>Math.round(t*1e5)/1e5,By=/(-)?([\d]*\.?[\d])+/g,NS=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ike=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function N0(t){return typeof t=="string"}const L0=t=>({test:e=>N0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Qa=L0("deg"),Ao=L0("%"),Ee=L0("px"),Oke=L0("vh"),Mke=L0("vw"),WI={...Ao,parse:t=>Ao.parse(t)/100,transform:t=>Ao.transform(t*100)},HI={...Kf,transform:Math.round},zG={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,size:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,rotate:Qa,rotateX:Qa,rotateY:Qa,rotateZ:Qa,scale:jm,scaleX:jm,scaleY:jm,scaleZ:jm,skew:Qa,skewX:Qa,skewY:Qa,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Cv,originX:WI,originY:WI,originZ:Ee,zIndex:HI,fillOpacity:Cv,strokeOpacity:Cv,numOctaves:HI};function UA(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(UG(d)){i[d]=h;continue}const v=zG[d],y=Rke(h,v);if(Uh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Tke(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const zA=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function VG(t,e,r){for(const n in e)!ds(e[n])&&!BG(n,r)&&(t[n]=e[n])}function Dke({transformTemplate:t},e,r){return m.useMemo(()=>{const n=zA();return UA(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function Nke(t,e,r){const n=t.style||{},s={};return VG(s,n,t),Object.assign(s,Dke(t,e,r)),t.transformValues?t.transformValues(s):s}function Lke(t,e,r){const n={},s=Nke(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const jke=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function jb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||jke.has(t)}let qG=t=>!jb(t);function Fke(t){t&&(qG=e=>e.startsWith("on")?!jb(e):t(e))}try{Fke(require("@emotion/is-prop-valid").default)}catch{}function Bke(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(qG(s)||r===!0&&jb(s)||!e&&!jb(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function GI(t,e,r){return typeof t=="string"?t:Ee.transform(e+r*t)}function Uke(t,e,r){const n=GI(e,t.x,t.width),s=GI(r,t.y,t.height);return`${n} ${s}`}const zke={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vke={offset:"strokeDashoffset",array:"strokeDasharray"};function qke(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?zke:Vke;t[i.offset]=Ee.transform(-n);const o=Ee.transform(e),a=Ee.transform(r);t[i.array]=`${o} ${a}`}function VA(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(UA(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Uke(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&qke(d,i,o,a,!1)}const WG=()=>({...zA(),attrs:{}}),qA=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Wke(t,e,r,n){const s=m.useMemo(()=>{const i=WG();return VA(i,e,{enableHardwareAcceleration:!1},qA(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};VG(i,t.style,t),s.style={...i,...s.style}}return s}function Hke(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(BA(r)?Wke:Lke)(n,o,a,r),u={...Bke(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>ds(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const WA=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HG(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const GG=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function KG(t,e,r,n){HG(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(GG.has(s)?s:WA(s),e.attrs[s])}function HA(t,e){const{style:r}=t,n={};for(const s in r)(ds(r[s])||e.style&&ds(e.style[s])||BG(s,t))&&(n[s]=r[s]);return n}function QG(t,e){const r=HA(t,e);for(const n in t)if(ds(t[n])||ds(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function GA(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Fb=t=>Array.isArray(t),Gke=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),Kke=t=>Fb(t)?t[t.length-1]||0:t;function Gp(t){const e=ds(t)?t.get():t;return Gke(e)?e.toValue():e}function Qke({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Yke(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const YG=t=>(e,r)=>{const n=m.useContext(ux),s=m.useContext(dx),i=()=>Qke(t,e,n,s);return r?i():FA(i)};function Yke(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Gp(i[d]);let{initial:o,animate:a}=t;const l=yx(t),c=LG(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!vx(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=GA(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const Jke={useVisualState:YG({scrapeMotionValuesFromProps:QG,createRenderState:WG,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}VA(r,n,{enableHardwareAcceleration:!1},qA(e.tagName),t.transformTemplate),KG(e,r)}})},Xke={useVisualState:YG({scrapeMotionValuesFromProps:HA,createRenderState:zA})};function Zke(t,{forwardMotionProps:e=!1},r,n,s){return{...BA(t)?Jke:Xke,preloadedFeatures:r,useRender:Hke(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var gt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(gt||(gt={}));function mx(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function LS(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return mx(s,e,r,n)},[t,e,r,n])}function e8e({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(gt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(gt.Focus,!1)},[r]);LS(e,"focus",t?n:void 0),LS(e,"blur",t?s:void 0)}const JG=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function KA(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const XG=t=>e=>JG(e)&&t(e,KA(e));function wd(t,e,r,n){return mx(t,e,XG(r),n)}function Bb(t,e,r,n){return LS(t,e,r&&XG(r),n)}function ZG(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const KI=ZG("dragHorizontal"),QI=ZG("dragVertical");function eK(t){let e=!1;if(t==="y")e=QI();else if(t==="x")e=KI();else{const r=KI(),n=QI();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function tK(){const t=eK(!0);return t?(t(),!1):!0}function YI(t,e,r,n){return(s,i)=>{s.type==="touch"||tK()||(r&&t.animationState&&t.animationState.setActive(gt.Hover,e),n&&n(s,i))}}function t8e({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Bb(n,"pointerenter",m.useMemo(()=>t||r?YI(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Bb(n,"pointerleave",m.useMemo(()=>e||r?YI(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const rK=(t,e)=>e?t===e?!0:rK(t,e.parentElement):!1;function nK(t){return m.useEffect(()=>()=>t(),[])}const r8e=(t,e)=>r=>e(t(r)),px=(...t)=>t.reduce(r8e);function n8e({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!1),!tK()}function d(y,g){var b,p,w,E;u()&&(rK(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=px(wd(window,"pointerup",d,c),wd(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Bb(s,"pointerdown",o?v:void 0,c),nK(f)}const jS=new WeakMap,HE=new WeakMap,s8e=t=>{const e=jS.get(t.target);e&&e(t)},i8e=t=>{t.forEach(s8e)};function o8e({root:t,...e}){const r=t||document;HE.has(r)||HE.set(r,{});const n=HE.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(i8e,{root:t,...e})),n[s]}function a8e(t,e,r){const n=o8e(e);return jS.set(t,r),n.observe(t),()=>{jS.delete(t),n.unobserve(t)}}function l8e({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?u8e:f8e)(o,i.current,t,s)}const c8e={some:0,all:1};function f8e(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:c8e[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(gt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return a8e(r.current,a,l)},[t,n,s,i])}function u8e(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(gt.InView,!0)})},[t])}const gl=t=>e=>(t(e),null),d8e={inView:gl(l8e),tap:gl(n8e),focus:gl(e8e),hover:gl(t8e)};function sK(){const t=m.useContext(dx);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function iK(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),v8e=t=>/^0[^.\s]+$/.test(t),la={delta:0,timestamp:0},oK=1/60*1e3,y8e=typeof performance<"u"?()=>performance.now():()=>Date.now(),aK=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(y8e()),oK);function m8e(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=m8e(()=>Uy=!0),t),{}),Hn=j0.reduce((t,e)=>{const r=gx[e];return t[e]=(n,s=!1,i=!1)=>(Uy||b8e(),r.schedule(n,s,i)),t},{}),Ql=j0.reduce((t,e)=>(t[e]=gx[e].cancel,t),{}),GE=j0.reduce((t,e)=>(t[e]=()=>gx[e].process(la),t),{}),g8e=t=>gx[t].process(la),lK=t=>{Uy=!1,la.delta=FS?oK:Math.max(Math.min(t-la.timestamp,p8e),1),la.timestamp=t,BS=!0,j0.forEach(g8e),BS=!1,Uy&&(FS=!1,aK(lK))},b8e=()=>{Uy=!0,FS=!0,BS||aK(lK)};function QA(t,e){t.indexOf(e)===-1&&t.push(e)}function YA(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class JA{constructor(){this.subscriptions=[]}add(e){return QA(this.subscriptions,e),()=>YA(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class x8e{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=la;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Hn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Hn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=w8e(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new JA);const n=this.events[e].add(r);return e==="change"?()=>{n(),Hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?XA(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rh(t,e){return new x8e(t,e)}const ZA=(t,e)=>r=>Boolean(N0(r)&&Ike.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),cK=(t,e,r)=>n=>{if(!N0(n))return n;const[s,i,o,a]=n.match(By);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},C8e=t=>th(0,255,t),KE={...Kf,transform:t=>Math.round(C8e(t))},Zc={test:ZA("rgb","red"),parse:cK("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+KE.transform(t)+", "+KE.transform(e)+", "+KE.transform(r)+", "+Ev(Cv.transform(n))+")"};function E8e(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const US={test:ZA("#"),parse:E8e,transform:Zc.transform},Qu={test:ZA("hsl","hue"),parse:cK("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ao.transform(Ev(e))+", "+Ao.transform(Ev(r))+", "+Ev(Cv.transform(n))+")"},Dn={test:t=>Zc.test(t)||US.test(t)||Qu.test(t),parse:t=>Zc.test(t)?Zc.parse(t):Qu.test(t)?Qu.parse(t):US.parse(t),transform:t=>N0(t)?t:t.hasOwnProperty("red")?Zc.transform(t):Qu.transform(t)},fK="${c}",uK="${n}";function S8e(t){var e,r;return isNaN(t)&&N0(t)&&(((e=t.match(By))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(NS))===null||r===void 0?void 0:r.length)||0)>0}function Ub(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(NS);s&&(r=s.length,t=t.replace(NS,fK),e.push(...s.map(Dn.parse)));const i=t.match(By);return i&&(n=i.length,t=t.replace(By,uK),e.push(...i.map(Kf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function dK(t){return Ub(t).values}function hK(t){const{values:e,numColors:r,tokenised:n}=Ub(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function $8e(t){const e=dK(t);return hK(t)(e.map(k8e))}const Yl={test:S8e,parse:dK,createTransformer:hK,getAnimatableNone:$8e},A8e=new Set(["brightness","contrast","saturate","opacity"]);function _8e(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(By)||[];if(!n)return t;const s=r.replace(n,"");let i=A8e.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const P8e=/([a-z-]*)\(.*?\)/g,zS={...Yl,getAnimatableNone:t=>{const e=t.match(P8e);return e?e.map(_8e).join(" "):t}},T8e={...zG,color:Dn,backgroundColor:Dn,outlineColor:Dn,fill:Dn,stroke:Dn,borderColor:Dn,borderTopColor:Dn,borderRightColor:Dn,borderBottomColor:Dn,borderLeftColor:Dn,filter:zS,WebkitFilter:zS},e_=t=>T8e[t];function t_(t,e){var r;let n=e_(t);return n!==zS&&(n=Yl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const vK=t=>e=>e.test(t),R8e={test:t=>t==="auto",parse:t=>t},yK=[Kf,Ee,Ao,Qa,Mke,Oke,R8e],x1=t=>yK.find(vK(t)),I8e=[...yK,Dn,Yl],O8e=t=>I8e.find(vK(t));function M8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function D8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function bx(t,e,r){const n=t.getProps();return GA(n,e,r!==void 0?r:n.custom,M8e(t),D8e(t))}function N8e(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,rh(r))}function L8e(t,e){const r=bx(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=Kke(i[o]);N8e(t,o,a)}}function j8e(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,V8e={current:!1},r_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,n_=t=>e=>1-t(1-e),s_=t=>t*t,q8e=n_(s_),i_=r_(s_),wr=(t,e,r)=>-r*t+r*e+t;function QE(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function W8e({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=QE(l,a,t+1/3),i=QE(l,a,t),o=QE(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const YE=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},H8e=[US,Zc,Qu],G8e=t=>H8e.find(e=>e.test(t));function JI(t){const e=G8e(t);let r=e.parse(t);return e===Qu&&(r=W8e(r)),r}const mK=(t,e)=>{const r=JI(t),n=JI(e),s={...r};return i=>(s.red=YE(r.red,n.red,i),s.green=YE(r.green,n.green,i),s.blue=YE(r.blue,n.blue,i),s.alpha=wr(r.alpha,n.alpha,i),Zc.transform(s))};function pK(t,e){return typeof t=="number"?r=>wr(t,e,r):Dn.test(t)?mK(t,e):bK(t,e)}const gK=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>pK(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=pK(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},bK=(t,e)=>{const r=Yl.createTransformer(e),n=Ub(t),s=Ub(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?px(gK(n.values,s.values),r):o=>`${o>0?e:t}`},Vb=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},XI=(t,e)=>r=>wr(t,e,r);function Q8e(t){return typeof t=="number"?XI:typeof t=="string"?Dn.test(t)?mK:bK:Array.isArray(t)?gK:typeof t=="object"?K8e:XI}function Y8e(t,e,r){const n=[],s=r||Q8e(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Y8e(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(th(t[0],t[i-1],c)):l}const o_=t=>t,xK=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,J8e=1e-7,X8e=12;function Z8e(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=xK(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>J8e&&++aZ8e(i,0,1,t,r);return i=>i===0||i===1?i:xK(s(i),e,n)}const EK=t=>1-Math.sin(Math.acos(t)),a_=n_(EK),e$e=r_(a_),SK=CK(.33,1.53,.69,.99),l_=n_(SK),t$e=r_(l_),r$e=t=>(t*=2)<1?.5*l_(t):.5*(2-Math.pow(2,-10*(t-1))),n$e={linear:o_,easeIn:s_,easeInOut:i_,easeOut:q8e,circIn:EK,circInOut:e$e,circOut:a_,backIn:l_,backInOut:t$e,backOut:SK,anticipate:r$e},ZI=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return CK(e,r,n,s)}else if(typeof t=="string")return n$e[t];return t},s$e=t=>Array.isArray(t)&&typeof t[0]!="number";function i$e(t,e){return t.map(()=>e||i_).splice(0,t.length-1)}function o$e(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function a$e(t,e){return t.map(r=>r*e)}function VS({keyframes:t,ease:e=i_,times:r,duration:n=300}){t=[...t];const s=s$e(e)?e.map(ZI):ZI(e),i={done:!1,value:t[0]},o=a$e(r&&r.length===t.length?r:o$e(t),n);function a(){return wK(o,t,{ease:Array.isArray(s)?s:i$e(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const JE=.001,l$e=.01,eO=10,c$e=.05,f$e=1;function u$e({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=eO*1e3);let o=1-e;o=th(c$e,f$e,o),t=th(l$e,eO,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=qS(c,o),v=Math.exp(-u);return JE-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=qS(Math.pow(c,2),o);return(-s(c)+JE>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-JE+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=h$e(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const d$e=12;function h$e(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function m$e(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!tO(t,y$e)&&tO(t,v$e)){const r=u$e(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const p$e=5;function kK({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=m$e(n);let h=g$e,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=qS(p,y);h=k=>{const A=Math.exp(-y*p*k);return i-A*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const A=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-A*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const A=Math.max(0,b-p$e);w=XA(p-h(A),b-A)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}kK.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const g$e=t=>0;function b$e({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const w$e={decay:b$e,keyframes:VS,tween:VS,spring:kK};function $K(t,e,r=0){return t-e-r}function x$e(t,e=0,r=0,n=!0){return n?$K(e+-t,e,r):e-(t-e)+r}function C$e(t,e,r,n){return n?t>=e+r:t<=-r}const E$e=t=>{const e=({delta:r})=>t(r);return{start:()=>Hn.update(e,!0),stop:()=>Ql.update(e)}};function qb({duration:t,driver:e=E$e,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,A=!0,x;const T=w$e[o.length>2?"keyframes":h]||VS,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=wK([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?(A=w%2===0,r=x$e(r,E,i,A)):(r=$K(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){A||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=A?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function S$e(t){return!t||Array.isArray(t)||typeof t=="string"&&AK[t]}const F1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,AK={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:F1([0,.65,.55,1]),circOut:F1([.55,0,1,.45]),backIn:F1([.31,.01,.66,-.59]),backOut:F1([.33,1.53,.69,.99])};function k$e(t){if(t)return Array.isArray(t)?F1(t):AK[t]}function $$e(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:k$e(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const rO={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},XE={},_K={};for(const t in rO)_K[t]=()=>(XE[t]===void 0&&(XE[t]=rO[t]()),XE[t]);function A$e(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const _$e=new Set(["opacity"]),Fm=10;function P$e(t,e,{onUpdate:r,onComplete:n,...s}){if(!(_K.waapi()&&_$e.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!S$e(s.ease)){if(s.repeat===1/0)return;const u=qb({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=Fm;o=h,a=v-Fm,c="linear"}const f=$$e(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(A$e(o,s)),Hn.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=qb({...s,autoplay:!1});t.setWithVelocity(d.sample(u-Fm).value,d.sample(u).value,Fm)}Hn.update(()=>f.cancel())}}}function PK(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ql.read(n),t(i-e))};return Hn.read(n,!0),()=>Ql.read(n)}function T$e({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:PK(s,-e)}:s()}function R$e({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var A;u==null||u(k),(A=E.onUpdate)===null||A===void 0||A.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),A=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=XA(L-x,la.delta),(A===1&&L>k||A===-1&&Ly==null?void 0:y.stop()}}const Pc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Bm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ZE=()=>({type:"keyframes",ease:"linear",duration:.3}),I$e={type:"keyframes",duration:.8},nO={x:Pc,y:Pc,z:Pc,rotate:Pc,rotateX:Pc,rotateY:Pc,rotateZ:Pc,scaleX:Bm,scaleY:Bm,scale:Bm,opacity:ZE,backgroundColor:ZE,color:ZE,default:Bm},O$e=(t,{keyframes:e})=>e.length>2?I$e:(nO[t]||nO.default)(e[1]),WS=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Yl.test(e)&&!e.startsWith("url("));function M$e({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function sO(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function iO(t){return typeof t=="number"?0:t_("",t)}function TK(t,e){return t[e]||t.default||t}function D$e(t,e,r,n){const s=WS(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=t_(e,r):sO(i)&&typeof r=="string"?i=iO(r):!Array.isArray(r)&&sO(r)&&typeof i=="string"&&(r=iO(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const c_=(t,e,r,n={})=>s=>{const i=TK(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Kp(o);const l=D$e(e,t,r,i),c=l[0],f=l[l.length-1],u=WS(t,c),d=WS(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||V8e.current||i.type===!1)return T$e(h);if(i.type==="inertia")return R$e(h);M$e(i)||(h={...h,...O$e(t,h)}),h.duration&&(h.duration=Kp(h.duration)),h.repeatDelay&&(h.repeatDelay=Kp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=P$e(e,t,h);if(g)return g}return qb(h)};function N$e(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>HS(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=HS(t,e,r);else{const s=typeof e=="function"?bx(t,e,r.custom):e;n=RK(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function HS(t,e,r={}){var n;const s=bx(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>RK(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return L$e(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function RK(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&F$e(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[z8e];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,Hn))}let g=h.start(c_(d,h,v,t.shouldReduceMotion&&Uh.has(d)?{type:!1}:y));zb(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&L8e(t,a)})}function L$e(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(j$e).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(HS(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function j$e(t,e){return t.sortNodePosition(e)}function F$e({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const f_=[gt.Animate,gt.InView,gt.Focus,gt.Hover,gt.Tap,gt.Drag,gt.Exit],B$e=[...f_].reverse(),U$e=f_.length;function z$e(t){return e=>Promise.all(e.map(({animation:r,options:n})=>N$e(t,r,n)))}function V$e(t){let e=z$e(t);const r=W$e();let n=!0;const s=(l,c)=>{const f=bx(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});A===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Fb(R)&&Fb(M)?!iK(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function q$e(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!iK(e,t):!1}function Tc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function W$e(){return{[gt.Animate]:Tc(!0),[gt.InView]:Tc(),[gt.Hover]:Tc(),[gt.Tap]:Tc(),[gt.Drag]:Tc(),[gt.Focus]:Tc(),[gt.Exit]:Tc()}}const H$e={animation:gl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=V$e(t)),vx(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:gl(t=>{const{custom:e,visualElement:r}=t,[n,s]=sK(),i=m.useContext(dx);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(gt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},oO=(t,e)=>Math.abs(t-e);function G$e(t,e){const r=oO(t.x,e.x),n=oO(t.y,e.y);return Math.sqrt(r**2+n**2)}class IK{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=t5(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=G$e(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=la;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=e5(f,this.transformPagePoint),Hn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=t5(c.type==="pointercancel"?this.lastMoveEventInfo:e5(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!JG(e))return;this.handlers=r,this.transformPagePoint=n;const s=KA(e),i=e5(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=la;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,t5(i,this.history)),this.removeListeners=px(wd(window,"pointermove",this.handlePointerMove),wd(window,"pointerup",this.handlePointerUp),wd(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ql.update(this.updatePoint)}}function e5(t,e){return e?{point:e(t.point)}:t}function aO(t,e){return{x:t.x-e.x,y:t.y-e.y}}function t5({point:t},e){return{point:t,delta:aO(t,OK(e)),offset:aO(t,K$e(e)),velocity:Q$e(e,.1)}}function K$e(t){return t[0]}function OK(t){return t[t.length-1]}function Q$e(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=OK(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Kp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Os(t){return t.max-t.min}function GS(t,e=0,r=.01){return Math.abs(t-e)<=r}function lO(t,e,r,n=.5){t.origin=n,t.originPoint=wr(e.min,e.max,t.origin),t.scale=Os(r)/Os(e),(GS(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=wr(r.min,r.max,t.origin)-t.originPoint,(GS(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Sv(t,e,r,n){lO(t.x,e.x,r.x,n==null?void 0:n.originX),lO(t.y,e.y,r.y,n==null?void 0:n.originY)}function cO(t,e,r){t.min=r.min+e.min,t.max=t.min+Os(e)}function Y$e(t,e,r){cO(t.x,e.x,r.x),cO(t.y,e.y,r.y)}function fO(t,e,r){t.min=e.min-r.min,t.max=t.min+Os(e)}function kv(t,e,r){fO(t.x,e.x,r.x),fO(t.y,e.y,r.y)}function J$e(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?wr(r,t,n.max):Math.min(t,r)),t}function uO(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function X$e(t,{top:e,left:r,bottom:n,right:s}){return{x:uO(t.x,r,s),y:uO(t.y,e,n)}}function dO(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Vb(e.min,e.max-n,t.min):n>s&&(r=Vb(t.min,t.max-s,e.min)),th(0,1,r)}function t4e(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const KS=.35;function r4e(t=KS){return t===!1?t=0:t===!0&&(t=KS),{x:hO(t,"left","right"),y:hO(t,"top","bottom")}}function hO(t,e,r){return{min:vO(t,e),max:vO(t,r)}}function vO(t,e){return typeof t=="number"?t:t[e]||0}const yO=()=>({translate:0,scale:1,origin:0,originPoint:0}),$v=()=>({x:yO(),y:yO()}),mO=()=>({min:0,max:0}),Br=()=>({x:mO(),y:mO()});function no(t){return[t("x"),t("y")]}function MK({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function n4e({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function s4e(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function r5(t){return t===void 0||t===1}function QS({scale:t,scaleX:e,scaleY:r}){return!r5(t)||!r5(e)||!r5(r)}function Nc(t){return QS(t)||DK(t)||t.z||t.rotate||t.rotateX||t.rotateY}function DK(t){return pO(t.x)||pO(t.y)}function pO(t){return t&&t!=="0%"}function Wb(t,e,r){const n=t-r,s=e*n;return r+s}function gO(t,e,r,n,s){return s!==void 0&&(t=Wb(t,s,n)),Wb(t,r,n)+e}function YS(t,e=0,r=1,n,s){t.min=gO(t.min,e,r,n,s),t.max=gO(t.max,e,r,n,s)}function NK(t,{x:e,y:r}){YS(t.x,e.translate,e.scale,e.originPoint),YS(t.y,r.translate,r.scale,r.originPoint)}function i4e(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function il(t,e){t.min=t.min+e,t.max=t.max+e}function wO(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=wr(t.min,t.max,i);YS(t,e[r],e[n],o,e.scale)}const o4e=["x","scaleX","originX"],a4e=["y","scaleY","originY"];function Yu(t,e){wO(t.x,e,o4e),wO(t.y,e,a4e)}function LK(t,e){return MK(s4e(t.getBoundingClientRect(),e))}function l4e(t,e,r){const n=LK(t,r),{scroll:s}=e;return s&&(il(n.x,s.offset.x),il(n.y,s.offset.y)),n}const c4e=new WeakMap;class f4e{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Br(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(KA(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eK(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),no(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(Ao.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Os(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(gt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=u4e(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new IK(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(gt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!Um(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=J$e(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Ku(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=X$e(n.layoutBox,e):this.constraints=!1,this.elastic=r4e(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&no(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=t4e(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Ku(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=l4e(n,s.root,this.visualElement.getTransformPagePoint());let o=Z$e(s.layout.layoutBox,i);if(r){const a=r(n4e(o));this.hasMutatedConstraints=!!a,a&&(o=MK(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=no(f=>{if(!Um(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(c_(e,n,0,r))}stopAnimation(){no(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){no(r=>{const{drag:n}=this.getProps();if(!Um(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-wr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ku(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};no(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=e4e({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),no(a=>{if(!Um(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(wr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;c4e.set(this.visualElement,this);const r=this.visualElement.current,n=wd(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Ku(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=mx(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(no(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=KS,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Um(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function u4e(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function d4e(t){const{dragControls:e,visualElement:r}=t,n=FA(()=>new f4e(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function h4e({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(jA),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new IK(f,l,{transformPagePoint:a})}Bb(s,"pointerdown",i&&c),nK(()=>o.current&&o.current.end())}const v4e={pan:gl(h4e),drag:gl(d4e)};function JS(t){return typeof t=="string"&&t.startsWith("var(--")}const jK=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function y4e(t){const e=jK.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function XS(t,e,r=1){const[n,s]=y4e(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():JS(s)?XS(s,e,r+1):s}function m4e(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!JS(i))return;const o=XS(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!JS(i))continue;const o=XS(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const p4e=new Set(["width","height","top","left","right","bottom","x","y"]),FK=t=>p4e.has(t),g4e=t=>Object.keys(t).some(FK),xO=t=>t===Kf||t===Ee;var CO;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(CO||(CO={}));const EO=(t,e)=>parseFloat(t.split(", ")[e]),SO=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return EO(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?EO(i[1],t):0}},b4e=new Set(["x","y","z"]),w4e=Lb.filter(t=>!b4e.has(t));function x4e(t){const e=[];return w4e.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const kO={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:SO(4,13),y:SO(5,14)},C4e=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=kO[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=kO[c](l,i)}),t},E4e=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(FK);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=x1(f);const d=e[l];let h;if(Fb(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=x1(f);for(let g=y;g=0?window.pageYOffset:null,c=C4e(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),hx&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function S4e(t,e,r,n){return g4e(e)?E4e(t,e,r,n):{target:e,transitionEnd:n}}const k4e=(t,e,r,n)=>{const s=m4e(t,e,n);return e=s.target,n=s.transitionEnd,S4e(t,e,r,n)},ZS={current:null},BK={current:!1};function $4e(){if(BK.current=!0,!!hx)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ZS.current=t.matches;t.addListener(e),e()}else ZS.current=!1}function A4e(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(ds(i))t.addValue(s,i),zb(n)&&n.add(s);else if(ds(o))t.addValue(s,rh(i,{owner:t})),zb(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,rh(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const UK=Object.keys(Fy),_4e=UK.length,$O=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class P4e{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Hn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=yx(r),this.isVariantNode=LG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&ds(u)&&(u.set(o[f],!1),zb(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),BK.current||$4e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ZS.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Ql.update(this.notifyUpdate),Ql.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=Uh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Hn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;c<_4e;c++){const f=UK[c],{isEnabled:u,Component:d}=Fy[f];u(r)&&d&&l.push(m.createElement(d,{key:f,...r,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:f,drag:u,dragConstraints:d,layoutScroll:h,layoutRoot:v}=r;this.projection.setOptions({layoutId:c,layout:f,alwaysMeasureLayout:Boolean(u)||d&&Ku(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Br()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;n<$O.length;n++){const s=$O[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=A4e(this,this.scrapeMotionValuesFromProps(e,r),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var r,n;if(e)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){const i=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const s={};for(let i=0;in.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=rh(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=GA(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ds(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new JA),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const zK=["initial",...f_],T4e=zK.length;class VK extends P4e{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=B8e(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){j8e(this,n,o);const a=k4e(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function R4e(t){return window.getComputedStyle(t)}class I4e extends VK{readValueFromInstance(e,r){if(Uh.has(r)){const n=e_(r);return n&&n.default||0}else{const n=R4e(e),s=(UG(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return LK(e,r)}build(e,r,n,s){UA(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return HA(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ds(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){HG(e,r,n,s)}}class O4e extends VK{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Uh.has(r)?((n=e_(r))===null||n===void 0?void 0:n.default)||0:(r=GG.has(r)?r:WA(r),e.getAttribute(r))}measureInstanceViewportBox(){return Br()}scrapeMotionValuesFromProps(e,r){return QG(e,r)}build(e,r,n,s){VA(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){KG(e,r,n,s)}mount(e){this.isSVGTag=qA(e.tagName),super.mount(e)}}const M4e=(t,e)=>BA(t)?new O4e(e,{enableHardwareAcceleration:!1}):new I4e(e,{enableHardwareAcceleration:!0});function AO(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const C1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ee.test(t))t=parseFloat(t);else return t;const r=AO(t,e.target.x),n=AO(t,e.target.y);return`${r}% ${n}%`}},_O="_$css",D4e={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(jK,h=>(i.push(h),_O)));const o=Yl.parse(t);if(o.length>5)return n;const a=Yl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=wr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(_O,()=>{const v=i[h];return h++,v})}return d}};class N4e extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Ake(j4e),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),xv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Hn.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function L4e(t){const[e,r]=sK(),n=m.useContext(jG);return P.createElement(N4e,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(FG),isPresent:e,safeToRemove:r})}const j4e={borderRadius:{...C1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:C1,borderTopRightRadius:C1,borderBottomLeftRadius:C1,borderBottomRightRadius:C1,boxShadow:D4e},F4e={measureLayout:L4e};function B4e(t,e,r={}){const n=ds(t)?t:rh(t);return n.start(c_("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const qK=["TopLeft","TopRight","BottomLeft","BottomRight"],U4e=qK.length,PO=t=>typeof t=="string"?parseFloat(t):t,TO=t=>typeof t=="number"||Ee.test(t);function z4e(t,e,r,n,s,i){s?(t.opacity=wr(0,r.opacity!==void 0?r.opacity:1,V4e(n)),t.opacityExit=wr(e.opacity!==void 0?e.opacity:1,0,q4e(n))):i&&(t.opacity=wr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Vb(t,e,n))}function IO(t,e){t.min=e.min,t.max=e.max}function wi(t,e){IO(t.x,e.x),IO(t.y,e.y)}function OO(t,e,r,n,s){return t-=e,t=Wb(t,1/r,n),s!==void 0&&(t=Wb(t,1/s,n)),t}function W4e(t,e=0,r=1,n=.5,s,i=t,o=t){if(Ao.test(e)&&(e=parseFloat(e),e=wr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=wr(i.min,i.max,n);t===i&&(a-=e),t.min=OO(t.min,e,r,a,s),t.max=OO(t.max,e,r,a,s)}function MO(t,e,[r,n,s],i,o){W4e(t,e[r],e[n],e[s],e.scale,i,o)}const H4e=["x","scaleX","originX"],G4e=["y","scaleY","originY"];function DO(t,e,r,n){MO(t.x,e,H4e,r==null?void 0:r.x,n==null?void 0:n.x),MO(t.y,e,G4e,r==null?void 0:r.y,n==null?void 0:n.y)}function NO(t){return t.translate===0&&t.scale===1}function HK(t){return NO(t.x)&&NO(t.y)}function GK(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function LO(t){return Os(t.x)/Os(t.y)}class K4e{constructor(){this.members=[]}add(e){QA(this.members,e),e.scheduleRender()}remove(e){if(YA(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jO(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const Q4e=(t,e)=>t.depth-e.depth;class Y4e{constructor(){this.children=[],this.isDirty=!1}add(e){QA(this.children,e),this.isDirty=!0}remove(e){YA(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Q4e),this.isDirty=!1,this.children.forEach(e)}}const FO=["","X","Y","Z"],BO=1e3;let J4e=0;function KK({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=J4e++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(eAe),this.nodes.forEach(nAe),this.nodes.forEach(sAe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=PK(h,250),xv.hasAnimatedSinceResize&&(xv.hasAnimatedSinceResize=!1,this.nodes.forEach(zO))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:cAe,{onLayoutAnimationStart:A,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!GK(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={...TK(k,"layout"),onPlay:A,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&zO(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Ql.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(iAe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var w;const E=p/1e3;VO(h.x,o.x,E),VO(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(kv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aAe(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,z4e(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ql.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hn.update(()=>{xv.hasAnimatedSinceResize=!0,this.currentAnimation=B4e(0,BO,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,BO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&QK(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Br();const u=Os(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Os(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}wi(a,l),Yu(a,f),Sv(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new K4e),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(UO),this.root.sharedNodes.clear()}}}function X4e(t){t.updateLayout()}function Z4e(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(v);v.min=i[h].min,v.max=v.min+y}):QK(a,s.layoutBox,i)&&no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(i[h]);v.max=v.min+y});const c=$v();Sv(c,i,s.layoutBox);const f=$v();l?Sv(f,t.applyTransform(o,!0),s.measuredBox):Sv(f,i,s.layoutBox);const u=!HK(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Br();kv(g,s.layoutBox,v.layoutBox);const b=Br();kv(b,i,y.layoutBox),GK(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function eAe(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function tAe(t){t.clearSnapshot()}function UO(t){t.clearMeasurements()}function rAe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zO(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function nAe(t){t.resolveTargetDelta()}function sAe(t){t.calcProjection()}function iAe(t){t.resetRotation()}function oAe(t){t.removeLeadSnapshot()}function VO(t,e,r){t.translate=wr(e.translate,0,r),t.scale=wr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function qO(t,e,r,n){t.min=wr(e.min,r.min,n),t.max=wr(e.max,r.max,n)}function aAe(t,e,r,n){qO(t.x,e.x,r.x,n),qO(t.y,e.y,r.y,n)}function lAe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cAe={duration:.45,ease:[.4,0,.1,1]};function fAe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function WO(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function uAe(t){WO(t.x),WO(t.y)}function QK(t,e,r){return t==="position"||t==="preserve-aspect"&&!GS(LO(e),LO(r),.2)}const dAe=KK({attachResizeListener:(t,e)=>mx(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),n5={current:void 0},hAe=KK({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!n5.current){const t=new dAe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),n5.current=t}return n5.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),vAe={...H$e,...d8e,...v4e,...F4e},yAe=kke((t,e)=>Zke(t,e,vAe,M4e,hAe)),mAe={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};function pAe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gAe(t){var e=pAe(t,"string");return typeof e=="symbol"?e:String(e)}function bAe(t,e,r){return e=gAe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function s5(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=s5({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?s5(s5({},f),u):l,p=function(){var A=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof A=="string"||typeof A=="number")c.push(x.values[A].defaultClass);else if(Array.isArray(A))for(var T=0;Tt,CAe=function(){return wAe(xAe)(...arguments)},YK=CAe({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},backgroundRaised:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderNormal:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},borderFocus:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonGlass:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonEmphasis:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},buttonInverse:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text80:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},text100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},textInverse100:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumDark:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},arbitrumLight:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceDark:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},avalanceLight:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscDark:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},bscLight:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumDark:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},ethereumLight:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisDark:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},gnosisLight:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonDark:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},polygonLight:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundPrimary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundSecondary:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundContrast:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundMuted:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundControl:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundInverse:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundBackdrop:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},backgroundOverlay:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},backgroundRaised:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},borderNormal:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},borderFocus:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonGlass:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},buttonEmphasis:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},buttonInverse:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},text80:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},text100:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},textInverse100:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},arbitrumDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},arbitrumLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},avalanceDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},avalanceLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},bscDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},bscLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},ethereumDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},ethereumLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},gnosisDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},gnosisLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},polygonDark:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},polygonLight:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundPrimary:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundSecondary:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundContrast:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundMuted:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundControl:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundInverse:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},backgroundBackdrop:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},backgroundOverlay:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},backgroundRaised:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},borderNormal:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},borderFocus:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},buttonGlass:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},buttonEmphasis:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},buttonInverse:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},text80:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},text100:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},textInverse100:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},arbitrumDark:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},arbitrumLight:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},avalanceDark:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},avalanceLight:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},bscDark:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},bscLight:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},ethereumDark:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},ethereumLight:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},gnosisDark:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},gnosisLight:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},polygonDark:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},polygonLight:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundPrimary:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundSecondary:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundContrast:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundMuted:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundControl:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},backgroundInverse:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},backgroundBackdrop:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},backgroundOverlay:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},backgroundRaised:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},borderNormal:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},borderFocus:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},buttonGlass:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},buttonEmphasis:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},buttonInverse:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},text80:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},text100:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},textInverse100:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},arbitrumDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},arbitrumLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},avalanceDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},avalanceLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},bscDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},bscLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},ethereumDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},ethereumLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},gnosisDark:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},gnosisLight:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},polygonDark:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},polygonLight:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundPrimary:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundSecondary:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundContrast:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundMuted:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},backgroundControl:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},backgroundInverse:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},backgroundBackdrop:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},backgroundOverlay:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},backgroundRaised:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},borderNormal:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},borderFocus:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},buttonGlass:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},buttonEmphasis:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},buttonInverse:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},text80:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},text100:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},textInverse100:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},arbitrumDark:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},arbitrumLight:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},avalanceDark:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},avalanceLight:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},bscDark:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},bscLight:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},ethereumDark:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},ethereumLight:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},gnosisDark:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},gnosisLight:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},polygonDark:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},polygonLight:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundPrimary:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundSecondary:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundContrast:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},backgroundMuted:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},backgroundControl:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},backgroundInverse:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},backgroundBackdrop:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},backgroundOverlay:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},backgroundRaised:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},borderNormal:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},borderFocus:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},buttonGlass:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},buttonEmphasis:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},buttonInverse:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},text80:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},text100:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},textInverse100:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},arbitrumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},arbitrumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},avalanceDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},avalanceLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},bscDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},bscLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},ethereumDark:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},ethereumLight:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},gnosisDark:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},gnosisLight:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},polygonDark:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},polygonLight:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const EAe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],ek=t=>(t.display||(t.display=Object.keys(t).some(e=>EAe.includes(e))?"flex":void 0),YK(t));ek.properties=YK.properties;function JK(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const c in i)ek.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=ek({...o,...n});return m.createElement(r,{className:js(l,s),...a,ref:e})});var XK={exports:{}},E1={};/** * @license React * react-jsx-runtime.production.min.js * @@ -206,8 +206,8 @@ PERFORMANCE OF THIS SOFTWARE. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var GO;function $Ae(){if(GO)return E1;GO=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return E1.Fragment=r,E1.jsx=o,E1.jsxs=o,E1}XK.exports=$Ae();var se=XK.exports;function AAe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _Ae(t){var e=AAe(t,"string");return typeof e=="symbol"?e:String(e)}function PAe(t,e,r){return e=_Ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function QO(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},yr=t=>{var e=r=>{var n=t.defaultClassName,s=QO(QO({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)TAe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return YO(t.variantClassNames,r=>YO(r,n=>n.split(" ")[0]))}},e};yr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});var RAe=yr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const ji=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=gAe[n];return se.jsx(dt,{as:r,className:js(s,RAe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var IAe=yr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11rh fyvr12sh",emphasis:"fyvr11rn fyvr12sh",raised:"fyvr11qz fyvr12sh",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const OAe=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return se.jsx(dt,{as:r,className:js(s,IAe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?se.jsx(f,{size:k}):se.jsxs(dt,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[se.jsxs(dt,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&se.jsx(f,{size:k}),se.jsx(ji,{children:c})]}),u&&se.jsx(u,{size:k})]})})});var MAe=yr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return se.jsx(dt,{className:js(r,MAe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function $e(){return $e=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>DAe(r,e))}function Cr(...t){return m.useCallback(ZK(...t),t)}function In(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,NAe(s,...e)]}function NAe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ve(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function oi(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function zy({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=LAe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=oi(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function LAe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=oi(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function u_(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ai=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function d_(t){const[e,r]=m.useState(void 0);return ai(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function jAe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const wx=t=>{const{present:e,children:r}=t,n=FAe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Cr(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};wx.displayName="Presence";function FAe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=jAe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=zm(n.current);i.current=a==="mounted"?c:"none"},[a]),ai(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=zm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ai(()=>{if(e){const c=u=>{const h=zm(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=zm(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function zm(t){return(t==null?void 0:t.animationName)||"none"}function nh(){return nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(UAe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(tk,$e({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(tk,$e({},n,{ref:e}),r)});Vy.displayName="Slot";const tk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...zAe(n,r.props),ref:e?ZK(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});tk.displayName="SlotClone";const BAe=({children:t})=>m.createElement(m.Fragment,null,t);function UAe(t){return m.isValidElement(t)&&t.type===BAe}function zAe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const VAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],vt=VAe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Vy:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,nh({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function h_(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eQ="Checkbox",[qAe,cHe]=In(eQ),[WAe,HAe]=qAe(eQ),GAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Cr(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=zy({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(WAe,{scope:r,state:g,disabled:a},m.createElement(vt.button,$e({type:"button",role:"checkbox","aria-checked":uf(g)?"mixed":g,"aria-required":o,"data-state":tQ(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Ve(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ve(t.onClick,w=>{b(E=>uf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(YAe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),KAe="CheckboxIndicator",QAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=HAe(KAe,r);return m.createElement(wx,{present:n||uf(i.state)||i.state===!0},m.createElement(vt.span,$e({"data-state":tQ(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),YAe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=uf(r),u.call(l,uf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"checkbox","aria-hidden":!0,defaultChecked:uf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uf(t){return t==="indeterminate"}function tQ(t){return uf(t)?"indeterminate":t?"checked":"unchecked"}const JAe=GAe,XAe=QAe;var ZAe=yr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const zh=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?se.jsxs(dt,{flexDirection:"column",gap:"0.5",children:[r&&se.jsx(ji,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&se.jsx(ji,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return se.jsxs(dt,{as:"label",className:ZAe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var xx=yr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const e_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),rQ=({size:t="sm",...e})=>se.jsx(dt,{as:e_e,className:xx({size:t}),...e}),t_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),r_e=({size:t="sm",...e})=>se.jsx(dt,{as:t_e,className:xx({size:t}),...e}),n_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),nQ=({size:t="sm",...e})=>se.jsx(dt,{as:n_e,className:xx({size:t}),...e}),s_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),i_e=({size:t="sm",...e})=>se.jsx(dt,{as:s_e,className:xx({size:t}),...e});var o_e=yr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),a_e=yr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const l_e=({size:t="sm"})=>se.jsx(XAe,{className:a_e({size:t}),children:se.jsx(rQ,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return se.jsx(zh,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:se.jsx(JAe,{className:o_e({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:se.jsx(l_e,{})})})});P.createContext(null);const c_e=t8["useId".toString()]||(()=>{});let f_e=0;function Cx(t){const[e,r]=m.useState(c_e());return ai(()=>{t||r(n=>n??String(f_e++))},[t]),t||(e?`radix-${e}`:"")}const sQ="Collapsible",[u_e,fHe]=In(sQ);u_e(sQ);function Ex(t){const e=t+"CollectionProvider",[r,n]=In(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=Cr(v,b.collectionRef);return P.createElement(Vy,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=Cr(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Vy,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const d_e=m.createContext(void 0);function v_(t){const e=m.useContext(d_e);return t||e||"ltr"}function h_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const rk="dismissableLayer.update",v_e="dismissableLayer.pointerDownOutside",y_e="dismissableLayer.focusOutside";let JO;const m_e=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iQ=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(m_e),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Cr(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=p_e(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=g_e(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return h_e(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(JO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),XO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=JO)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),XO())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(rk,T),()=>document.removeEventListener(rk,T)},[]),m.createElement(vt.div,$e({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,$.onPointerDownCapture)}))});function p_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){oQ(v_e,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function g_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&oQ(y_e,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function XO(){const t=new CustomEvent(rk);document.dispatchEvent(t)}function oQ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const b_e=iQ;let i5=0;function w_e(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:ZO()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:ZO()),i5++,()=>{i5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),i5--}},[])}function ZO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const o5="focusScope.autoFocusOnMount",a5="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},x_e=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=oi(s),f=oi(i),u=m.useRef(null),d=Cr(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ya(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ya(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ya(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){rM.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(o5,eM);a.addEventListener(o5,c),a.dispatchEvent(b),b.defaultPrevented||(C_e(A_e(aQ(a)),{select:!0}),document.activeElement===y&&Ya(a))}return()=>{a.removeEventListener(o5,c),setTimeout(()=>{const b=new CustomEvent(a5,eM);a.addEventListener(a5,f),a.dispatchEvent(b),b.defaultPrevented||Ya(y??document.body,{select:!0}),a.removeEventListener(a5,f),rM.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=E_e(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ya(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ya(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(vt.div,$e({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function C_e(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ya(n,{select:e}),document.activeElement!==r)return}function E_e(t){const e=aQ(t),r=tM(e,t),n=tM(e.reverse(),t);return[r,n]}function aQ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function tM(t,e){for(const r of t)if(!S_e(r,{upTo:e}))return r}function S_e(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function k_e(t){return t instanceof HTMLInputElement&&"select"in t}function Ya(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&k_e(t)&&e&&t.select()}}const rM=$_e();function $_e(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=nM(t,e),t.unshift(e)},remove(e){var r;t=nM(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function nM(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function A_e(t){return t.filter(e=>e.tagName!=="A")}function Vh(t){return t.split("-")[1]}function y_(t){return t==="y"?"height":"width"}function ca(t){return t.split("-")[0]}function Qf(t){return["top","bottom"].includes(ca(t))?"x":"y"}function sM(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Qf(e),l=y_(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ca(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Vh(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const __e=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=sM(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=lQ(n),u={x:s,y:i},d=Qf(o),h=y_(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[p]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=$-v[h]-f[b],L=$/2-v[h]/2+x,U=sk(T,L,B),V=Vh(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const P_e={left:"right",right:"left",bottom:"top",top:"bottom"};function Gb(t){return t.replace(/left|right|bottom|top/g,e=>P_e[e])}function T_e(t,e,r){r===void 0&&(r=!1);const n=Vh(t),s=Qf(t),i=y_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Gb(o)),{main:o,cross:Gb(o)}}const R_e={start:"end",end:"start"};function l5(t){return t.replace(/start|end/g,e=>R_e[e])}const I_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ca(n),b=ca(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[Gb(o)]:function(U){const V=Gb(U);return[l5(U),V,l5(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=Vh(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],A=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?A:j;default:return[]}}(ca(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(l5)))),R}(o,v,h,p));const E=[o,...w],k=await qy(e,y),$=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[g]),f){const{main:U,cross:V}=T_e(n,i,p);$.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function oM(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function aM(t){return cQ.some(e=>t[e]>=0)}const O_e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=oM(await qy(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:aM(i)}}}case"escaped":{const i=oM(await qy(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:aM(i)}}}default:return{}}}}},M_e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ca(a),d=Vh(a),h=Qf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function fQ(t){return t==="x"?"y":"x"}const D_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await qy(e,l),u=Qf(ca(s)),d=fQ(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=sk(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=sk(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},N_e=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Qf(s),d=fQ(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ca(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},L_e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await qy(e,a),c=ca(r),f=Vh(r),u=Qf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?nk(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?nk(g,$):$}if(p&&!f){const $=Lc(l.left,0),x=Lc(l.right,0),T=Lc(l.top,0),B=Lc(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Lc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Lc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Zs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Fi(t){return Zs(t).getComputedStyle(t)}function uQ(t){return t instanceof Zs(t).Node}function Jl(t){return uQ(t)?(t.nodeName||"").toLowerCase():""}function Hi(t){return t instanceof Zs(t).HTMLElement}function $s(t){return t instanceof Zs(t).Element}function lM(t){return typeof ShadowRoot>"u"?!1:t instanceof Zs(t).ShadowRoot||t instanceof ShadowRoot}function Wy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Fi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function j_e(t){return["table","td","th"].includes(Jl(t))}function ik(t){const e=m_(),r=Fi(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function m_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Sx(t){return["html","body","#document"].includes(Jl(t))}const cM=Math.min,Av=Math.max,Kb=Math.round;function dQ(t){const e=Fi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Hi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Kb(r)!==i||Kb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function hQ(t){return $s(t)?t:t.contextElement}const vQ={x:1,y:1};function xd(t){const e=hQ(t);if(!Hi(e))return vQ;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=dQ(e);let o=(i?Kb(r.width):r.width)/n,a=(i?Kb(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const fM={x:0,y:0};function yQ(t,e,r){var n,s;if(e===void 0&&(e=!0),!m_())return fM;const i=t?Zs(t):window;return!r||e&&r!==i?fM:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Rf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=hQ(t);let o=vQ;e&&(n?$s(n)&&(o=xd(n)):o=xd(t));const a=yQ(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Zs(i),h=n&&$s(n)?Zs(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=xd(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Zs(v).frameElement}}return Hb({width:f,height:u,x:l,y:c})}function Ml(t){return((uQ(t)?t.ownerDocument:t.document)||window.document).documentElement}function kx(t){return $s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(t){return Rf(Ml(t)).left+kx(t).scrollLeft}function sh(t){if(Jl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||lM(t)&&t.host||Ml(t);return lM(e)?e.host:e}function pQ(t){const e=sh(t);return Sx(e)?e.ownerDocument.body:Hi(e)&&Wy(e)?e:pQ(e)}function _v(t,e){var r;e===void 0&&(e=[]);const n=pQ(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Zs(n);return s?e.concat(i,i.visualViewport||[],Wy(n)?n:[]):e.concat(n,_v(n))}function uM(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Zs(s),a=Ml(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=m_();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=Ml(s),o=kx(s),a=s.ownerDocument.body,l=Av(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=Av(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+mQ(s);const u=-o.scrollTop;return Fi(a).direction==="rtl"&&(f+=Av(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(Ml(t));else if($s(e))n=function(s,i){const o=Rf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Hi(s)?xd(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=yQ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Hb(n)}function gQ(t,e){const r=sh(t);return!(r===e||!$s(r)||Sx(r))&&(Fi(r).position==="fixed"||gQ(r,e))}function dM(t,e){return Hi(t)&&Fi(t).position!=="fixed"?e?e(t):t.offsetParent:null}function hM(t,e){const r=Zs(t);if(!Hi(t))return r;let n=dM(t,e);for(;n&&j_e(n)&&Fi(n).position==="static";)n=dM(n,e);return n&&(Jl(n)==="html"||Jl(n)==="body"&&Fi(n).position==="static"&&!ik(n))?r:n||function(s){let i=sh(s);for(;Hi(i)&&!Sx(i);){if(ik(i))return i;i=sh(i)}return null}(t)||r}function F_e(t,e,r){const n=Hi(e),s=Ml(e),i=r==="fixed",o=Rf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Jl(e)!=="body"||Wy(s))&&(a=kx(e)),Hi(e)){const c=Rf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=mQ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const B_e={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=_v(c).filter(g=>$s(g)&&Jl(g)!=="body"),h=null;const v=Fi(c).position==="fixed";let y=v?sh(c):c;for(;$s(y)&&!Sx(y);){const g=Fi(y),b=ik(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||Wy(y)&&!b&&gQ(c,y))?d=d.filter(p=>p!==y):h=g,y=sh(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=uM(e,f,s);return c.top=Av(u.top,c.top),c.right=cM(u.right,c.right),c.bottom=cM(u.bottom,c.bottom),c.left=Av(u.left,c.left),c},uM(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Hi(r),i=Ml(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Jl(r)!=="body"||Wy(i))&&(o=kx(r)),Hi(r))){const c=Rf(r);a=xd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:$s,getDimensions:function(t){return dQ(t)},getOffsetParent:hM,getDocumentElement:Ml,getScale:xd,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||hM,i=this.getDimensions;return{reference:F_e(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Fi(t).direction==="rtl"};function U_e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...$s(t)?_v(t):t.contextElement?_v(t.contextElement):[],..._v(e)]:[];l.forEach(d=>{const h=!$s(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),$s(t)&&!a&&f.observe(t),$s(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?Rf(t):null;return a&&function d(){const h=Rf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const z_e=(t,e,r)=>{const n=new Map,s={platform:B_e,...r},i={...s.platform,_c:n};return __e(t,e,{...s,platform:i})},V_e=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?iM({element:e.current,padding:r}).fn(s):{}:e?iM({element:e,padding:r}).fn(s):{}}}};var Qp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Qb(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Qb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function bQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vM(t,e){const r=bQ(t);return Math.round(e*r)/r}function yM(t){const e=m.useRef(t);return Qp(()=>{e.current=t}),e}function q_e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);Qb(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=yM(l),L=yM(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),z_e($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!Qb(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Qp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Qp(()=>(V.current=!0,()=>{V.current=!1}),[]),Qp(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=vM(C.floating,f.x),_=vM(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...bQ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const wQ="Popper",[xQ,qh]=In(wQ),[W_e,CQ]=xQ(wQ),H_e=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(W_e,{scope:e,anchor:n,onAnchorChange:s},r)},G_e="PopperAnchor",K_e=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=CQ(G_e,r),o=m.useRef(null),a=Cr(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(vt.div,$e({},s,{ref:a}))}),EQ="PopperContent",[Q_e,uHe]=xQ(EQ),Y_e=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=CQ(EQ,f),[T,B]=m.useState(null),L=Cr(e,ie=>B(ie)),[U,V]=m.useState(null),N=d_(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(J_e),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=q_e({strategy:"fixed",placement:R,whileElementsMounted:U_e,elements:{reference:x.anchor},middleware:[M_e({mainAxis:d+S,alignmentAxis:v}),E&&D_e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?N_e():void 0,...F}),E&&I_e({...F}),L_e({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&V_e({element:U,padding:y}),X_e({arrowWidth:C,arrowHeight:S}),w&&O_e({strategy:"referenceHidden"})]}),[q,z]=SQ(j),H=oi(k);ai(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ai(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(Q_e,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(vt.div,$e({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function J_e(t){return t!==null}const X_e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=SQ(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function SQ(t){const[e,r="center"]=t.split("-");return[e,r]}const Z_e=H_e,ePe=K_e,tPe=Y_e,rPe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(vt.div,$e({},s,{ref:e})),n):null}),c5="rovingFocusGroup.onEntryFocus",nPe={bubbles:!1,cancelable:!0},p_="RovingFocusGroup",[ok,kQ,sPe]=Ex(p_),[iPe,Wh]=In(p_,[sPe]),[oPe,aPe]=iPe(p_),lPe=m.forwardRef((t,e)=>m.createElement(ok.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(ok.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(cPe,nh({},t,{ref:e}))))),cPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Cr(e,u),h=v_(i),[v=null,y]=zy({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=oi(c),w=kQ(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(c5,p),()=>x.removeEventListener(c5,p)},[p]),m.createElement(oPe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>$(x=>x-1),[])},m.createElement(vt.div,nh({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ve(t.onMouseDown,()=>{E.current=!0}),onFocus:Ve(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(c5,nPe);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);$Q(C)}}E.current=!1}),onBlur:Ve(t.onBlur,()=>b(!1))})))}),fPe="RovingFocusGroupItem",uPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Cx(),l=i||a,c=aPe(fPe,r),f=c.currentTabStopId===l,u=kQ(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(ok.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(vt.span,nh({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Ve(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Ve(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ve(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=vPe(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?yPe(b,p+1):b.slice(p+1)}setTimeout(()=>$Q(b))}})})))}),dPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hPe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vPe(t,e,r){const n=hPe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dPe[n]}function $Q(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function yPe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const mPe=lPe,AQ=uPe;var pPe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},mu=new WeakMap,Vm=new WeakMap,qm={},f5=0,_Q=function(t){return t&&(t.host||_Q(t.parentNode))},gPe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=_Q(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},bPe=function(t,e,r,n){var s=gPe(e,Array.isArray(t)?t:[t]);qm[r]||(qm[r]=new WeakMap);var i=qm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(mu.get(d)||0)+1,g=(i.get(d)||0)+1;mu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&Vm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),f5++,function(){o.forEach(function(u){var d=mu.get(u)-1,h=i.get(u)-1;mu.set(u,d),i.set(u,h),d||(Vm.has(u)||u.removeAttribute(n),Vm.delete(u)),h||u.removeAttribute(r)}),f5--,f5||(mu=new WeakMap,mu=new WeakMap,Vm=new WeakMap,qm={})}},wPe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||pPe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),bPe(n,s,r,"aria-hidden")):function(){return null}},mo=function(){return mo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return LPe;var e=jPe(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},BPe=IQ(),UPe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(CPe,` { + */var GO;function SAe(){if(GO)return E1;GO=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return E1.Fragment=r,E1.jsx=o,E1.jsxs=o,E1}XK.exports=SAe();var se=XK.exports;function kAe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $Ae(t){var e=kAe(t,"string");return typeof e=="symbol"?e:String(e)}function AAe(t,e,r){return e=$Ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function QO(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},vr=t=>{var e=r=>{var n=t.defaultClassName,s=QO(QO({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)_Ae(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return YO(t.variantClassNames,r=>YO(r,n=>n.split(" ")[0]))}},e};vr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});var PAe=vr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Li=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=mAe[n];return se.jsx(dt,{as:r,className:js(s,PAe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var TAe=vr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11rh fyvr12sh",emphasis:"fyvr11rn fyvr12sh",raised:"fyvr11qz fyvr12sh",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const RAe=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return se.jsx(dt,{as:r,className:js(s,TAe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?se.jsx(f,{size:k}):se.jsxs(dt,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[se.jsxs(dt,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&se.jsx(f,{size:k}),se.jsx(Li,{children:c})]}),u&&se.jsx(u,{size:k})]})})});var IAe=vr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return se.jsx(dt,{className:js(r,IAe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function $e(){return $e=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>OAe(r,e))}function xr(...t){return m.useCallback(ZK(...t),t)}function In(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,MAe(s,...e)]}function MAe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ve(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function oi(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function zy({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=DAe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=oi(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function DAe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=oi(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function u_(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ai=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function d_(t){const[e,r]=m.useState(void 0);return ai(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function NAe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const wx=t=>{const{present:e,children:r}=t,n=LAe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=xr(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};wx.displayName="Presence";function LAe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=NAe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=zm(n.current);i.current=a==="mounted"?c:"none"},[a]),ai(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=zm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ai(()=>{if(e){const c=u=>{const h=zm(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=zm(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function zm(t){return(t==null?void 0:t.animationName)||"none"}function nh(){return nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(FAe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(tk,$e({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(tk,$e({},n,{ref:e}),r)});Vy.displayName="Slot";const tk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...BAe(n,r.props),ref:e?ZK(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});tk.displayName="SlotClone";const jAe=({children:t})=>m.createElement(m.Fragment,null,t);function FAe(t){return m.isValidElement(t)&&t.type===jAe}function BAe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const UAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],vt=UAe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Vy:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,nh({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function h_(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eQ="Checkbox",[zAe,oHe]=In(eQ),[VAe,qAe]=zAe(eQ),WAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=xr(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=zy({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(VAe,{scope:r,state:g,disabled:a},m.createElement(vt.button,$e({type:"button",role:"checkbox","aria-checked":uf(g)?"mixed":g,"aria-required":o,"data-state":tQ(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Ve(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ve(t.onClick,w=>{b(E=>uf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(KAe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),HAe="CheckboxIndicator",GAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=qAe(HAe,r);return m.createElement(wx,{present:n||uf(i.state)||i.state===!0},m.createElement(vt.span,$e({"data-state":tQ(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),KAe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=uf(r),u.call(l,uf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"checkbox","aria-hidden":!0,defaultChecked:uf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uf(t){return t==="indeterminate"}function tQ(t){return uf(t)?"indeterminate":t?"checked":"unchecked"}const QAe=WAe,YAe=GAe;var JAe=vr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const zh=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?se.jsxs(dt,{flexDirection:"column",gap:"0.5",children:[r&&se.jsx(Li,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&se.jsx(Li,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return se.jsxs(dt,{as:"label",className:JAe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var xx=vr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const XAe=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),rQ=({size:t="sm",...e})=>se.jsx(dt,{as:XAe,className:xx({size:t}),...e}),ZAe=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),e_e=({size:t="sm",...e})=>se.jsx(dt,{as:ZAe,className:xx({size:t}),...e}),t_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),nQ=({size:t="sm",...e})=>se.jsx(dt,{as:t_e,className:xx({size:t}),...e}),r_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),n_e=({size:t="sm",...e})=>se.jsx(dt,{as:r_e,className:xx({size:t}),...e});var s_e=vr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),i_e=vr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const o_e=({size:t="sm"})=>se.jsx(YAe,{className:i_e({size:t}),children:se.jsx(rQ,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return se.jsx(zh,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:se.jsx(QAe,{className:s_e({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:se.jsx(o_e,{})})})});P.createContext(null);const a_e=t8["useId".toString()]||(()=>{});let l_e=0;function Cx(t){const[e,r]=m.useState(a_e());return ai(()=>{t||r(n=>n??String(l_e++))},[t]),t||(e?`radix-${e}`:"")}const sQ="Collapsible",[c_e,aHe]=In(sQ);c_e(sQ);function Ex(t){const e=t+"CollectionProvider",[r,n]=In(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=xr(v,b.collectionRef);return P.createElement(Vy,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=xr(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Vy,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const f_e=m.createContext(void 0);function v_(t){const e=m.useContext(f_e);return t||e||"ltr"}function u_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const rk="dismissableLayer.update",d_e="dismissableLayer.pointerDownOutside",h_e="dismissableLayer.focusOutside";let JO;const v_e=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iQ=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(v_e),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=xr(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,A=y_e(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=m_e(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return u_e(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(JO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),XO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=JO)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),XO())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(rk,T),()=>document.removeEventListener(rk,T)},[]),m.createElement(vt.div,$e({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,A.onPointerDownCapture)}))});function y_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){oQ(d_e,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function m_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&oQ(h_e,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function XO(){const t=new CustomEvent(rk);document.dispatchEvent(t)}function oQ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const p_e=iQ;let i5=0;function g_e(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:ZO()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:ZO()),i5++,()=>{i5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),i5--}},[])}function ZO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const o5="focusScope.autoFocusOnMount",a5="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},b_e=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=oi(s),f=oi(i),u=m.useRef(null),d=xr(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ya(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ya(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ya(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){rM.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(o5,eM);a.addEventListener(o5,c),a.dispatchEvent(b),b.defaultPrevented||(w_e(k_e(aQ(a)),{select:!0}),document.activeElement===y&&Ya(a))}return()=>{a.removeEventListener(o5,c),setTimeout(()=>{const b=new CustomEvent(a5,eM);a.addEventListener(a5,f),a.dispatchEvent(b),b.defaultPrevented||Ya(y??document.body,{select:!0}),a.removeEventListener(a5,f),rM.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=x_e(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ya(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ya(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(vt.div,$e({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function w_e(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ya(n,{select:e}),document.activeElement!==r)return}function x_e(t){const e=aQ(t),r=tM(e,t),n=tM(e.reverse(),t);return[r,n]}function aQ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function tM(t,e){for(const r of t)if(!C_e(r,{upTo:e}))return r}function C_e(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function E_e(t){return t instanceof HTMLInputElement&&"select"in t}function Ya(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&E_e(t)&&e&&t.select()}}const rM=S_e();function S_e(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=nM(t,e),t.unshift(e)},remove(e){var r;t=nM(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function nM(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function k_e(t){return t.filter(e=>e.tagName!=="A")}function Vh(t){return t.split("-")[1]}function y_(t){return t==="y"?"height":"width"}function ca(t){return t.split("-")[0]}function Qf(t){return["top","bottom"].includes(ca(t))?"x":"y"}function sM(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Qf(e),l=y_(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ca(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Vh(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const $_e=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=sM(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=lQ(n),u={x:s,y:i},d=Qf(o),h=y_(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let A=k?k[p]:0;A&&await(l.isElement==null?void 0:l.isElement(k))||(A=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=A-v[h]-f[b],L=A/2-v[h]/2+x,U=sk(T,L,B),V=Vh(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const A_e={left:"right",right:"left",bottom:"top",top:"bottom"};function Gb(t){return t.replace(/left|right|bottom|top/g,e=>A_e[e])}function __e(t,e,r){r===void 0&&(r=!1);const n=Vh(t),s=Qf(t),i=y_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Gb(o)),{main:o,cross:Gb(o)}}const P_e={start:"end",end:"start"};function l5(t){return t.replace(/start|end/g,e=>P_e[e])}const T_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ca(n),b=ca(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[Gb(o)]:function(U){const V=Gb(U);return[l5(U),V,l5(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=Vh(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],$=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?$:j;default:return[]}}(ca(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(l5)))),R}(o,v,h,p));const E=[o,...w],k=await qy(e,y),A=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&A.push(k[g]),f){const{main:U,cross:V}=__e(n,i,p);A.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:A}],!A.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function oM(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function aM(t){return cQ.some(e=>t[e]>=0)}const R_e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=oM(await qy(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:aM(i)}}}case"escaped":{const i=oM(await qy(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:aM(i)}}}default:return{}}}}},I_e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ca(a),d=Vh(a),h=Qf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function fQ(t){return t==="x"?"y":"x"}const O_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await qy(e,l),u=Qf(ca(s)),d=fQ(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=sk(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=sk(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},M_e=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Qf(s),d=fQ(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ca(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),A=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);vA&&(v=A)}return{[u]:h,[d]:v}}}},D_e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await qy(e,a),c=ca(r),f=Vh(r),u=Qf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const A=d-l.left-l.right;E=f||p?nk(b,A):A}else{const A=h-l.top-l.bottom;w=f||p?nk(g,A):A}if(p&&!f){const A=Lc(l.left,0),x=Lc(l.right,0),T=Lc(l.top,0),B=Lc(l.bottom,0);u?E=d-2*(A!==0||x!==0?A+x:Lc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Lc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Zs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ji(t){return Zs(t).getComputedStyle(t)}function uQ(t){return t instanceof Zs(t).Node}function Jl(t){return uQ(t)?(t.nodeName||"").toLowerCase():""}function Wi(t){return t instanceof Zs(t).HTMLElement}function $s(t){return t instanceof Zs(t).Element}function lM(t){return typeof ShadowRoot>"u"?!1:t instanceof Zs(t).ShadowRoot||t instanceof ShadowRoot}function Wy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=ji(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function N_e(t){return["table","td","th"].includes(Jl(t))}function ik(t){const e=m_(),r=ji(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function m_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Sx(t){return["html","body","#document"].includes(Jl(t))}const cM=Math.min,Av=Math.max,Kb=Math.round;function dQ(t){const e=ji(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Wi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Kb(r)!==i||Kb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function hQ(t){return $s(t)?t:t.contextElement}const vQ={x:1,y:1};function xd(t){const e=hQ(t);if(!Wi(e))return vQ;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=dQ(e);let o=(i?Kb(r.width):r.width)/n,a=(i?Kb(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const fM={x:0,y:0};function yQ(t,e,r){var n,s;if(e===void 0&&(e=!0),!m_())return fM;const i=t?Zs(t):window;return!r||e&&r!==i?fM:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Rf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=hQ(t);let o=vQ;e&&(n?$s(n)&&(o=xd(n)):o=xd(t));const a=yQ(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Zs(i),h=n&&$s(n)?Zs(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=xd(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Zs(v).frameElement}}return Hb({width:f,height:u,x:l,y:c})}function Ml(t){return((uQ(t)?t.ownerDocument:t.document)||window.document).documentElement}function kx(t){return $s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(t){return Rf(Ml(t)).left+kx(t).scrollLeft}function sh(t){if(Jl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||lM(t)&&t.host||Ml(t);return lM(e)?e.host:e}function pQ(t){const e=sh(t);return Sx(e)?e.ownerDocument.body:Wi(e)&&Wy(e)?e:pQ(e)}function _v(t,e){var r;e===void 0&&(e=[]);const n=pQ(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Zs(n);return s?e.concat(i,i.visualViewport||[],Wy(n)?n:[]):e.concat(n,_v(n))}function uM(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Zs(s),a=Ml(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=m_();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=Ml(s),o=kx(s),a=s.ownerDocument.body,l=Av(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=Av(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+mQ(s);const u=-o.scrollTop;return ji(a).direction==="rtl"&&(f+=Av(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(Ml(t));else if($s(e))n=function(s,i){const o=Rf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Wi(s)?xd(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=yQ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Hb(n)}function gQ(t,e){const r=sh(t);return!(r===e||!$s(r)||Sx(r))&&(ji(r).position==="fixed"||gQ(r,e))}function dM(t,e){return Wi(t)&&ji(t).position!=="fixed"?e?e(t):t.offsetParent:null}function hM(t,e){const r=Zs(t);if(!Wi(t))return r;let n=dM(t,e);for(;n&&N_e(n)&&ji(n).position==="static";)n=dM(n,e);return n&&(Jl(n)==="html"||Jl(n)==="body"&&ji(n).position==="static"&&!ik(n))?r:n||function(s){let i=sh(s);for(;Wi(i)&&!Sx(i);){if(ik(i))return i;i=sh(i)}return null}(t)||r}function L_e(t,e,r){const n=Wi(e),s=Ml(e),i=r==="fixed",o=Rf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Jl(e)!=="body"||Wy(s))&&(a=kx(e)),Wi(e)){const c=Rf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=mQ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const j_e={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=_v(c).filter(g=>$s(g)&&Jl(g)!=="body"),h=null;const v=ji(c).position==="fixed";let y=v?sh(c):c;for(;$s(y)&&!Sx(y);){const g=ji(y),b=ik(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||Wy(y)&&!b&&gQ(c,y))?d=d.filter(p=>p!==y):h=g,y=sh(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=uM(e,f,s);return c.top=Av(u.top,c.top),c.right=cM(u.right,c.right),c.bottom=cM(u.bottom,c.bottom),c.left=Av(u.left,c.left),c},uM(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Wi(r),i=Ml(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Jl(r)!=="body"||Wy(i))&&(o=kx(r)),Wi(r))){const c=Rf(r);a=xd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:$s,getDimensions:function(t){return dQ(t)},getOffsetParent:hM,getDocumentElement:Ml,getScale:xd,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||hM,i=this.getDimensions;return{reference:L_e(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ji(t).direction==="rtl"};function F_e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...$s(t)?_v(t):t.contextElement?_v(t.contextElement):[],..._v(e)]:[];l.forEach(d=>{const h=!$s(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),$s(t)&&!a&&f.observe(t),$s(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?Rf(t):null;return a&&function d(){const h=Rf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const B_e=(t,e,r)=>{const n=new Map,s={platform:j_e,...r},i={...s.platform,_c:n};return $_e(t,e,{...s,platform:i})},U_e=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?iM({element:e.current,padding:r}).fn(s):{}:e?iM({element:e,padding:r}).fn(s):{}}}};var Qp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Qb(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Qb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function bQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vM(t,e){const r=bQ(t);return Math.round(e*r)/r}function yM(t){const e=m.useRef(t);return Qp(()=>{e.current=t}),e}function z_e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);Qb(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=A.current&&(A.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,A=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=yM(l),L=yM(s),U=m.useCallback(()=>{if(!A.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),B_e(A.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!Qb(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Qp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Qp(()=>(V.current=!0,()=>{V.current=!1}),[]),Qp(()=>{if(E&&(A.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:A,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=vM(C.floating,f.x),_=vM(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...bQ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const wQ="Popper",[xQ,qh]=In(wQ),[V_e,CQ]=xQ(wQ),q_e=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(V_e,{scope:e,anchor:n,onAnchorChange:s},r)},W_e="PopperAnchor",H_e=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=CQ(W_e,r),o=m.useRef(null),a=xr(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(vt.div,$e({},s,{ref:a}))}),EQ="PopperContent",[G_e,lHe]=xQ(EQ),K_e=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...A}=t,x=CQ(EQ,f),[T,B]=m.useState(null),L=xr(e,ie=>B(ie)),[U,V]=m.useState(null),N=d_(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(Q_e),altBoundary:I},{refs:D,floatingStyles:$,placement:j,isPositioned:G,middlewareData:O}=z_e({strategy:"fixed",placement:R,whileElementsMounted:F_e,elements:{reference:x.anchor},middleware:[I_e({mainAxis:d+S,alignmentAxis:v}),E&&O_e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?M_e():void 0,...F}),E&&T_e({...F}),D_e({...F,apply:({elements:ie,rects:ue,availableWidth:nt,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${nt}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&U_e({element:U,padding:y}),Y_e({arrowWidth:C,arrowHeight:S}),w&&R_e({strategy:"referenceHidden"})]}),[q,z]=SQ(j),H=oi(k);ai(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ai(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:G?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(G_e,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(vt.div,$e({"data-side":q,"data-align":z},A,{ref:L,style:{...A.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Q_e(t){return t!==null}const Y_e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=SQ(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function SQ(t){const[e,r="center"]=t.split("-");return[e,r]}const J_e=q_e,X_e=H_e,Z_e=K_e,ePe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(vt.div,$e({},s,{ref:e})),n):null}),c5="rovingFocusGroup.onEntryFocus",tPe={bubbles:!1,cancelable:!0},p_="RovingFocusGroup",[ok,kQ,rPe]=Ex(p_),[nPe,Wh]=In(p_,[rPe]),[sPe,iPe]=nPe(p_),oPe=m.forwardRef((t,e)=>m.createElement(ok.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(ok.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(aPe,nh({},t,{ref:e}))))),aPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=xr(e,u),h=v_(i),[v=null,y]=zy({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=oi(c),w=kQ(r),E=m.useRef(!1),[k,A]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(c5,p),()=>x.removeEventListener(c5,p)},[p]),m.createElement(sPe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>A(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>A(x=>x-1),[])},m.createElement(vt.div,nh({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ve(t.onMouseDown,()=>{E.current=!0}),onFocus:Ve(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(c5,tPe);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);$Q(C)}}E.current=!1}),onBlur:Ve(t.onBlur,()=>b(!1))})))}),lPe="RovingFocusGroupItem",cPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Cx(),l=i||a,c=iPe(lPe,r),f=c.currentTabStopId===l,u=kQ(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(ok.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(vt.span,nh({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Ve(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Ve(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ve(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=dPe(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?hPe(b,p+1):b.slice(p+1)}setTimeout(()=>$Q(b))}})})))}),fPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uPe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function dPe(t,e,r){const n=uPe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return fPe[n]}function $Q(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function hPe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const vPe=oPe,AQ=cPe;var yPe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},mu=new WeakMap,Vm=new WeakMap,qm={},f5=0,_Q=function(t){return t&&(t.host||_Q(t.parentNode))},mPe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=_Q(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},pPe=function(t,e,r,n){var s=mPe(e,Array.isArray(t)?t:[t]);qm[r]||(qm[r]=new WeakMap);var i=qm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(mu.get(d)||0)+1,g=(i.get(d)||0)+1;mu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&Vm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),f5++,function(){o.forEach(function(u){var d=mu.get(u)-1,h=i.get(u)-1;mu.set(u,d),i.set(u,h),d||(Vm.has(u)||u.removeAttribute(n),Vm.delete(u)),h||u.removeAttribute(r)}),f5--,f5||(mu=new WeakMap,mu=new WeakMap,Vm=new WeakMap,qm={})}},gPe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||yPe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),pPe(n,s,r,"aria-hidden")):function(){return null}},yo=function(){return yo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return DPe;var e=NPe(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},jPe=IQ(),FPe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(wPe,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -241,23 +241,23 @@ PERFORMANCE OF THIS SOFTWARE. } body { - `).concat(EPe,": ").concat(a,`px; + `).concat(xPe,": ").concat(a,`px; } -`)},zPe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return FPe(s)},[s]);return m.createElement(BPe,{styles:UPe(i,!e,s,r?"":"!important")})},ak=!1;if(typeof window<"u")try{var Wm=Object.defineProperty({},"passive",{get:function(){return ak=!0,!0}});window.addEventListener("test",Wm,Wm),window.removeEventListener("test",Wm,Wm)}catch{ak=!1}var pu=ak?{passive:!1}:!1,VPe=function(t){return t.tagName==="TEXTAREA"},OQ=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!VPe(t)&&r[e]==="visible")},qPe=function(t){return OQ(t,"overflowY")},WPe=function(t){return OQ(t,"overflowX")},mM=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=MQ(t,r);if(n){var s=DQ(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},HPe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},GPe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},MQ=function(t,e){return t==="v"?qPe(e):WPe(e)},DQ=function(t,e){return t==="v"?HPe(e):GPe(e)},KPe=function(t,e){return t==="h"&&e==="rtl"?-1:1},QPe=function(t,e,r,n,s){var i=KPe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=DQ(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&MQ(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},Hm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},pM=function(t){return[t.deltaX,t.deltaY]},gM=function(t){return t&&"current"in t?t.current:t},YPe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JPe=function(t){return` +`)},BPe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return LPe(s)},[s]);return m.createElement(jPe,{styles:FPe(i,!e,s,r?"":"!important")})},ak=!1;if(typeof window<"u")try{var Wm=Object.defineProperty({},"passive",{get:function(){return ak=!0,!0}});window.addEventListener("test",Wm,Wm),window.removeEventListener("test",Wm,Wm)}catch{ak=!1}var pu=ak?{passive:!1}:!1,UPe=function(t){return t.tagName==="TEXTAREA"},OQ=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!UPe(t)&&r[e]==="visible")},zPe=function(t){return OQ(t,"overflowY")},VPe=function(t){return OQ(t,"overflowX")},mM=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=MQ(t,r);if(n){var s=DQ(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},qPe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},WPe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},MQ=function(t,e){return t==="v"?zPe(e):VPe(e)},DQ=function(t,e){return t==="v"?qPe(e):WPe(e)},HPe=function(t,e){return t==="h"&&e==="rtl"?-1:1},GPe=function(t,e,r,n,s){var i=HPe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=DQ(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&MQ(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},Hm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},pM=function(t){return[t.deltaX,t.deltaY]},gM=function(t){return t&&"current"in t?t.current:t},KPe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},QPe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},XPe=0,gu=[];function ZPe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(XPe++)[0],i=m.useState(function(){return IQ()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=xPe([t.lockRef.current],(t.shards||[]).map(gM),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=Hm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=mM(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=mM(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return QPe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!gu.length||gu[gu.length-1]!==i)){var b="deltaY"in g?pM(g):Hm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&YPe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(gM).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=Hm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,pM(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,Hm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return gu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pu),document.addEventListener("touchmove",l,pu),document.addEventListener("touchstart",f,pu),function(){gu=gu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,pu),document.removeEventListener("touchmove",l,pu),document.removeEventListener("touchstart",f,pu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:JPe(s)}):null,h?m.createElement(zPe,{gapMode:"margin"}):null)}const eTe=TPe(RQ,ZPe);var NQ=m.forwardRef(function(t,e){return m.createElement($x,mo({},t,{ref:e,sideCar:eTe}))});NQ.classNames=$x.classNames;const tTe=NQ,rTe=["Enter"," "],Ax="Menu",[nTe,dHe,sTe]=Ex(Ax),[Yf,LQ]=In(Ax,[sTe,qh,Wh]);qh();const iTe=Wh();Yf(Ax);const[hHe,oTe]=Yf(Ax),aTe="MenuPortal";Yf(aTe,{forceMount:void 0});const lTe="MenuContent",[vHe,jQ]=Yf(lTe),lk="MenuItem",bM="menu.itemSelect",FQ=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=oTe(lk,t.__scopeMenu),a=jQ(lk,t.__scopeMenu),l=Cr(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(bM,{bubbles:!0,cancelable:!0});u.addEventListener(bM,h=>n==null?void 0:n(h),{once:!0}),h_(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(cTe,$e({},s,{ref:l,disabled:r,onClick:Ve(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Ve(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ve(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||rTe.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),cTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=jQ(lk,r),a=iTe(r),l=m.useRef(null),c=Cr(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(nTe.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement(AQ,$e({asChild:!0},a,{focusable:!n}),m.createElement(vt.div,$e({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Ve(t.onPointerMove,wM(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Ve(t.onPointerLeave,wM(v=>o.onItemLeave(v))),onFocus:Ve(t.onFocus,()=>u(!0)),onBlur:Ve(t.onBlur,()=>u(!1))}))))}),fTe=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(UQ,{scope:t.__scopeMenu,checked:r},m.createElement(FQ,$e({role:"menuitemcheckbox","aria-checked":Yb(r)?"mixed":r},s,{ref:e,"data-state":g_(r),onSelect:Ve(s.onSelect,()=>n==null?void 0:n(Yb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),uTe="MenuRadioGroup",[yHe,dTe]=Yf(uTe,{value:void 0,onValueChange:()=>{}}),hTe="MenuRadioItem",vTe=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=dTe(hTe,t.__scopeMenu),i=r===s.value;return m.createElement(UQ,{scope:t.__scopeMenu,checked:i},m.createElement(FQ,$e({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":g_(i),onSelect:Ve(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),BQ="MenuItemIndicator",[UQ,yTe]=Yf(BQ,{checked:!1}),mTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=yTe(BQ,r);return m.createElement(wx,{present:n||Yb(i.checked)||i.checked===!0},m.createElement(vt.span,$e({},s,{ref:e,"data-state":g_(i.checked)})))}),pTe="MenuSub";Yf(pTe);function Yb(t){return t==="indeterminate"}function g_(t){return Yb(t)?"indeterminate":t?"checked":"unchecked"}function wM(t){return e=>e.pointerType==="mouse"?t(e):void 0}const gTe=fTe,bTe=vTe,wTe=mTe,zQ="DropdownMenu",[xTe,mHe]=In(zQ,[LQ]),b_=LQ();xTe(zQ);const CTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(gTe,$e({},s,n,{ref:e}))}),ETe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(bTe,$e({},s,n,{ref:e}))}),STe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(wTe,$e({},s,n,{ref:e}))}),kTe=CTe,$Te=ETe,VQ=STe;var qQ="_1k2mbvi5",WQ="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const ATe=({children:t})=>se.jsx(VQ,{className:qQ,children:t});m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs(kTe,{className:js(WQ,t),...r,ref:n,children:[se.jsx(ATe,{children:se.jsx(rQ,{size:"xs"})}),se.jsx(ji,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs($Te,{className:js(WQ,t),...r,ref:n,children:[se.jsx(VQ,{className:qQ,children:se.jsx(ji,{children:"•"})}),se.jsx(ji,{variant:"small",children:e})]}));const HQ=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return se.jsx(OAe,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),_Te=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var PTe="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",TTe="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",RTe=yr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ITe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=_Te(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,x=k.size/1e3;g({name:$,size:x,extension:$.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>ITe[w]).join(",");return se.jsx(zh,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:js(TTe,RTe({borderRadius:r})),children:[y?se.jsxs(dt,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[se.jsx(ji,{children:y.name}),se.jsxs(ji,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):se.jsx(ji,{children:f}),se.jsx(dt,{accept:p,as:"input",className:PTe,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&se.jsx(HQ,{cursor:"pointer",icon:nQ,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var OTe=yr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const ck=1e3,Cd=64,h5=Cd/2,v5=(t,e=ck)=>t%e/(ck/Cd),jc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},MTe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:jc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},DTe=(t,e)=>{const r=[];for(let n=0;n{const i=Cd/10+v5(n.r,ck*1.5/(s+1));return{...MTe(n.a,n.b,n.c),x:v5(n.x),y:v5(n.y),r:i}})};m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=DTe(r,s);return se.jsxs(dt,{as:"svg",className:js(e,OTe({size:n})),viewBox:`0 0 ${Cd} ${Cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[se.jsxs("defs",{children:[se.jsx("clipPath",{id:"circle-clip",children:se.jsx("circle",{cx:h5,cy:h5,r:h5})}),se.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[se.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),se.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),se.jsx("feGaussianBlur",{stdDeviation:Cd/10,result:"effect1_foregroundBlur"})]}),se.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[se.jsx("stop",{offset:"0",stopColor:o[0].c}),se.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>se.jsxs(m.Fragment,{children:[se.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.a}),se.jsx("stop",{offset:"1",stopColor:a.b})]}),se.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.c}),se.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),se.jsxs("g",{clipPath:"url(#circle-clip)",children:[se.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),se.jsx("g",{filter:"url(#blur)",children:o.map(a=>se.jsxs(m.Fragment,{children:[se.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),se.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const NTe=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return se.jsx(dt,{as:pAe.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},GQ="Dialog",[KQ,pHe]=In(GQ);KQ(GQ);const LTe="DialogPortal";KQ(LTe,{forceMount:void 0});yr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});yr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});yr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var jTe=yr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),FTe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",BTe=yr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const QQ=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{className:js(FTe,BTe({borderRadius:s})),children:[f&&se.jsx(f,{size:"sm"}),se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:jTe({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&se.jsx(u,{size:"sm"}),h]})})})}),UTe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function zTe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||UTe.test(zTe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return se.jsx(QQ,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});yr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const YQ="Progress",_x=100,[VTe,gHe]=In(YQ),[qTe,bHe]=VTe(YQ),WTe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=HTe,...o}=t,a=fk(s)?s:_x,l=JQ(n,a)?n:null,c=Jb(l)?i(l,a):void 0;return m.createElement(qTe,{scope:r,value:l,max:a},m.createElement(vt.div,$e({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Jb(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":GTe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});WTe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!fk(n)?new Error(KTe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=fk(t.max)?t.max:_x;return n!=null&&!JQ(n,i)?new Error(QTe(s,r)):null}};function HTe(t,e){return`${Math.round(t/e*100)}%`}function GTe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Jb(t){return typeof t=="number"}function fk(t){return Jb(t)&&!isNaN(t)&&t>0}function JQ(t,e){return Jb(t)&&!isNaN(t)&&t<=e&&t>=0}function KTe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_x}\`.`}function QTe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},YPe=0,gu=[];function JPe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(YPe++)[0],i=m.useState(function(){return IQ()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=bPe([t.lockRef.current],(t.shards||[]).map(gM),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=Hm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,A=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&A.type==="range")return!1;var T=mM(x,A);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=mM(x,A)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return GPe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!gu.length||gu[gu.length-1]!==i)){var b="deltaY"in g?pM(g):Hm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&KPe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(gM).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=Hm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,pM(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,Hm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return gu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pu),document.addEventListener("touchmove",l,pu),document.addEventListener("touchstart",f,pu),function(){gu=gu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,pu),document.removeEventListener("touchmove",l,pu),document.removeEventListener("touchstart",f,pu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:QPe(s)}):null,h?m.createElement(BPe,{gapMode:"margin"}):null)}const XPe=_Pe(RQ,JPe);var NQ=m.forwardRef(function(t,e){return m.createElement($x,yo({},t,{ref:e,sideCar:XPe}))});NQ.classNames=$x.classNames;const ZPe=NQ,eTe=["Enter"," "],Ax="Menu",[tTe,cHe,rTe]=Ex(Ax),[Yf,LQ]=In(Ax,[rTe,qh,Wh]);qh();const nTe=Wh();Yf(Ax);const[fHe,sTe]=Yf(Ax),iTe="MenuPortal";Yf(iTe,{forceMount:void 0});const oTe="MenuContent",[uHe,jQ]=Yf(oTe),lk="MenuItem",bM="menu.itemSelect",FQ=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=sTe(lk,t.__scopeMenu),a=jQ(lk,t.__scopeMenu),l=xr(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(bM,{bubbles:!0,cancelable:!0});u.addEventListener(bM,h=>n==null?void 0:n(h),{once:!0}),h_(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(aTe,$e({},s,{ref:l,disabled:r,onClick:Ve(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Ve(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ve(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||eTe.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),aTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=jQ(lk,r),a=nTe(r),l=m.useRef(null),c=xr(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(tTe.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement(AQ,$e({asChild:!0},a,{focusable:!n}),m.createElement(vt.div,$e({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Ve(t.onPointerMove,wM(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Ve(t.onPointerLeave,wM(v=>o.onItemLeave(v))),onFocus:Ve(t.onFocus,()=>u(!0)),onBlur:Ve(t.onBlur,()=>u(!1))}))))}),lTe=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(UQ,{scope:t.__scopeMenu,checked:r},m.createElement(FQ,$e({role:"menuitemcheckbox","aria-checked":Yb(r)?"mixed":r},s,{ref:e,"data-state":g_(r),onSelect:Ve(s.onSelect,()=>n==null?void 0:n(Yb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),cTe="MenuRadioGroup",[dHe,fTe]=Yf(cTe,{value:void 0,onValueChange:()=>{}}),uTe="MenuRadioItem",dTe=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=fTe(uTe,t.__scopeMenu),i=r===s.value;return m.createElement(UQ,{scope:t.__scopeMenu,checked:i},m.createElement(FQ,$e({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":g_(i),onSelect:Ve(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),BQ="MenuItemIndicator",[UQ,hTe]=Yf(BQ,{checked:!1}),vTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=hTe(BQ,r);return m.createElement(wx,{present:n||Yb(i.checked)||i.checked===!0},m.createElement(vt.span,$e({},s,{ref:e,"data-state":g_(i.checked)})))}),yTe="MenuSub";Yf(yTe);function Yb(t){return t==="indeterminate"}function g_(t){return Yb(t)?"indeterminate":t?"checked":"unchecked"}function wM(t){return e=>e.pointerType==="mouse"?t(e):void 0}const mTe=lTe,pTe=dTe,gTe=vTe,zQ="DropdownMenu",[bTe,hHe]=In(zQ,[LQ]),b_=LQ();bTe(zQ);const wTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(mTe,$e({},s,n,{ref:e}))}),xTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(pTe,$e({},s,n,{ref:e}))}),CTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(gTe,$e({},s,n,{ref:e}))}),ETe=wTe,STe=xTe,VQ=CTe;var qQ="_1k2mbvi5",WQ="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const kTe=({children:t})=>se.jsx(VQ,{className:qQ,children:t});m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs(ETe,{className:js(WQ,t),...r,ref:n,children:[se.jsx(kTe,{children:se.jsx(rQ,{size:"xs"})}),se.jsx(Li,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs(STe,{className:js(WQ,t),...r,ref:n,children:[se.jsx(VQ,{className:qQ,children:se.jsx(Li,{children:"•"})}),se.jsx(Li,{variant:"small",children:e})]}));const HQ=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return se.jsx(RAe,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),$Te=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var ATe="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",_Te="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",PTe=vr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const TTe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=$Te(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],A=k.name,x=k.size/1e3;g({name:A,size:x,extension:A.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>TTe[w]).join(",");return se.jsx(zh,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:js(_Te,PTe({borderRadius:r})),children:[y?se.jsxs(dt,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[se.jsx(Li,{children:y.name}),se.jsxs(Li,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):se.jsx(Li,{children:f}),se.jsx(dt,{accept:p,as:"input",className:ATe,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&se.jsx(HQ,{cursor:"pointer",icon:nQ,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var RTe=vr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const ck=1e3,Cd=64,h5=Cd/2,v5=(t,e=ck)=>t%e/(ck/Cd),jc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},ITe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:jc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},OTe=(t,e)=>{const r=[];for(let n=0;n{const i=Cd/10+v5(n.r,ck*1.5/(s+1));return{...ITe(n.a,n.b,n.c),x:v5(n.x),y:v5(n.y),r:i}})};m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=OTe(r,s);return se.jsxs(dt,{as:"svg",className:js(e,RTe({size:n})),viewBox:`0 0 ${Cd} ${Cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[se.jsxs("defs",{children:[se.jsx("clipPath",{id:"circle-clip",children:se.jsx("circle",{cx:h5,cy:h5,r:h5})}),se.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[se.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),se.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),se.jsx("feGaussianBlur",{stdDeviation:Cd/10,result:"effect1_foregroundBlur"})]}),se.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[se.jsx("stop",{offset:"0",stopColor:o[0].c}),se.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>se.jsxs(m.Fragment,{children:[se.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.a}),se.jsx("stop",{offset:"1",stopColor:a.b})]}),se.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.c}),se.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),se.jsxs("g",{clipPath:"url(#circle-clip)",children:[se.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),se.jsx("g",{filter:"url(#blur)",children:o.map(a=>se.jsxs(m.Fragment,{children:[se.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),se.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const MTe=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return se.jsx(dt,{as:yAe.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},GQ="Dialog",[KQ,vHe]=In(GQ);KQ(GQ);const DTe="DialogPortal";KQ(DTe,{forceMount:void 0});vr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});vr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});vr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var NTe=vr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),LTe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",jTe=vr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const QQ=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{className:js(LTe,jTe({borderRadius:s})),children:[f&&se.jsx(f,{size:"sm"}),se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:NTe({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&se.jsx(u,{size:"sm"}),h]})})})}),FTe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function BTe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||FTe.test(BTe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return se.jsx(QQ,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});vr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const YQ="Progress",_x=100,[UTe,yHe]=In(YQ),[zTe,mHe]=UTe(YQ),VTe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=qTe,...o}=t,a=fk(s)?s:_x,l=JQ(n,a)?n:null,c=Jb(l)?i(l,a):void 0;return m.createElement(zTe,{scope:r,value:l,max:a},m.createElement(vt.div,$e({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Jb(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":WTe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});VTe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!fk(n)?new Error(HTe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=fk(t.max)?t.max:_x;return n!=null&&!JQ(n,i)?new Error(GTe(s,r)):null}};function qTe(t,e){return`${Math.round(t/e*100)}%`}function WTe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Jb(t){return typeof t=="number"}function fk(t){return Jb(t)&&!isNaN(t)&&t>0}function JQ(t,e){return Jb(t)&&!isNaN(t)&&t<=e&&t>=0}function HTe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_x}\`.`}function GTe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${_x} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const XQ="Radio",[YTe,ZQ]=In(XQ),[JTe,XTe]=YTe(XQ),ZTe=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Cr(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(JTe,{scope:r,checked:s,disabled:o},m.createElement(vt.button,$e({type:"button",role:"radio","aria-checked":s,"data-state":eY(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Ve(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(r7e,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),e7e="RadioIndicator",t7e=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=XTe(e7e,r);return m.createElement(wx,{present:n||i.checked},m.createElement(vt.span,$e({"data-state":eY(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),r7e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function eY(t){return t?"checked":"unchecked"}const n7e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tY="RadioGroup",[s7e,wHe]=In(tY,[Wh,ZQ]),rY=Wh(),nY=ZQ(),[i7e,o7e]=s7e(tY),a7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=rY(r),v=v_(c),[y,g]=zy({prop:i,defaultProp:s,onChange:u});return m.createElement(i7e,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(mPe,$e({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(vt.div,$e({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),l7e="RadioGroupItem",c7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=o7e(l7e,r),o=i.disabled||n,a=rY(r),l=nY(r),c=m.useRef(null),f=Cr(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{n7e.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement(AQ,$e({asChild:!0},a,{focusable:!o,active:u}),m.createElement(ZTe,$e({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),f7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=nY(r);return m.createElement(t7e,$e({},s,n,{ref:e}))}),u7e=a7e,d7e=c7e,h7e=f7e;var v7e=yr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),y7e=yr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const m7e=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return se.jsx(dt,{alignItems:"center",children:se.jsx(zh,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:se.jsx(d7e,{className:y7e({size:n}),value:s,id:e,disabled:i,children:se.jsx(h7e,{className:v7e({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return se.jsx(u7e,{disabled:n,name:i,ref:e,...l,children:se.jsx(dt,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>se.jsx(m7e,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function xM(t,[e,r]){return Math.min(r,Math.max(e,t))}const sY=m.forwardRef((t,e)=>m.createElement(vt.span,$e({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),p7e=[" ","Enter","ArrowUp","ArrowDown"],g7e=[" ","Enter"],Px="Select",[Tx,w_,b7e]=Ex(Px),[Hh,xHe]=In(Px,[b7e,qh]),x_=qh(),[w7e,Jf]=Hh(Px),[x7e,C7e]=Hh(Px),E7e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=x_(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=v_(c),[$=!1,x]=zy({prop:n,defaultProp:s,onChange:i}),[T,B]=zy({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Z_e,v,m.createElement(w7e,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Cx(),value:T,onValueChange:B,open:$,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(Tx.Provider,{scope:e},m.createElement(x7e,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(oY,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},S7e="SelectTrigger",k7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=x_(r),o=Jf(S7e,r),a=o.disabled||n,l=Cr(e,o.onTriggerChange),c=w_(r),[f,u,d]=aY(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=lY(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(ePe,$e({asChild:!0},i),m.createElement(vt.button,$e({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":o.value===void 0?"":void 0},s,{ref:l,onClick:Ve(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Ve(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Ve(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&p7e.includes(v.key)&&(h(),v.preventDefault())})})))}),$7e="SelectValue",A7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Jf($7e,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Cr(e,l.onValueNodeChange);return ai(()=>{c(f)},[c,f]),m.createElement(vt.span,$e({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),_7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(vt.span,$e({"aria-hidden":!0},s,{ref:e}),n||"▼")}),ih="SelectContent",P7e=m.forwardRef((t,e)=>{const r=Jf(ih,t.__scopeSelect),[n,s]=m.useState();if(ai(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(iY,{scope:t.__scopeSelect},m.createElement(Tx.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(T7e,$e({},t,{ref:e}))}),Ko=10,[iY,Rx]=Hh(ih),T7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Jf(ih,r),[w,E]=m.useState(null),[k,$]=m.useState(null),x=Cr(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=w_(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return wPe(w)},[w]),w_e();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=aY(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=lY(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),A=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?CM:R7e,q=O===CM?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(iY,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(tTe,{as:Vy,allowPinchZoom:!0},m.createElement(x_e,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ve(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(iQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,$e({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Ve(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),R7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Jf(ih,r),o=Rx(ih,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Cr(e,x=>f(x)),d=w_(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ko,ke=xM(Q,[Ko,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ko,ke=xM(Q,[Ko,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-Ko*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-Ko,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${Ko}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ai(()=>w(),[w]);const[E,k]=m.useState();ai(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(I7e,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(vt.div,$e({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),CM=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ko,...i}=t,o=x_(r);return m.createElement(tPe,$e({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[I7e,O7e]=Hh(ih,{}),EM="SelectViewport",M7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Rx(EM,r),i=O7e(EM,r),o=Cr(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(Tx.Slot,{scope:r},m.createElement(vt.div,$e({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ve(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Ko*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),D7e="SelectGroup",[N7e,CHe]=Hh(D7e),L7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Cx();return m.createElement(N7e,{scope:r,id:s},m.createElement(vt.div,$e({role:"group","aria-labelledby":s},n,{ref:e})))}),uk="SelectItem",[j7e,F7e]=Hh(uk),B7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Jf(uk,r),l=Rx(uk,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Cr(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Cx(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(j7e,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(Tx.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(vt.div,$e({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Ve(o.onFocus,()=>h(!0)),onBlur:Ve(o.onBlur,()=>h(!1)),onPointerUp:Ve(o.onPointerUp,g),onPointerMove:Ve(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Ve(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(g7e.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),Gm="SelectItemText",U7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Jf(Gm,r),a=Rx(Gm,r),l=F7e(Gm,r),c=C7e(Gm,r),[f,u]=m.useState(null),d=Cr(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ai(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(vt.span,$e({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),oY=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Cr(e,s),o=u_(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(sY,{asChild:!0},m.createElement("select",$e({},n,{ref:i,defaultValue:r})))});oY.displayName="BubbleSelect";function aY(t){const e=oi(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function lY(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=z7e(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function z7e(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const V7e=E7e,q7e=k7e,W7e=A7e,H7e=_7e,G7e=P7e,K7e=M7e,Q7e=L7e,Y7e=B7e,J7e=U7e;var X7e="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",Z7e="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",e9e="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",t9e=yr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const r9e=m.forwardRef(({children:t,className:e,...r},n)=>se.jsx(Y7e,{className:js(Z7e,e),...r,ref:n,children:se.jsx(J7e,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return se.jsx(zh,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:se.jsxs(V7e,{disabled:n,name:l,...u,children:[se.jsxs(q7e,{id:s??l,className:js(e9e,t9e({borderRadius:r})),ref:e,children:[se.jsx(W7e,{placeholder:f}),se.jsx(dt,{as:H7e,display:"inline-flex",children:se.jsx(r_e,{})})]}),se.jsx(G7e,{className:X7e,children:se.jsx(K7e,{children:se.jsx(Q7e,{children:c.map(({value:d,label:h,...v})=>se.jsx(r9e,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?se.jsx(HQ,{icon:nQ,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return se.jsx(QQ,{ref:e,name:i,leftIcon:i_e,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var n9e=yr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return se.jsx(dt,{className:n9e({size:r}),color:"text50",ref:e,...n,children:se.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[se.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),se.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>se.jsx(dt,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const cY="Switch",[s9e,EHe]=In(cY);s9e(cY);yr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11rt fyvr12sn"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12sb"],[{active:!0,variant:"line"},"fyvr12sh"],[{active:!1,variant:"line"},"fyvr12sb"]]});const fY="Tabs",[i9e,SHe]=In(fY,[Wh]);Wh();i9e(fY);var o9e="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return se.jsxs(dt,{className:o9e,ref:e,background:"buttonGlass",...s,children:[r&&se.jsx(r,{size:"xs"}),se.jsx(ji,{children:n})]})});const a9e="ToastProvider",[l9e,kHe,c9e]=Ex("Toast"),[uY,$He]=In("Toast",[c9e]),[AHe,dY]=uY(a9e),SM="toast.viewportPause",kM="toast.viewportResume",Ix="Toast",f9e="toast.swipeStart",u9e="toast.swipeMove",d9e="toast.swipeCancel",h9e="toast.swipeEnd",[v9e,y9e]=uY(Ix,{onClose(){}}),m9e=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=dY(Ix,r),[g,b]=m.useState(null),p=Cr(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=oi(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(SM,R),C.addEventListener(kM,S),()=>{C.removeEventListener(SM,R),C.removeEventListener(kM,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?vY(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(p9e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(v9e,{scope:r,onClose:U},Kr.createPortal(m.createElement(l9e.ItemSlot,{scope:r},m.createElement(b_e,{asChild:!0,onEscapeKeyDown:Ve(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(vt.li,$e({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ve(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ve(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ve(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),A=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,Km(u9e,u,G,{discrete:!1})):$M(j,y.swipeDirection,A)?(E.current=j,Km(f9e,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Ve(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};$M(S,y.swipeDirection,y.swipeThreshold)?Km(h9e,h,_,{discrete:!0}):Km(d9e,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});m9e.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Ix}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const p9e=t=>{const{__scopeToast:e,children:r,...n}=t,s=dY(Ix,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return C9e(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(rPe,{asChild:!0},m.createElement(sY,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},g9e="ToastAction",b9e=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(hY,{altText:r,asChild:!0},m.createElement(x9e,$e({},n,{ref:e}))):null});b9e.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${g9e}\``)}};const w9e="ToastClose",x9e=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=y9e(w9e,r);return m.createElement(hY,{asChild:!0},m.createElement(vt.button,$e({type:"button"},n,{ref:e,onClick:Ve(t.onClick,s.onClose)})))}),hY=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(vt.div,$e({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function vY(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),E9e(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...vY(n))}}),e}function Km(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const $M=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function C9e(t=()=>{}){const e=oi(t);ai(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function E9e(t){return t.nodeType===t.ELEMENT_NODE}yr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var S9e="_15pztn2",k9e="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:js(k9e,d&&S9e),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});m.createContext(null);var $9e="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",A9e="bnrrebe",_9e=yr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return se.jsx(dt,{className:js(r,_9e({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?se.jsx(NTe,{className:A9e,disableAnimation:n,src:i}):se.jsx(ji,{className:$9e,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Ox,_He]=In("Tooltip",[qh]);qh();const P9e="TooltipProvider";Ox(P9e);const yY="Tooltip";Ox(yY);const T9e="TooltipPortal";Ox(T9e,{forceMount:void 0});Ox(yY,{isInside:!1});function Fo(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("rect",{width:"28",height:"28"}),P.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},R9e=({chains:t})=>({id:"metamask",logoDark:AM,logoLight:AM,name:"Metamask",createConnector:()=>new Y5e({chains:t,options:{shimDisconnect:!0}})}),_M=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},I9e=({chains:t,options:e})=>({id:"wallet-connect",logoDark:_M,logoLight:_M,name:"Walletconnect",createConnector:()=>new hke({chains:t,options:e})});window.ethereum=window.ethereum||{};class F0 extends V${constructor({chains:e,options:r={}}){var n,s,i,o;super({chains:e,options:r}),this.id="google",this.name="google",this.ready=!0,this.provider=void 0,this.onAccountsChanged=c=>({account:c[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const a=(r==null||(n=r.connect)==null||(s=n.settings)==null?void 0:s.signInOptions)||[],l=r==null||(i=r.connect)==null||(o=i.settings)==null?void 0:o.signInWith;if(l)this.id=l,this.name=`${l[0].toUpperCase()}${l.slice(1)}`;else if(a.length>0){const c=a[0],f=`${c[0].toUpperCase()}${c.slice(1)}`;this.id=c,this.name=f}else this.id="email",this.name="Email";this.provider=tG.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",c=>{this==null||this.emit("change",{chain:{id:dk(c),unsupported:!1}})}),this.provider.on("accountsChanged",c=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(c))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const i=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(Es.Theme),a=localStorage.getItem(Es.EthAuthSettings),l=a?JSON.parse(a):{},c=Ke({authorize:!0},l,i,{settings:Ke({theme:o||"dark"},i==null?void 0:i.settings)}),f=await this.provider.connect(c);if(f.error)throw new Sn(new Error(f.error));if(!f.connected)throw new Sn(new Error("Wallet connection rejected"));const u=(r=f.proof)==null?void 0:r.proofString,d=(n=f.proof)==null?void 0:n.typedData;if(u){const h=JSON.stringify({proofString:u,typedData:d});localStorage.setItem(Es.EthAuthProof,h)}}return{account:await this.getAccount(),chain:{id:this.provider.getChainId(),unsupported:this.isChainUnsupported(this.provider.getChainId())}}}async getWalletClient({chainId:e}={}){const r=this.chains.find(n=>n.id===e);return h4({chain:r,account:await this.getAccount(),transport:l4(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(dk(e))}async switchChain(e){if(this.isChainUnsupported(e))throw new Error("Unsupported chain");return this.provider.setDefaultChainId(e),this.chains.find(r=>r.id===e)}async disconnect(){localStorage.removeItem(Es.EthAuthProof),this.provider.disconnect()}getAccount(){return this.provider.getSigner().getAddress()}async getChainId(){return this.provider.getChainId()}async getProvider(){return this.provider}async getSigner(){return this.provider.getSigner()}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}isChainUnsupported(e){return this.provider.networks.findIndex(r=>r.chainId===e)===-1}}const dk=t=>typeof t=="object"?dk(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t,PM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("g",{id:"Frame 2114"},P.createElement("g",{id:"Group"},P.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),P.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),P.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),P.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},TM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},O9e=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:PM,logoLight:PM,miniLogoDark:TM({isDarkMode:!0}),miniLogoLight:TM({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),RM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),P.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),P.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},P.createElement("stop",{"stop-color":"#0062E0"}),P.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},IM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},M9e=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:RM,logoLight:RM,miniLogoDark:IM({isDarkMode:!0}),miniLogoLight:IM({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),OM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},s),P.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},MM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),P.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}},D9e=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:OM({isDarkMode:!0}),logoLight:OM({isDarkMode:!1}),miniLogoDark:MM({isDarkMode:!0}),miniLogoLight:MM({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),DM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},s),P.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),P.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},hk="@sequence.kit.connector.email",N9e=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:DM({isDarkMode:!0}),logoLight:DM({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(hk);return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWithEmail:n||""})})})})}}),Qm=({isDarkMode:t})=>{const e=t?"white":"black";return n=>(Ke({},(Fo(n),n)),P.createElement(P.Fragment,null,P.createElement("svg",{viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P.createElement("g",{id:"discord-icon-svgrepo-com 1",clipPath:"url(#clip0_193_26839)"},P.createElement("path",{id:"Vector",d:"M30.3437 10.9324C28.5312 10.0844 26.5932 9.46812 24.567 9.11719C24.3182 9.56707 24.0275 10.1722 23.8271 10.6535C21.6733 10.3296 19.5392 10.3296 17.425 10.6535C17.2246 10.1722 16.9273 9.56707 16.6763 9.11719C14.6479 9.46812 12.7077 10.0867 10.8952 10.9369C7.23942 16.4613 6.24839 21.8485 6.7439 27.1592C9.16863 28.9699 11.5185 30.0699 13.8287 30.7897C14.3991 30.0047 14.9078 29.1701 15.346 28.2907C14.5114 27.9735 13.712 27.5821 12.9566 27.1277C13.157 26.9793 13.353 26.8241 13.5424 26.6644C18.1496 28.8193 23.1554 28.8193 27.7075 26.6644C27.8991 26.8241 28.0951 26.9793 28.2933 27.1277C27.5357 27.5843 26.7341 27.9757 25.8995 28.2929C26.3377 29.1701 26.8442 30.0069 27.4168 30.7919C29.7292 30.0721 32.0813 28.9722 34.506 27.1592C35.0874 21.0028 33.5128 15.6651 30.3437 10.9324ZM15.9737 23.8932C14.5907 23.8932 13.4565 22.602 13.4565 21.0298C13.4565 19.4575 14.5665 18.1641 15.9737 18.1641C17.381 18.1641 18.5152 19.4552 18.4909 21.0298C18.4931 22.602 17.381 23.8932 15.9737 23.8932ZM25.2762 23.8932C23.8932 23.8932 22.759 22.602 22.759 21.0298C22.759 19.4575 23.8689 18.1641 25.2762 18.1641C26.6835 18.1641 27.8176 19.4552 27.7934 21.0298C27.7934 22.602 26.6835 23.8932 25.2762 23.8932Z",fill:e})),P.createElement("defs",null,P.createElement("clipPath",{id:"clip0_193_26839"},P.createElement("rect",{width:"28",height:"28",fill:e,transform:"translate(6.625 6)"}))))))},L9e=({chains:t,options:e={}})=>({id:"discord",isSequenceBased:!0,logoDark:Qm({isDarkMode:!0}),logoLight:Qm({isDarkMode:!1}),miniLogoDark:Qm({isDarkMode:!0}),miniLogoLight:Qm({isDarkMode:!1}),name:"Discord",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"discord"})})})})}}),j9e=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const i=t.find(o=>o.id===r);i&&(n=i.id)}return FIe([N9e({chains:t,options:{defaultNetwork:n}}),O9e({chains:t,options:{defaultNetwork:n}}),M9e({chains:t,options:{defaultNetwork:n}}),L9e({chains:t,options:{defaultNetwork:n}}),D9e({chains:t,options:{defaultNetwork:n}}),R9e({chains:t}),I9e({chains:t,options:{projectId:e}})])};function C_(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Ym(){}function NM(){return typeof WeakMap<"u"?new WeakMap:F9e()}function F9e(){return{add:Ym,delete:Ym,get:Ym,set:Ym,has:function(t){return!1}}}var B9e=Object.prototype.hasOwnProperty,vk=function(t,e){return B9e.call(t,e)};function y5(t,e){for(var r in e)vk(e,r)&&(t[r]=e[r]);return t}var U9e=/^[ \t]*(?:\r\n|\r|\n)/,z9e=/(?:\r\n|\r|\n)[ \t]*$/,V9e=/^(?:[\r\n]|$)/,q9e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,W9e=/^[ \t]*[\r\n][ \t\r\n]*$/;function LM(t,e,r){var n=0,s=t[0].match(q9e);s&&(n=s[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");e&&(t=t.slice(1));var a=r.newline,l=r.trimLeadingNewline,c=r.trimTrailingNewline,f=typeof a=="string",u=t.length,d=t.map(function(h,v){return h=h.replace(o,"$1"),v===0&&l&&(h=h.replace(U9e,"")),v===u-1&&c&&(h=h.replace(z9e,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(y){return a})),h});return d}function H9e(t,e){for(var r="",n=0,s=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Xp=[K9e],Gh=()=>{if(Xp.length<1)throw new Error("No adapter configured");return Xp[Xp.length-1]},pY=!1,Q9e=t=>{pY||Y9e(t)},Y9e=t=>{pY=!0,Xp.push(t)},Mx=function(){return Gh().appendCss(...arguments)},gY=function(){return Gh().registerClassName(...arguments)},J9e=function(){return Gh().registerComposition(...arguments)},bY=function(){return Gh().markCompositionUsed(...arguments)},X9e=function(){return Gh().onEndFileScope(...arguments)},Z9e=function(){var e=Gh();return"getIdentOption"in e?e.getIdentOption(...arguments):"short"},jM,E_=0,Xb=[];function Xf(t,e){E_=0,Xb.unshift({filePath:t,packageName:e})}function Zf(){X9e(eu()),E_=0,Xb.splice(0,1)}function eu(){if(Xb.length===0)throw new Error(lo(jM||(jM=C_([` +Defaulting to \`null\`.`}const XQ="Radio",[KTe,ZQ]=In(XQ),[QTe,YTe]=KTe(XQ),JTe=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=xr(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(QTe,{scope:r,checked:s,disabled:o},m.createElement(vt.button,$e({type:"button",role:"radio","aria-checked":s,"data-state":eY(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Ve(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(e7e,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),XTe="RadioIndicator",ZTe=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=YTe(XTe,r);return m.createElement(wx,{present:n||i.checked},m.createElement(vt.span,$e({"data-state":eY(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),e7e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function eY(t){return t?"checked":"unchecked"}const t7e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tY="RadioGroup",[r7e,pHe]=In(tY,[Wh,ZQ]),rY=Wh(),nY=ZQ(),[n7e,s7e]=r7e(tY),i7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=rY(r),v=v_(c),[y,g]=zy({prop:i,defaultProp:s,onChange:u});return m.createElement(n7e,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(vPe,$e({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(vt.div,$e({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),o7e="RadioGroupItem",a7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=s7e(o7e,r),o=i.disabled||n,a=rY(r),l=nY(r),c=m.useRef(null),f=xr(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{t7e.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement(AQ,$e({asChild:!0},a,{focusable:!o,active:u}),m.createElement(JTe,$e({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),l7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=nY(r);return m.createElement(ZTe,$e({},s,n,{ref:e}))}),c7e=i7e,f7e=a7e,u7e=l7e;var d7e=vr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),h7e=vr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const v7e=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return se.jsx(dt,{alignItems:"center",children:se.jsx(zh,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:se.jsx(f7e,{className:h7e({size:n}),value:s,id:e,disabled:i,children:se.jsx(u7e,{className:d7e({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return se.jsx(c7e,{disabled:n,name:i,ref:e,...l,children:se.jsx(dt,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>se.jsx(v7e,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function xM(t,[e,r]){return Math.min(r,Math.max(e,t))}const sY=m.forwardRef((t,e)=>m.createElement(vt.span,$e({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),y7e=[" ","Enter","ArrowUp","ArrowDown"],m7e=[" ","Enter"],Px="Select",[Tx,w_,p7e]=Ex(Px),[Hh,gHe]=In(Px,[p7e,qh]),x_=qh(),[g7e,Jf]=Hh(Px),[b7e,w7e]=Hh(Px),x7e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=x_(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=v_(c),[A=!1,x]=zy({prop:n,defaultProp:s,onChange:i}),[T,B]=zy({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(J_e,v,m.createElement(g7e,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Cx(),value:T,onValueChange:B,open:A,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(Tx.Provider,{scope:e},m.createElement(b7e,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(oY,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},C7e="SelectTrigger",E7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=x_(r),o=Jf(C7e,r),a=o.disabled||n,l=xr(e,o.onTriggerChange),c=w_(r),[f,u,d]=aY(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=lY(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(X_e,$e({asChild:!0},i),m.createElement(vt.button,$e({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":o.value===void 0?"":void 0},s,{ref:l,onClick:Ve(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Ve(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Ve(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&y7e.includes(v.key)&&(h(),v.preventDefault())})})))}),S7e="SelectValue",k7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Jf(S7e,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=xr(e,l.onValueNodeChange);return ai(()=>{c(f)},[c,f]),m.createElement(vt.span,$e({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),$7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(vt.span,$e({"aria-hidden":!0},s,{ref:e}),n||"▼")}),ih="SelectContent",A7e=m.forwardRef((t,e)=>{const r=Jf(ih,t.__scopeSelect),[n,s]=m.useState();if(ai(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(iY,{scope:t.__scopeSelect},m.createElement(Tx.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(_7e,$e({},t,{ref:e}))}),Ko=10,[iY,Rx]=Hh(ih),_7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Jf(ih,r),[w,E]=m.useState(null),[k,A]=m.useState(null),x=xr(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=w_(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return gPe(w)},[w]),g_e();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=aY(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=lY(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),$=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?CM:P7e,q=O===CM?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(iY,{scope:r,content:w,viewport:k,onViewportChange:A,itemRefCallback:$,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(ZPe,{as:Vy,allowPinchZoom:!0},m.createElement(b_e,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ve(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(iQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,$e({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Ve(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),P7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Jf(ih,r),o=Rx(ih,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=xr(e,x=>f(x)),d=w_(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),nt=window.innerWidth-Ko,ke=xM(Q,[Ko,nt-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),nt=window.innerWidth-Ko,ke=xM(Q,[Ko,nt-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-Ko*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),$=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-Ko,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?$:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${Ko}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ai(()=>w(),[w]);const[E,k]=m.useState();ai(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const A=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(T7e,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:A},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(vt.div,$e({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),CM=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ko,...i}=t,o=x_(r);return m.createElement(Z_e,$e({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[T7e,R7e]=Hh(ih,{}),EM="SelectViewport",I7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Rx(EM,r),i=R7e(EM,r),o=xr(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(Tx.Slot,{scope:r},m.createElement(vt.div,$e({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ve(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Ko*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),O7e="SelectGroup",[M7e,bHe]=Hh(O7e),D7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Cx();return m.createElement(M7e,{scope:r,id:s},m.createElement(vt.div,$e({role:"group","aria-labelledby":s},n,{ref:e})))}),uk="SelectItem",[N7e,L7e]=Hh(uk),j7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Jf(uk,r),l=Rx(uk,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=xr(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Cx(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(N7e,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(Tx.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(vt.div,$e({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Ve(o.onFocus,()=>h(!0)),onBlur:Ve(o.onBlur,()=>h(!1)),onPointerUp:Ve(o.onPointerUp,g),onPointerMove:Ve(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Ve(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(m7e.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),Gm="SelectItemText",F7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Jf(Gm,r),a=Rx(Gm,r),l=L7e(Gm,r),c=w7e(Gm,r),[f,u]=m.useState(null),d=xr(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ai(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(vt.span,$e({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),oY=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=xr(e,s),o=u_(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(sY,{asChild:!0},m.createElement("select",$e({},n,{ref:i,defaultValue:r})))});oY.displayName="BubbleSelect";function aY(t){const e=oi(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function lY(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=B7e(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function B7e(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const U7e=x7e,z7e=E7e,V7e=k7e,q7e=$7e,W7e=A7e,H7e=I7e,G7e=D7e,K7e=j7e,Q7e=F7e;var Y7e="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",J7e="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",X7e="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",Z7e=vr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const eRe=m.forwardRef(({children:t,className:e,...r},n)=>se.jsx(K7e,{className:js(J7e,e),...r,ref:n,children:se.jsx(Q7e,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return se.jsx(zh,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:se.jsxs(U7e,{disabled:n,name:l,...u,children:[se.jsxs(z7e,{id:s??l,className:js(X7e,Z7e({borderRadius:r})),ref:e,children:[se.jsx(V7e,{placeholder:f}),se.jsx(dt,{as:q7e,display:"inline-flex",children:se.jsx(e_e,{})})]}),se.jsx(W7e,{className:Y7e,children:se.jsx(H7e,{children:se.jsx(G7e,{children:c.map(({value:d,label:h,...v})=>se.jsx(eRe,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?se.jsx(HQ,{icon:nQ,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return se.jsx(QQ,{ref:e,name:i,leftIcon:n_e,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var tRe=vr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return se.jsx(dt,{className:tRe({size:r}),color:"text50",ref:e,...n,children:se.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[se.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),se.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>se.jsx(dt,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const cY="Switch",[rRe,wHe]=In(cY);rRe(cY);vr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11rt fyvr12sn"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12sb"],[{active:!0,variant:"line"},"fyvr12sh"],[{active:!1,variant:"line"},"fyvr12sb"]]});const fY="Tabs",[nRe,xHe]=In(fY,[Wh]);Wh();nRe(fY);var sRe="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return se.jsxs(dt,{className:sRe,ref:e,background:"buttonGlass",...s,children:[r&&se.jsx(r,{size:"xs"}),se.jsx(Li,{children:n})]})});const iRe="ToastProvider",[oRe,CHe,aRe]=Ex("Toast"),[uY,EHe]=In("Toast",[aRe]),[SHe,dY]=uY(iRe),SM="toast.viewportPause",kM="toast.viewportResume",Ix="Toast",lRe="toast.swipeStart",cRe="toast.swipeMove",fRe="toast.swipeCancel",uRe="toast.swipeEnd",[dRe,hRe]=uY(Ix,{onClose(){}}),vRe=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=dY(Ix,r),[g,b]=m.useState(null),p=xr(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,A=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=oi(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),A.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-A.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(SM,R),C.addEventListener(kM,S),()=>{C.removeEventListener(SM,R),C.removeEventListener(kM,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?vY(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(yRe,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(dRe,{scope:r,onClose:U},Kr.createPortal(m.createElement(oRe.ItemSlot,{scope:r},m.createElement(p_e,{asChild:!0,onEscapeKeyDown:Ve(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(vt.li,$e({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ve(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ve(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ve(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),$=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,Km(cRe,u,G,{discrete:!1})):$M(j,y.swipeDirection,$)?(E.current=j,Km(lRe,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>$||Math.abs(R)>$)&&(w.current=null)}),onPointerUp:Ve(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};$M(S,y.swipeDirection,y.swipeThreshold)?Km(uRe,h,_,{discrete:!0}):Km(fRe,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});vRe.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Ix}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const yRe=t=>{const{__scopeToast:e,children:r,...n}=t,s=dY(Ix,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return wRe(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(ePe,{asChild:!0},m.createElement(sY,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},mRe="ToastAction",pRe=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(hY,{altText:r,asChild:!0},m.createElement(bRe,$e({},n,{ref:e}))):null});pRe.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${mRe}\``)}};const gRe="ToastClose",bRe=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=hRe(gRe,r);return m.createElement(hY,{asChild:!0},m.createElement(vt.button,$e({type:"button"},n,{ref:e,onClick:Ve(t.onClick,s.onClose)})))}),hY=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(vt.div,$e({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function vY(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),xRe(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...vY(n))}}),e}function Km(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const $M=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function wRe(t=()=>{}){const e=oi(t);ai(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function xRe(t){return t.nodeType===t.ELEMENT_NODE}vr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var CRe="_15pztn2",ERe="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:js(ERe,d&&CRe),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});m.createContext(null);var SRe="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",kRe="bnrrebe",$Re=vr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return se.jsx(dt,{className:js(r,$Re({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?se.jsx(MTe,{className:kRe,disableAnimation:n,src:i}):se.jsx(Li,{className:SRe,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Ox,kHe]=In("Tooltip",[qh]);qh();const ARe="TooltipProvider";Ox(ARe);const yY="Tooltip";Ox(yY);const _Re="TooltipPortal";Ox(_Re,{forceMount:void 0});Ox(yY,{isInside:!1});function Fo(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("rect",{width:"28",height:"28"}),P.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},PRe=({chains:t})=>({id:"metamask",logoDark:AM,logoLight:AM,name:"Metamask",createConnector:()=>new K5e({chains:t,options:{shimDisconnect:!0}})}),_M=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},TRe=({chains:t,options:e})=>({id:"wallet-connect",logoDark:_M,logoLight:_M,name:"Walletconnect",createConnector:()=>new uke({chains:t,options:e})});window.ethereum=window.ethereum||{};class F0 extends V${constructor({chains:e,options:r={}}){var n,s,i,o;super({chains:e,options:r}),this.id="google",this.name="google",this.ready=!0,this.provider=void 0,this.onAccountsChanged=c=>({account:c[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const a=(r==null||(n=r.connect)==null||(s=n.settings)==null?void 0:s.signInOptions)||[],l=r==null||(i=r.connect)==null||(o=i.settings)==null?void 0:o.signInWith;if(l)this.id=l,this.name=`${l[0].toUpperCase()}${l.slice(1)}`;else if(a.length>0){const c=a[0],f=`${c[0].toUpperCase()}${c.slice(1)}`;this.id=c,this.name=f}else this.id="email",this.name="Email";this.provider=tG.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",c=>{this==null||this.emit("change",{chain:{id:dk(c),unsupported:!1}})}),this.provider.on("accountsChanged",c=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(c))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const i=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(Es.Theme),a=localStorage.getItem(Es.EthAuthSettings),l=a?JSON.parse(a):{},c=Ke({authorize:!0},l,i,{settings:Ke({theme:o||"dark"},i==null?void 0:i.settings)}),f=await this.provider.connect(c);if(f.error)throw new Sn(new Error(f.error));if(!f.connected)throw new Sn(new Error("Wallet connection rejected"));const u=(r=f.proof)==null?void 0:r.proofString,d=(n=f.proof)==null?void 0:n.typedData;if(u){const h=JSON.stringify({proofString:u,typedData:d});localStorage.setItem(Es.EthAuthProof,h)}}return{account:await this.getAccount(),chain:{id:this.provider.getChainId(),unsupported:this.isChainUnsupported(this.provider.getChainId())}}}async getWalletClient({chainId:e}={}){const r=this.chains.find(n=>n.id===e);return h4({chain:r,account:await this.getAccount(),transport:l4(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(dk(e))}async switchChain(e){if(this.isChainUnsupported(e))throw new Error("Unsupported chain");return this.provider.setDefaultChainId(e),this.chains.find(r=>r.id===e)}async disconnect(){localStorage.removeItem(Es.EthAuthProof),this.provider.disconnect()}getAccount(){return this.provider.getSigner().getAddress()}async getChainId(){return this.provider.getChainId()}async getProvider(){return this.provider}async getSigner(){return this.provider.getSigner()}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}isChainUnsupported(e){return this.provider.networks.findIndex(r=>r.chainId===e)===-1}}const dk=t=>typeof t=="object"?dk(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t,PM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("g",{id:"Frame 2114"},P.createElement("g",{id:"Group"},P.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),P.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),P.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),P.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},TM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},RRe=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:PM,logoLight:PM,miniLogoDark:TM({isDarkMode:!0}),miniLogoLight:TM({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),RM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),P.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),P.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},P.createElement("stop",{"stop-color":"#0062E0"}),P.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},IM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},IRe=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:RM,logoLight:RM,miniLogoDark:IM({isDarkMode:!0}),miniLogoLight:IM({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),OM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},s),P.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},MM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),P.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}},ORe=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:OM({isDarkMode:!0}),logoLight:OM({isDarkMode:!1}),miniLogoDark:MM({isDarkMode:!0}),miniLogoLight:MM({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),DM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},s),P.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),P.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},hk="@sequence.kit.connector.email",MRe=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:DM({isDarkMode:!0}),logoLight:DM({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(hk);return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWithEmail:n||""})})})})}}),Qm=({isDarkMode:t})=>{const e=t?"white":"black";return n=>(Ke({},(Fo(n),n)),P.createElement(P.Fragment,null,P.createElement("svg",{viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P.createElement("g",{id:"discord-icon-svgrepo-com 1",clipPath:"url(#clip0_193_26839)"},P.createElement("path",{id:"Vector",d:"M30.3437 10.9324C28.5312 10.0844 26.5932 9.46812 24.567 9.11719C24.3182 9.56707 24.0275 10.1722 23.8271 10.6535C21.6733 10.3296 19.5392 10.3296 17.425 10.6535C17.2246 10.1722 16.9273 9.56707 16.6763 9.11719C14.6479 9.46812 12.7077 10.0867 10.8952 10.9369C7.23942 16.4613 6.24839 21.8485 6.7439 27.1592C9.16863 28.9699 11.5185 30.0699 13.8287 30.7897C14.3991 30.0047 14.9078 29.1701 15.346 28.2907C14.5114 27.9735 13.712 27.5821 12.9566 27.1277C13.157 26.9793 13.353 26.8241 13.5424 26.6644C18.1496 28.8193 23.1554 28.8193 27.7075 26.6644C27.8991 26.8241 28.0951 26.9793 28.2933 27.1277C27.5357 27.5843 26.7341 27.9757 25.8995 28.2929C26.3377 29.1701 26.8442 30.0069 27.4168 30.7919C29.7292 30.0721 32.0813 28.9722 34.506 27.1592C35.0874 21.0028 33.5128 15.6651 30.3437 10.9324ZM15.9737 23.8932C14.5907 23.8932 13.4565 22.602 13.4565 21.0298C13.4565 19.4575 14.5665 18.1641 15.9737 18.1641C17.381 18.1641 18.5152 19.4552 18.4909 21.0298C18.4931 22.602 17.381 23.8932 15.9737 23.8932ZM25.2762 23.8932C23.8932 23.8932 22.759 22.602 22.759 21.0298C22.759 19.4575 23.8689 18.1641 25.2762 18.1641C26.6835 18.1641 27.8176 19.4552 27.7934 21.0298C27.7934 22.602 26.6835 23.8932 25.2762 23.8932Z",fill:e})),P.createElement("defs",null,P.createElement("clipPath",{id:"clip0_193_26839"},P.createElement("rect",{width:"28",height:"28",fill:e,transform:"translate(6.625 6)"}))))))},DRe=({chains:t,options:e={}})=>({id:"discord",isSequenceBased:!0,logoDark:Qm({isDarkMode:!0}),logoLight:Qm({isDarkMode:!1}),miniLogoDark:Qm({isDarkMode:!0}),miniLogoLight:Qm({isDarkMode:!1}),name:"Discord",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"discord"})})})})}}),NRe=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const i=t.find(o=>o.id===r);i&&(n=i.id)}return LIe([MRe({chains:t,options:{defaultNetwork:n}}),RRe({chains:t,options:{defaultNetwork:n}}),IRe({chains:t,options:{defaultNetwork:n}}),DRe({chains:t,options:{defaultNetwork:n}}),ORe({chains:t,options:{defaultNetwork:n}}),PRe({chains:t}),TRe({chains:t,options:{projectId:e}})])};function C_(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Ym(){}function NM(){return typeof WeakMap<"u"?new WeakMap:LRe()}function LRe(){return{add:Ym,delete:Ym,get:Ym,set:Ym,has:function(t){return!1}}}var jRe=Object.prototype.hasOwnProperty,vk=function(t,e){return jRe.call(t,e)};function y5(t,e){for(var r in e)vk(e,r)&&(t[r]=e[r]);return t}var FRe=/^[ \t]*(?:\r\n|\r|\n)/,BRe=/(?:\r\n|\r|\n)[ \t]*$/,URe=/^(?:[\r\n]|$)/,zRe=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,VRe=/^[ \t]*[\r\n][ \t\r\n]*$/;function LM(t,e,r){var n=0,s=t[0].match(zRe);s&&(n=s[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");e&&(t=t.slice(1));var a=r.newline,l=r.trimLeadingNewline,c=r.trimTrailingNewline,f=typeof a=="string",u=t.length,d=t.map(function(h,v){return h=h.replace(o,"$1"),v===0&&l&&(h=h.replace(FRe,"")),v===u-1&&c&&(h=h.replace(BRe,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(y){return a})),h});return d}function qRe(t,e){for(var r="",n=0,s=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Xp=[HRe],Gh=()=>{if(Xp.length<1)throw new Error("No adapter configured");return Xp[Xp.length-1]},pY=!1,GRe=t=>{pY||KRe(t)},KRe=t=>{pY=!0,Xp.push(t)},Mx=function(){return Gh().appendCss(...arguments)},gY=function(){return Gh().registerClassName(...arguments)},QRe=function(){return Gh().registerComposition(...arguments)},bY=function(){return Gh().markCompositionUsed(...arguments)},YRe=function(){return Gh().onEndFileScope(...arguments)},JRe=function(){var e=Gh();return"getIdentOption"in e?e.getIdentOption(...arguments):"short"},jM,E_=0,Xb=[];function Xf(t,e){E_=0,Xb.unshift({filePath:t,packageName:e})}function Zf(){YRe(eu()),E_=0,Xb.splice(0,1)}function eu(){if(Xb.length===0)throw new Error(ao(jM||(jM=C_([` Styles were unable to be assigned to a file. This is generally caused by one of the following: - You may have created styles outside of a '.css.ts' context - You may have incorrect configuration. See https://vanilla-extract.style/documentation/getting-started - `]))));return Xb[0]}function eRe(){return E_++}var FM={},tRe=t=>{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=FM[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=FM[n]=i,document.head.appendChild(i)}s.innerHTML=r};function rRe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var nRe={},sRe=nRe.hasOwnProperty,iRe=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=sRe.call(e,s)?e[s]:r[s];return n},oRe=/[ -,\.\/:-@\[-\^`\{-~]/,aRe=/[ -,\.\/:-@\[\]\^`\{-~]/,lRe=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,S_=function t(e,r){r=iRe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,l=e.length;a126){if(f>=55296&&f<=56319&&a0&&!(l in n[i]);)i=o[i];if(l in n[i]){var u=n[i][l];o[f]=u,s[f]=s[f].concat(s[u])}else o[f]=0}}this.gotoFn=n,this.output=s,this.failure=o},e.prototype.search=function(r){for(var n=0,s=[],i=0;i0&&!(o in this.gotoFn[n]);)n=this.failure[n];if(o in this.gotoFn[n]&&(n=this.gotoFn[n][o],this.output[n].length)){var a=this.output[n];s.push([i,a])}}return s},t.exports=e})()})(cRe);var wY={},oh={},fRe=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n":"child","<":"parent","~":"sibling","+":"adjacent"},UM={"#":["id","equals"],".":["class","element"]},hRe=new Set(["has","not","matches","is","where","host","host-context"]),vRe=new Set(fRe(["descendant"],Object.keys(Zb).map(function(t){return Zb[t]}),!0)),yRe=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function xY(t){return vRe.has(t.type)}oh.isTraversal=xY;var mRe=new Set(["contains","icontains"]),m5=new Set(['"',"'"]);function pRe(t,e,r){var n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Jm(t){return t.replace(uRe,pRe)}function p5(t){return t===" "||t===` -`||t===" "||t==="\f"||t==="\r"}function gRe(t,e){var r=[],n=CY(r,""+t,e,0);if(n0&&xY(o[o.length-1]))throw new Error("Did not expect successive traversals.")}for(c(0);e!=="";){var d=e.charAt(n);if(p5(d))a=!0,c(1);else if(d in Zb)u(),o.push({type:Zb[d]}),a=!1,c(1);else if(d===","){if(o.length===0)throw new Error("Empty sub-selector");t.push(o),o=[],a=!1,c(1)}else if(e.startsWith("/*",n)){var h=e.indexOf("*/",n+2);if(h<0)throw new Error("Comment was not terminated");n=h+2}else if(a&&(u(),o.push({type:"descendant"}),a=!1),d in UM){var v=UM[d],y=v[0],g=v[1];o.push({type:"attribute",name:y,action:g,value:l(1),namespace:null,ignoreCase:r.xmlMode?null:!1})}else if(d==="["){c(1);var b=null;e.charAt(n)==="|"&&(b="",n+=1),e.startsWith("*|",n)&&(b="*",n+=2);var p=l(0);b===null&&e.charAt(n)==="|"&&e.charAt(n+1)!=="="&&(b=p,p=l(1)),((s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode)&&(p=p.toLowerCase()),c(0);var g="exists",w=dRe.get(e.charAt(n));if(w){if(g=w,e.charAt(n+1)!=="=")throw new Error("Expected `=`");c(2)}else e.charAt(n)==="="&&(g="equals",c(1));var E="",k=null;if(g!=="exists"){if(m5.has(e.charAt(n))){for(var $=e.charAt(n),x=n+1;x0&&n0&&e.length===0)throw new Error("Empty sub-selector");t.push(e)}var $_={},VM=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return SY(t.namespace)+"*";case"tag":return qM(t);case"pseudo-element":return"::"+io(t.name);case"pseudo":return t.data===null?":"+io(t.name):typeof t.data=="string"?":"+io(t.name)+"("+io(t.data)+")":":"+io(t.name)+"("+EY(t.data)+")";case"attribute":{if(t.name==="id"&&t.action==="equals"&&!t.ignoreCase&&!t.namespace)return"#"+io(t.value);if(t.name==="class"&&t.action==="element"&&!t.ignoreCase&&!t.namespace)return"."+io(t.value);var e=qM(t);return t.action==="exists"?"["+e+"]":"["+e+mk[t.action]+"='"+io(t.value)+"'"+(t.ignoreCase?"i":t.ignoreCase===!1?"s":"")+"]"}}}function qM(t){return""+SY(t.namespace)+io(t.name)}function SY(t){return t!==null?(t==="*"?"*":io(t))+"|":""}function io(t){return t.split("").map(function(e){return bRe.has(e)?"\\"+e:e}).join("")}(function(t){var e=Wr&&Wr.__createBinding||(Object.create?function(o,a,l,c){c===void 0&&(c=l),Object.defineProperty(o,c,{enumerable:!0,get:function(){return a[l]}})}:function(o,a,l,c){c===void 0&&(c=l),o[c]=a[l]}),r=Wr&&Wr.__exportStar||function(o,a){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(a,l)&&e(a,o,l)},n=Wr&&Wr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,r(oh,t);var s=oh;Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return n(s).default}});var i=$_;Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n(i).default}})})(wY);/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) *//*! ***************************************************************************** + `]))));return Xb[0]}function XRe(){return E_++}var FM={},ZRe=t=>{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=FM[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=FM[n]=i,document.head.appendChild(i)}s.innerHTML=r};function e9e(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var t9e={},r9e=t9e.hasOwnProperty,n9e=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=r9e.call(e,s)?e[s]:r[s];return n},s9e=/[ -,\.\/:-@\[-\^`\{-~]/,i9e=/[ -,\.\/:-@\[\]\^`\{-~]/,o9e=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,S_=function t(e,r){r=n9e(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,l=e.length;a126){if(f>=55296&&f<=56319&&a0&&!(l in n[i]);)i=o[i];if(l in n[i]){var u=n[i][l];o[f]=u,s[f]=s[f].concat(s[u])}else o[f]=0}}this.gotoFn=n,this.output=s,this.failure=o},e.prototype.search=function(r){for(var n=0,s=[],i=0;i0&&!(o in this.gotoFn[n]);)n=this.failure[n];if(o in this.gotoFn[n]&&(n=this.gotoFn[n][o],this.output[n].length)){var a=this.output[n];s.push([i,a])}}return s},t.exports=e})()})(a9e);var wY={},oh={},l9e=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n":"child","<":"parent","~":"sibling","+":"adjacent"},UM={"#":["id","equals"],".":["class","element"]},u9e=new Set(["has","not","matches","is","where","host","host-context"]),d9e=new Set(l9e(["descendant"],Object.keys(Zb).map(function(t){return Zb[t]}),!0)),h9e=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function xY(t){return d9e.has(t.type)}oh.isTraversal=xY;var v9e=new Set(["contains","icontains"]),m5=new Set(['"',"'"]);function y9e(t,e,r){var n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Jm(t){return t.replace(c9e,y9e)}function p5(t){return t===" "||t===` +`||t===" "||t==="\f"||t==="\r"}function m9e(t,e){var r=[],n=CY(r,""+t,e,0);if(n0&&xY(o[o.length-1]))throw new Error("Did not expect successive traversals.")}for(c(0);e!=="";){var d=e.charAt(n);if(p5(d))a=!0,c(1);else if(d in Zb)u(),o.push({type:Zb[d]}),a=!1,c(1);else if(d===","){if(o.length===0)throw new Error("Empty sub-selector");t.push(o),o=[],a=!1,c(1)}else if(e.startsWith("/*",n)){var h=e.indexOf("*/",n+2);if(h<0)throw new Error("Comment was not terminated");n=h+2}else if(a&&(u(),o.push({type:"descendant"}),a=!1),d in UM){var v=UM[d],y=v[0],g=v[1];o.push({type:"attribute",name:y,action:g,value:l(1),namespace:null,ignoreCase:r.xmlMode?null:!1})}else if(d==="["){c(1);var b=null;e.charAt(n)==="|"&&(b="",n+=1),e.startsWith("*|",n)&&(b="*",n+=2);var p=l(0);b===null&&e.charAt(n)==="|"&&e.charAt(n+1)!=="="&&(b=p,p=l(1)),((s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode)&&(p=p.toLowerCase()),c(0);var g="exists",w=f9e.get(e.charAt(n));if(w){if(g=w,e.charAt(n+1)!=="=")throw new Error("Expected `=`");c(2)}else e.charAt(n)==="="&&(g="equals",c(1));var E="",k=null;if(g!=="exists"){if(m5.has(e.charAt(n))){for(var A=e.charAt(n),x=n+1;x0&&n0&&e.length===0)throw new Error("Empty sub-selector");t.push(e)}var $_={},VM=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return SY(t.namespace)+"*";case"tag":return qM(t);case"pseudo-element":return"::"+so(t.name);case"pseudo":return t.data===null?":"+so(t.name):typeof t.data=="string"?":"+so(t.name)+"("+so(t.data)+")":":"+so(t.name)+"("+EY(t.data)+")";case"attribute":{if(t.name==="id"&&t.action==="equals"&&!t.ignoreCase&&!t.namespace)return"#"+so(t.value);if(t.name==="class"&&t.action==="element"&&!t.ignoreCase&&!t.namespace)return"."+so(t.value);var e=qM(t);return t.action==="exists"?"["+e+"]":"["+e+mk[t.action]+"='"+so(t.value)+"'"+(t.ignoreCase?"i":t.ignoreCase===!1?"s":"")+"]"}}}function qM(t){return""+SY(t.namespace)+so(t.name)}function SY(t){return t!==null?(t==="*"?"*":so(t))+"|":""}function so(t){return t.split("").map(function(e){return p9e.has(e)?"\\"+e:e}).join("")}(function(t){var e=Wr&&Wr.__createBinding||(Object.create?function(o,a,l,c){c===void 0&&(c=l),Object.defineProperty(o,c,{enumerable:!0,get:function(){return a[l]}})}:function(o,a,l,c){c===void 0&&(c=l),o[c]=a[l]}),r=Wr&&Wr.__exportStar||function(o,a){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(a,l)&&e(a,o,l)},n=Wr&&Wr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,r(oh,t);var s=oh;Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return n(s).default}});var i=$_;Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n(i).default}})})(wY);/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -270,14 +270,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var e2=function(){return e2=Object.assign||function(e){for(var r,n=1,s=arguments.length;n=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function zr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}var ERe=/(\u000D|\u000C|\u000D\u000A)/g,SRe=/[\u0000\uD800-\uDFFF]/g,kRe=/(\/\*)[\s\S]*?(\*\/)/g,$Re=function(e,r){r===void 0&&(r=0),e=e.replace(ERe,` -`).replace(SRe,"�"),e=e.replace(kRe,"");for(var n=[];r"})}else if(s===34){var o=WM(e,r);if(o===null)return null;var a=zr(o,2),l=a[0],c=a[1];n.push({type:"",value:c}),r=l}else if(s===35){if(r+1=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&r+2",value:c.toLowerCase(),flag:u}),r=l;continue}}}n.push({type:"",value:s})}else if(s===39){var o=WM(e,r);if(o===null)return null;var h=zr(o,2),l=h[0],c=h[1];n.push({type:"",value:c}),r=l}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=Xm(e,r);if(v===null)n.push({type:"",value:s});else{var y=zr(v,2),l=y[0],g=y[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}}else if(s===44)n.push({type:""});else if(s===45){var b=Xm(e,r);if(b!==null){var p=zr(b,2),l=p[0],g=p[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}if(r+2"}),r+=2;continue}}var o=HM(e,r);if(o!==null){var E=zr(o,3),l=E[0],c=E[1],k=E[2];n.push({type:k,value:c}),r=l;continue}n.push({type:"",value:s})}else if(s===46){var b=Xm(e,r);if(b===null)n.push({type:"",value:s});else{var $=zr(b,2),l=$[0],g=$[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}}else if(s===58)n.push({type:""});else if(s===59)n.push({type:""});else if(s===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:s})}else if(s===64){var o=A_(e,r+1);if(o!==null){var T=zr(o,2),l=T[0],c=T[1];n.push({type:"",value:c.toLowerCase()}),r=l;continue}n.push({type:"",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var o=B0(e,r);if(o===null)return null;var B=zr(o,2),l=B[0],c=B[1];e=e.slice(0,r)+c+e.slice(l+1),r-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var o=Xm(e,r),L=zr(o,2),l=L[0],g=L[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var o=HM(e,r);if(o===null)return null;var U=zr(o,3),l=U[0],c=U[1],k=U[2];n.push({type:k,value:c}),r=l}else n.push({type:"",value:s})}return n.push({type:""}),n},WM=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),s=[],i=r+1;i=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=r+2)return!1;var i=e.charCodeAt(r+2);return i!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var s=e.charCodeAt(r+1);return s!==10}else return!1}},B0=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var s=[n],i=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)s.push(a);else break}if(o",o,u]]}return i+1",o]]:[i,["",o,a]]},ARe=function(e,r){if(e.length<=r)return null;var n="integer",s=[],i=e.charCodeAt(r);for((i===43||i===45)&&(r+=1,i===45&&s.push(45));r=48&&o<=57)s.push(o),r+=1;else break}if(r+1=48&&l<=57)for(s.push(a,l),n="number",r+=2;r=48&&o<=57)s.push(o),r+=1;else break}}if(r+1=48&&l<=57;if(f||(l===43||l===45)&&c>=48&&c<=57)for(n="number",f?(s.push(69,l),r+=2):l===45?(s.push(69,45,c),r+=3):(s.push(69,c),r+=3);r=48&&o<=57)s.push(o),r+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},_Re=function(e,r){if(e.length<=r)return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},A_=function(e,r){if(e.length<=r||!kY(e,r))return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},PRe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var s=[],i=!1;ri+1){var a=e.charCodeAt(i+1);if(a===40){for(var l=2;i+l"];if(c!==9&&c!==32&&c!==10){var f=PRe(e,i+l);if(f===null)return null;var u=zr(f,2),d=u[0],h=u[1];return[d,h,""]}}return[i+1,o.toLowerCase(),""]}}}else if(e.length>i+1){var a=e.charCodeAt(i+1);if(a===40)return[i+1,o.toLowerCase(),""]}return[i,o.toLowerCase(),""]},TRe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=RRe(e[r]);return e},RRe=function(e){if(e.mediaCondition===null)return e;var r=IRe(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},IRe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var s=t(n);if(s.operator===null&&s.children.length===1)e.children[r]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var i=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Zn("Expected whitespace after media");n=2;for(var i=2;i"){s=i;break}else if(o.type==="")throw Zn("Expected '{' in media query but found ';'")}}return r=r.slice(n,s),NRe(r)},DRe=function(e){for(var r=[],n=!1,s=0;s"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(e2(e2({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return r},NRe=function(e){for(var r,n,s=[[]],i=0;i"?s.push([]):s[s.length-1].push(o)}var a=s.map(DRe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var l=a.map(function(h){return h.length===0?null:LRe(h)}),c=[];try{for(var f=CRe(l),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&c.push(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(c.length===0)throw Zn("No valid media queries");return c},LRe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(e,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}else if(r.type===""){var n=null,s=void 0,i=r.value;(i==="only"||i==="not")&&(n=i);var o=n===null?0:1;if(e.length<=o)throw Zn("Expected extra token in media query");var a=e[o];if(a.type===""){var l=a.value;if(l==="all")s="all";else if(l==="print"||l==="screen")s=l;else if(l==="tty"||l==="tv"||l==="projection"||l==="handheld"||l==="braille"||l==="embossed"||l==="aural"||l==="speech")n=n==="not"?null:"not",s="all";else throw Zn("Unknown ident '".concat(l,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var c=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];c.push.apply(c,e),c.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(c,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}}else throw Zn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(o+4"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:g5(e.slice(o+2),!1)}}catch(u){throw Zn("Expected media condition after 'and'",u)}else throw Zn("Expected 'and' after media prefix")}else throw Zn("Expected media condition after media prefix")}else throw Zn("Expected media condition or media prefix")},g5=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var s=e.length-1,i=0,o=0,a=0;a"?(o+=1,i=Math.max(i,o)):l.type==="<)-token>"&&(o-=1),o===0){s=a;break}}if(o!==0)throw new Error(`Mismatched parens -Invalid media condition`);var c,f=e.slice(0,s+1);if(i===1?c=jRe(f):f[1].type===""&&f[1].value==="not"?c=t(f.slice(2,-1),!0,"not"):c=t(f.slice(1,-1),!0),s===e.length-1)return{operator:n,children:[c]};var u=e[s+1];if(u.type!=="")throw new Error(`Invalid operator +***************************************************************************** */var e2=function(){return e2=Object.assign||function(e){for(var r,n=1,s=arguments.length;n=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function zr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}var x9e=/(\u000D|\u000C|\u000D\u000A)/g,C9e=/[\u0000\uD800-\uDFFF]/g,E9e=/(\/\*)[\s\S]*?(\*\/)/g,S9e=function(e,r){r===void 0&&(r=0),e=e.replace(x9e,` +`).replace(C9e,"�"),e=e.replace(E9e,"");for(var n=[];r"})}else if(s===34){var o=WM(e,r);if(o===null)return null;var a=zr(o,2),l=a[0],c=a[1];n.push({type:"",value:c}),r=l}else if(s===35){if(r+1=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&r+2",value:c.toLowerCase(),flag:u}),r=l;continue}}}n.push({type:"",value:s})}else if(s===39){var o=WM(e,r);if(o===null)return null;var h=zr(o,2),l=h[0],c=h[1];n.push({type:"",value:c}),r=l}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=Xm(e,r);if(v===null)n.push({type:"",value:s});else{var y=zr(v,2),l=y[0],g=y[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}}else if(s===44)n.push({type:""});else if(s===45){var b=Xm(e,r);if(b!==null){var p=zr(b,2),l=p[0],g=p[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}if(r+2"}),r+=2;continue}}var o=HM(e,r);if(o!==null){var E=zr(o,3),l=E[0],c=E[1],k=E[2];n.push({type:k,value:c}),r=l;continue}n.push({type:"",value:s})}else if(s===46){var b=Xm(e,r);if(b===null)n.push({type:"",value:s});else{var A=zr(b,2),l=A[0],g=A[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}}else if(s===58)n.push({type:""});else if(s===59)n.push({type:""});else if(s===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:s})}else if(s===64){var o=A_(e,r+1);if(o!==null){var T=zr(o,2),l=T[0],c=T[1];n.push({type:"",value:c.toLowerCase()}),r=l;continue}n.push({type:"",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var o=B0(e,r);if(o===null)return null;var B=zr(o,2),l=B[0],c=B[1];e=e.slice(0,r)+c+e.slice(l+1),r-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var o=Xm(e,r),L=zr(o,2),l=L[0],g=L[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var o=HM(e,r);if(o===null)return null;var U=zr(o,3),l=U[0],c=U[1],k=U[2];n.push({type:k,value:c}),r=l}else n.push({type:"",value:s})}return n.push({type:""}),n},WM=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),s=[],i=r+1;i=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=r+2)return!1;var i=e.charCodeAt(r+2);return i!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var s=e.charCodeAt(r+1);return s!==10}else return!1}},B0=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var s=[n],i=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)s.push(a);else break}if(o",o,u]]}return i+1",o]]:[i,["",o,a]]},k9e=function(e,r){if(e.length<=r)return null;var n="integer",s=[],i=e.charCodeAt(r);for((i===43||i===45)&&(r+=1,i===45&&s.push(45));r=48&&o<=57)s.push(o),r+=1;else break}if(r+1=48&&l<=57)for(s.push(a,l),n="number",r+=2;r=48&&o<=57)s.push(o),r+=1;else break}}if(r+1=48&&l<=57;if(f||(l===43||l===45)&&c>=48&&c<=57)for(n="number",f?(s.push(69,l),r+=2):l===45?(s.push(69,45,c),r+=3):(s.push(69,c),r+=3);r=48&&o<=57)s.push(o),r+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},$9e=function(e,r){if(e.length<=r)return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},A_=function(e,r){if(e.length<=r||!kY(e,r))return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},A9e=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var s=[],i=!1;ri+1){var a=e.charCodeAt(i+1);if(a===40){for(var l=2;i+l"];if(c!==9&&c!==32&&c!==10){var f=A9e(e,i+l);if(f===null)return null;var u=zr(f,2),d=u[0],h=u[1];return[d,h,""]}}return[i+1,o.toLowerCase(),""]}}}else if(e.length>i+1){var a=e.charCodeAt(i+1);if(a===40)return[i+1,o.toLowerCase(),""]}return[i,o.toLowerCase(),""]},_9e=function(e){for(var r=e.length-1;r>=0;r--)e[r]=P9e(e[r]);return e},P9e=function(e){if(e.mediaCondition===null)return e;var r=T9e(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},T9e=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var s=t(n);if(s.operator===null&&s.children.length===1)e.children[r]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var i=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Zn("Expected whitespace after media");n=2;for(var i=2;i"){s=i;break}else if(o.type==="")throw Zn("Expected '{' in media query but found ';'")}}return r=r.slice(n,s),M9e(r)},O9e=function(e){for(var r=[],n=!1,s=0;s"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(e2(e2({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return r},M9e=function(e){for(var r,n,s=[[]],i=0;i"?s.push([]):s[s.length-1].push(o)}var a=s.map(O9e);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var l=a.map(function(h){return h.length===0?null:D9e(h)}),c=[];try{for(var f=w9e(l),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&c.push(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(c.length===0)throw Zn("No valid media queries");return c},D9e=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(e,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}else if(r.type===""){var n=null,s=void 0,i=r.value;(i==="only"||i==="not")&&(n=i);var o=n===null?0:1;if(e.length<=o)throw Zn("Expected extra token in media query");var a=e[o];if(a.type===""){var l=a.value;if(l==="all")s="all";else if(l==="print"||l==="screen")s=l;else if(l==="tty"||l==="tv"||l==="projection"||l==="handheld"||l==="braille"||l==="embossed"||l==="aural"||l==="speech")n=n==="not"?null:"not",s="all";else throw Zn("Unknown ident '".concat(l,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var c=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];c.push.apply(c,e),c.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(c,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}}else throw Zn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(o+4"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:g5(e.slice(o+2),!1)}}catch(u){throw Zn("Expected media condition after 'and'",u)}else throw Zn("Expected 'and' after media prefix")}else throw Zn("Expected media condition after media prefix")}else throw Zn("Expected media condition or media prefix")},g5=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var s=e.length-1,i=0,o=0,a=0;a"?(o+=1,i=Math.max(i,o)):l.type==="<)-token>"&&(o-=1),o===0){s=a;break}}if(o!==0)throw new Error(`Mismatched parens +Invalid media condition`);var c,f=e.slice(0,s+1);if(i===1?c=N9e(f):f[1].type===""&&f[1].value==="not"?c=t(f.slice(2,-1),!0,"not"):c=t(f.slice(1,-1),!0),s===e.length-1)return{operator:n,children:[c]};var u=e[s+1];if(u.type!=="")throw new Error(`Invalid operator Invalid media condition`);if(n!==null&&n!==u.value)throw new Error("'".concat(u.value,"' and '").concat(n,`' must not be at same level Invalid media condition`));if(u.value==="or"&&!r)throw new Error(`Cannot use 'or' at top level of a media query Invalid media condition`);if(u.value!=="and"&&u.value!=="or")throw new Error("Invalid operator: '".concat(u.value,`' -Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.value,children:[c].concat(d.children)}},jRe=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&s.value>0&&i.type===""&&i.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:s.value,denominator:o.value,wsBefore:s.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var l=r[3];if(l.type===""||l.type===""||l.type===""||l.type===""){var c=r[1].value,f=null,u=c.slice(0,4);u==="min-"?(f="min",c=c.slice(4)):u==="max-"&&(f="max",c=c.slice(4)),l.wsBefore,l.wsAfter;var d=pk(l,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:c,value:d}}}else if(r.length>=5)try{var h=FRe(r);return{context:"range",feature:h.featureName,range:h}}catch(v){throw Zn("Invalid media feature",v)}throw new Error("Invalid media feature")},FRe=function(e){var r,n,s,i;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var l=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),c=e[l];if(a)if(c.type===""){if(o.featureName=c.value,e.length>=7){var f=e[l+1],u=e[l+2];if(f.type===""){var d=f.value;if(d===60)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[l+1+((i=(s=o.rightOp)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(l+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=c;var v=null,y=o.leftToken,g=o.leftOp,b=o.featureName,p=o.rightOp,w=o.rightToken,E=null;if(y!==null){if(y.type===""){var k=y.type,$=y.value;$==="infinite"&&(E={type:k,value:$})}else if(y.type===""||y.type===""||y.type===""){y.wsBefore,y.wsAfter;var x=pk(y,["wsBefore","wsAfter"]);E=x}}var T=null;if(w!==null){if(w.type===""){var k=w.type,$=w.value;$==="infinite"&&(T={type:k,value:$})}else if(w.type===""||w.type===""||w.type===""){w.wsBefore,w.wsAfter;var B=pk(w,["wsBefore","wsAfter"]);T=B}}if(E!==null&&T!==null)if((g==="<"||g==="<=")&&(p==="<"||p==="<="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else if((g===">"||g===">=")&&(p===">"||p===">="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else throw new Error("Invalid range");else E===null&&g===null&&p!==null&&T!==null?v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T}:E!==null&&g!==null&&p===null&&T===null&&(v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T});return v}else throw new Error("Invalid range")};function BRe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function URe(t){var e=BRe(t,"string");return typeof e=="symbol"?e:String(e)}function zRe(t,e,r){return e=URe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Pv(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function KM(t,e){if(t==null)return{};var r=VRe(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S1(t,e){for(var r in t)e(t[r],r)}function k1(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function qRe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function gk(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(HRe(k_(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=wY.parse(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error(lo(QM||(QM=C_([` +Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.value,children:[c].concat(d.children)}},N9e=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&s.value>0&&i.type===""&&i.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:s.value,denominator:o.value,wsBefore:s.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var l=r[3];if(l.type===""||l.type===""||l.type===""||l.type===""){var c=r[1].value,f=null,u=c.slice(0,4);u==="min-"?(f="min",c=c.slice(4)):u==="max-"&&(f="max",c=c.slice(4)),l.wsBefore,l.wsAfter;var d=pk(l,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:c,value:d}}}else if(r.length>=5)try{var h=L9e(r);return{context:"range",feature:h.featureName,range:h}}catch(v){throw Zn("Invalid media feature",v)}throw new Error("Invalid media feature")},L9e=function(e){var r,n,s,i;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var l=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),c=e[l];if(a)if(c.type===""){if(o.featureName=c.value,e.length>=7){var f=e[l+1],u=e[l+2];if(f.type===""){var d=f.value;if(d===60)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[l+1+((i=(s=o.rightOp)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(l+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=c;var v=null,y=o.leftToken,g=o.leftOp,b=o.featureName,p=o.rightOp,w=o.rightToken,E=null;if(y!==null){if(y.type===""){var k=y.type,A=y.value;A==="infinite"&&(E={type:k,value:A})}else if(y.type===""||y.type===""||y.type===""){y.wsBefore,y.wsAfter;var x=pk(y,["wsBefore","wsAfter"]);E=x}}var T=null;if(w!==null){if(w.type===""){var k=w.type,A=w.value;A==="infinite"&&(T={type:k,value:A})}else if(w.type===""||w.type===""||w.type===""){w.wsBefore,w.wsAfter;var B=pk(w,["wsBefore","wsAfter"]);T=B}}if(E!==null&&T!==null)if((g==="<"||g==="<=")&&(p==="<"||p==="<="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else if((g===">"||g===">=")&&(p===">"||p===">="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else throw new Error("Invalid range");else E===null&&g===null&&p!==null&&T!==null?v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T}:E!==null&&g!==null&&p===null&&T===null&&(v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T});return v}else throw new Error("Invalid range")};function j9e(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function F9e(t){var e=j9e(t,"string");return typeof e=="symbol"?e:String(e)}function B9e(t,e,r){return e=F9e(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Pv(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function KM(t,e){if(t==null)return{};var r=U9e(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S1(t,e){for(var r in t)e(t[r],r)}function k1(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function z9e(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function gk(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(q9e(k_(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=wY.parse(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error(ao(QM||(QM=C_([` Invalid selector: `,` Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. @@ -287,31 +287,31 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child'). If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })' - `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class t2{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new t2},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));c>-1?r.splice(c,0,l):r.push(l)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}}var $Y={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-input-placeholder":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":focus":!0,":focus-visible":!0,":focus-within":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},KRe=Object.keys($Y),QRe=$Y,YM,JM=(t,e)=>new Error(lo(YM||(YM=C_([` + `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class t2{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new t2},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));c>-1?r.splice(c,0,l):r.push(l)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}}var $Y={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-input-placeholder":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":focus":!0,":focus-visible":!0,":focus-within":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},H9e=Object.keys($Y),G9e=$Y,YM,JM=(t,e)=>new Error(ao(YM||(YM=C_([` Invalid media query: "`,`" `,` Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries - `])),t,e)),YRe=t=>{if(t==="@media ")throw JM(t,"Query is empty");try{ORe(t)}catch(e){throw JM(t,e.message)}},JRe=["vars"],XRe=["content"],ZRe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function eIe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function tIe(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var rIe=" ",$1=[...KRe,"@media","@supports","@container","selectors"];class nIe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new t2],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new yk(e),this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){this.keyframesRules.push(e);return}var r=k1(e.rule,$1);this.addRule({selector:e.selector,rule:r}),this.currConditionalRuleset=new t2,this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule);var n=this.conditionalRulesets[this.conditionalRulesets.length-1];n.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}pixelifyProperties(e){return S1(e,(r,n)=>{typeof r=="number"&&r!==0&&!ZRe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=KM(e,JRe);return r?Pv(Pv({},qRe(r,(s,i)=>rRe(i))),n):n}transformContent(e){var{content:r}=e,n=KM(e,XRe);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return Pv({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(k_(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(bY(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,l=o.length-1;l>=0;l--){var[c,[f]]=o[l],u=c-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=tIe(r,u,c+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){S1(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));GRe(o,e.selector);var a={selector:o,rule:k1(s,$1)};n?this.addConditionalRule(a,n):this.addRule(a);var l={type:"selector",selector:o,rule:s};this.transformSupports(l,s["@supports"],n),this.transformMedia(l,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@media ".concat(i))),S1(r,(i,o)=>{var a="@media ".concat(o);YRe(a);var l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformContainer(e,i["@container"],l)})}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),S1(r,(i,o)=>{var a="@container ".concat(o),l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformMedia(e,i["@media"],l)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),S1(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(QRe[s]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(Ju({"@font-face":r}));for(var n of this.keyframesRules)e.push(Ju({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.rules)e.push(Ju({[s.selector]:s.rule}));for(var i of this.conditionalRulesets)for(var o of i.renderToArray())e.push(Ju(o));return e.filter(Boolean)}}function Ju(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(c=>Ju({[o]:c},e)));else if(a&&typeof a=="object"){var l=Object.keys(a).length===0;l||r.push("".concat(e).concat(o,` { -`).concat(Ju(a,e+rIe),` -`).concat(e,"}"))}else r.push("".concat(e).concat(o.startsWith("--")?o:eIe(o),": ").concat(a,";"))};for(var s of Object.keys(t))n(s);return r.join(` -`)}function sIe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new nIe(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}function AY(t){for(var e=0,r,n=0,s=t.length;s>=4;++n,s-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var bk={},iIe={get exports(){return bk},set exports(t){bk=t}},b5,XM;function oIe(){return XM||(XM=1,b5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),b5}var w5,ZM;function _Y(){if(ZM)return w5;ZM=1;const t=oIe(),e={};for(const s of Object.keys(t))e[t[s]]=s;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};w5=r;for(const s of Object.keys(r)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);const{channels:i,labels:o}=r[s];delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}r.rgb.hsl=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(i,o,a),c=Math.max(i,o,a),f=c-l;let u,d;c===l?u=0:i===c?u=(o-a)/f:o===c?u=2+(a-i)/f:a===c&&(u=4+(i-o)/f),u=Math.min(u*60,360),u<0&&(u+=360);const h=(l+c)/2;return c===l?d=0:h<=.5?d=f/(c+l):d=f/(2-c-l),[u,d*100,h*100]},r.rgb.hsv=function(s){let i,o,a,l,c;const f=s[0]/255,u=s[1]/255,d=s[2]/255,h=Math.max(f,u,d),v=h-Math.min(f,u,d),y=function(g){return(h-g)/6/v+1/2};return v===0?(l=0,c=0):(c=v/h,i=y(f),o=y(u),a=y(d),f===h?l=a-o:u===h?l=1/3+i-a:d===h&&(l=2/3+o-i),l<0?l+=1:l>1&&(l-=1)),[l*360,c*100,h*100]},r.rgb.hwb=function(s){const i=s[0],o=s[1];let a=s[2];const l=r.rgb.hsl(s)[0],c=1/255*Math.min(i,Math.min(o,a));return a=1-1/255*Math.max(i,Math.max(o,a)),[l,c*100,a*100]},r.rgb.cmyk=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(1-i,1-o,1-a),c=(1-i-l)/(1-l)||0,f=(1-o-l)/(1-l)||0,u=(1-a-l)/(1-l)||0;return[c*100,f*100,u*100,l*100]};function n(s,i){return(s[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2}return r.rgb.keyword=function(s){const i=e[s];if(i)return i;let o=1/0,a;for(const l of Object.keys(t)){const c=t[l],f=n(s,c);f.04045?((i+.055)/1.055)**2.4:i/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const l=i*.4124+o*.3576+a*.1805,c=i*.2126+o*.7152+a*.0722,f=i*.0193+o*.1192+a*.9505;return[l*100,c*100,f*100]},r.rgb.lab=function(s){const i=r.rgb.xyz(s);let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,f=500*(o-a),u=200*(a-l);return[c,f,u]},r.hsl.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;let l,c,f;if(o===0)return f=a*255,[f,f,f];a<.5?l=a*(1+o):l=a+o-a*o;const u=2*a-l,d=[0,0,0];for(let h=0;h<3;h++)c=i+1/3*-(h-1),c<0&&c++,c>1&&c--,6*c<1?f=u+(l-u)*6*c:2*c<1?f=l:3*c<2?f=u+(l-u)*(2/3-c)*6:f=u,d[h]=f*255;return d},r.hsl.hsv=function(s){const i=s[0];let o=s[1]/100,a=s[2]/100,l=o;const c=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,l*=c<=1?c:2-c;const f=(a+o)/2,u=a===0?2*l/(c+l):2*o/(a+o);return[i,u*100,f*100]},r.hsv.rgb=function(s){const i=s[0]/60,o=s[1]/100;let a=s[2]/100;const l=Math.floor(i)%6,c=i-Math.floor(i),f=255*a*(1-o),u=255*a*(1-o*c),d=255*a*(1-o*(1-c));switch(a*=255,l){case 0:return[a,d,f];case 1:return[u,a,f];case 2:return[f,a,d];case 3:return[f,u,a];case 4:return[d,f,a];case 5:return[a,f,u]}},r.hsv.hsl=function(s){const i=s[0],o=s[1]/100,a=s[2]/100,l=Math.max(a,.01);let c,f;f=(2-o)*a;const u=(2-o)*l;return c=o*l,c/=u<=1?u:2-u,c=c||0,f/=2,[i,c*100,f*100]},r.hwb.rgb=function(s){const i=s[0]/360;let o=s[1]/100,a=s[2]/100;const l=o+a;let c;l>1&&(o/=l,a/=l);const f=Math.floor(6*i),u=1-a;c=6*i-f,f&1&&(c=1-c);const d=o+c*(u-o);let h,v,y;switch(f){default:case 6:case 0:h=u,v=d,y=o;break;case 1:h=d,v=u,y=o;break;case 2:h=o,v=u,y=d;break;case 3:h=o,v=d,y=u;break;case 4:h=d,v=o,y=u;break;case 5:h=u,v=o,y=d;break}return[h*255,v*255,y*255]},r.cmyk.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100,l=s[3]/100,c=1-Math.min(1,i*(1-l)+l),f=1-Math.min(1,o*(1-l)+l),u=1-Math.min(1,a*(1-l)+l);return[c*255,f*255,u*255]},r.xyz.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100;let l,c,f;return l=i*3.2406+o*-1.5372+a*-.4986,c=i*-.9689+o*1.8758+a*.0415,f=i*.0557+o*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),c=Math.min(Math.max(0,c),1),f=Math.min(Math.max(0,f),1),[l*255,c*255,f*255]},r.xyz.lab=function(s){let i=s[0],o=s[1],a=s[2];i/=95.047,o/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const l=116*o-16,c=500*(i-o),f=200*(o-a);return[l,c,f]},r.lab.xyz=function(s){const i=s[0],o=s[1],a=s[2];let l,c,f;c=(i+16)/116,l=o/500+c,f=c-a/200;const u=c**3,d=l**3,h=f**3;return c=u>.008856?u:(c-16/116)/7.787,l=d>.008856?d:(l-16/116)/7.787,f=h>.008856?h:(f-16/116)/7.787,l*=95.047,c*=100,f*=108.883,[l,c,f]},r.lab.lch=function(s){const i=s[0],o=s[1],a=s[2];let l;l=Math.atan2(a,o)*360/2/Math.PI,l<0&&(l+=360);const f=Math.sqrt(o*o+a*a);return[i,f,l]},r.lch.lab=function(s){const i=s[0],o=s[1],l=s[2]/360*2*Math.PI,c=o*Math.cos(l),f=o*Math.sin(l);return[i,c,f]},r.rgb.ansi16=function(s,i=null){const[o,a,l]=s;let c=i===null?r.rgb.hsv(s)[2]:i;if(c=Math.round(c/50),c===0)return 30;let f=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return c===2&&(f+=60),f},r.hsv.ansi16=function(s){return r.rgb.ansi16(r.hsv.rgb(s),s[2])},r.rgb.ansi256=function(s){const i=s[0],o=s[1],a=s[2];return i===o&&o===a?i<8?16:i>248?231:Math.round((i-8)/247*24)+232:16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(s){let i=s%10;if(i===0||i===7)return s>50&&(i+=3.5),i=i/10.5*255,[i,i,i];const o=(~~(s>50)+1)*.5,a=(i&1)*o*255,l=(i>>1&1)*o*255,c=(i>>2&1)*o*255;return[a,l,c]},r.ansi256.rgb=function(s){if(s>=232){const c=(s-232)*10+8;return[c,c,c]}s-=16;let i;const o=Math.floor(s/36)/5*255,a=Math.floor((i=s%36)/6)/5*255,l=i%6/5*255;return[o,a,l]},r.rgb.hex=function(s){const o=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(s){const i=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];let o=i[0];i[0].length===3&&(o=o.split("").map(u=>u+u).join(""));const a=parseInt(o,16),l=a>>16&255,c=a>>8&255,f=a&255;return[l,c,f]},r.rgb.hcg=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.max(Math.max(i,o),a),c=Math.min(Math.min(i,o),a),f=l-c;let u,d;return f<1?u=c/(1-f):u=0,f<=0?d=0:l===i?d=(o-a)/f%6:l===o?d=2+(a-i)/f:d=4+(i-o)/f,d/=6,d%=1,[d*360,f*100,u*100]},r.hsl.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=o<.5?2*i*o:2*i*(1-o);let l=0;return a<1&&(l=(o-.5*a)/(1-a)),[s[0],a*100,l*100]},r.hsv.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=i*o;let l=0;return a<1&&(l=(o-a)/(1-a)),[s[0],a*100,l*100]},r.hcg.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;if(o===0)return[a*255,a*255,a*255];const l=[0,0,0],c=i%1*6,f=c%1,u=1-f;let d=0;switch(Math.floor(c)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=u,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=u,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=u}return d=(1-o)*a,[(o*l[0]+d)*255,(o*l[1]+d)*255,(o*l[2]+d)*255]},r.hcg.hsv=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);let l=0;return a>0&&(l=i/a),[s[0],l*100,a*100]},r.hcg.hsl=function(s){const i=s[1]/100,a=s[2]/100*(1-i)+.5*i;let l=0;return a>0&&a<.5?l=i/(2*a):a>=.5&&a<1&&(l=i/(2*(1-a))),[s[0],l*100,a*100]},r.hcg.hwb=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);return[s[0],(a-i)*100,(1-a)*100]},r.hwb.hcg=function(s){const i=s[1]/100,a=1-s[2]/100,l=a-i;let c=0;return l<1&&(c=(a-l)/(1-l)),[s[0],l*100,c*100]},r.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},r.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},r.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},r.gray.hsl=function(s){return[0,0,s[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(s){return[0,100,s[0]]},r.gray.cmyk=function(s){return[0,0,0,s[0]]},r.gray.lab=function(s){return[s[0],0,0]},r.gray.hex=function(s){const i=Math.round(s[0]/100*255)&255,a=((i<<16)+(i<<8)+i).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]},w5}var x5,eD;function aIe(){if(eD)return x5;eD=1;const t=_Y();function e(){const i={},o=Object.keys(t);for(let a=o.length,l=0;l1&&(l=c),o(l))};return"conversion"in o&&(a.conversion=o.conversion),a}function i(o){const a=function(...l){const c=l[0];if(c==null)return c;c.length>1&&(l=c);const f=o(l);if(typeof f=="object")for(let u=f.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(c=>{const f=a[c];r[o][c]=i(f),r[o][c].raw=s(f)})}),C5=r,C5}(function(t){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,r=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,i=(f,u,d)=>[f,u,d],o=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const l=(f,u,d,h)=>{a===void 0&&(a=lIe());const v=h?10:0,y={};for(const[g,b]of Object.entries(a)){const p=g==="ansi16"?"ansi":g;g===u?y[p]=f(d,v):typeof b=="object"&&(y[p]=f(b[u],v))}return y};function c(){const f=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,y]of Object.entries(h))u[v]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},h[v]=u[v],f.set(y[0],y[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>l(e,"ansi16",s,!1)),o(u.color,"ansi256",()=>l(r,"ansi256",s,!1)),o(u.color,"ansi16m",()=>l(n,"rgb",i,!1)),o(u.bgColor,"ansi",()=>l(e,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>l(r,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>l(n,"rgb",i,!0)),u}Object.defineProperty(t,"exports",{enumerable:!0,get:c})})(iIe);var cIe={stdout:!1,stderr:!1};const fIe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const s=e.length;let i=0,o="";do o+=t.substr(i,n-i)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return o+=t.substr(i),o},uIe=(t,e,r,n)=>{let s=0,i="";do{const o=t[n-1]==="\r";i+=t.substr(s,(o?n-1:n)-s)+e+(o?`\r + `])),t,e)),K9e=t=>{if(t==="@media ")throw JM(t,"Query is empty");try{R9e(t)}catch(e){throw JM(t,e.message)}},Q9e=["vars"],Y9e=["content"],J9e={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function X9e(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function Z9e(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var eIe=" ",$1=[...H9e,"@media","@supports","@container","selectors"];class tIe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new t2],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new yk(e),this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){this.keyframesRules.push(e);return}var r=k1(e.rule,$1);this.addRule({selector:e.selector,rule:r}),this.currConditionalRuleset=new t2,this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule);var n=this.conditionalRulesets[this.conditionalRulesets.length-1];n.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}pixelifyProperties(e){return S1(e,(r,n)=>{typeof r=="number"&&r!==0&&!J9e[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=KM(e,Q9e);return r?Pv(Pv({},z9e(r,(s,i)=>e9e(i))),n):n}transformContent(e){var{content:r}=e,n=KM(e,Y9e);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return Pv({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(k_(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(bY(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,l=o.length-1;l>=0;l--){var[c,[f]]=o[l],u=c-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=Z9e(r,u,c+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){S1(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));W9e(o,e.selector);var a={selector:o,rule:k1(s,$1)};n?this.addConditionalRule(a,n):this.addRule(a);var l={type:"selector",selector:o,rule:s};this.transformSupports(l,s["@supports"],n),this.transformMedia(l,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@media ".concat(i))),S1(r,(i,o)=>{var a="@media ".concat(o);K9e(a);var l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformContainer(e,i["@container"],l)})}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),S1(r,(i,o)=>{var a="@container ".concat(o),l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformMedia(e,i["@media"],l)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),S1(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(G9e[s]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(Ju({"@font-face":r}));for(var n of this.keyframesRules)e.push(Ju({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.rules)e.push(Ju({[s.selector]:s.rule}));for(var i of this.conditionalRulesets)for(var o of i.renderToArray())e.push(Ju(o));return e.filter(Boolean)}}function Ju(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(c=>Ju({[o]:c},e)));else if(a&&typeof a=="object"){var l=Object.keys(a).length===0;l||r.push("".concat(e).concat(o,` { +`).concat(Ju(a,e+eIe),` +`).concat(e,"}"))}else r.push("".concat(e).concat(o.startsWith("--")?o:X9e(o),": ").concat(a,";"))};for(var s of Object.keys(t))n(s);return r.join(` +`)}function rIe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new tIe(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}function AY(t){for(var e=0,r,n=0,s=t.length;s>=4;++n,s-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var bk={},nIe={get exports(){return bk},set exports(t){bk=t}},b5,XM;function sIe(){return XM||(XM=1,b5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),b5}var w5,ZM;function _Y(){if(ZM)return w5;ZM=1;const t=sIe(),e={};for(const s of Object.keys(t))e[t[s]]=s;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};w5=r;for(const s of Object.keys(r)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);const{channels:i,labels:o}=r[s];delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}r.rgb.hsl=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(i,o,a),c=Math.max(i,o,a),f=c-l;let u,d;c===l?u=0:i===c?u=(o-a)/f:o===c?u=2+(a-i)/f:a===c&&(u=4+(i-o)/f),u=Math.min(u*60,360),u<0&&(u+=360);const h=(l+c)/2;return c===l?d=0:h<=.5?d=f/(c+l):d=f/(2-c-l),[u,d*100,h*100]},r.rgb.hsv=function(s){let i,o,a,l,c;const f=s[0]/255,u=s[1]/255,d=s[2]/255,h=Math.max(f,u,d),v=h-Math.min(f,u,d),y=function(g){return(h-g)/6/v+1/2};return v===0?(l=0,c=0):(c=v/h,i=y(f),o=y(u),a=y(d),f===h?l=a-o:u===h?l=1/3+i-a:d===h&&(l=2/3+o-i),l<0?l+=1:l>1&&(l-=1)),[l*360,c*100,h*100]},r.rgb.hwb=function(s){const i=s[0],o=s[1];let a=s[2];const l=r.rgb.hsl(s)[0],c=1/255*Math.min(i,Math.min(o,a));return a=1-1/255*Math.max(i,Math.max(o,a)),[l,c*100,a*100]},r.rgb.cmyk=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(1-i,1-o,1-a),c=(1-i-l)/(1-l)||0,f=(1-o-l)/(1-l)||0,u=(1-a-l)/(1-l)||0;return[c*100,f*100,u*100,l*100]};function n(s,i){return(s[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2}return r.rgb.keyword=function(s){const i=e[s];if(i)return i;let o=1/0,a;for(const l of Object.keys(t)){const c=t[l],f=n(s,c);f.04045?((i+.055)/1.055)**2.4:i/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const l=i*.4124+o*.3576+a*.1805,c=i*.2126+o*.7152+a*.0722,f=i*.0193+o*.1192+a*.9505;return[l*100,c*100,f*100]},r.rgb.lab=function(s){const i=r.rgb.xyz(s);let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,f=500*(o-a),u=200*(a-l);return[c,f,u]},r.hsl.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;let l,c,f;if(o===0)return f=a*255,[f,f,f];a<.5?l=a*(1+o):l=a+o-a*o;const u=2*a-l,d=[0,0,0];for(let h=0;h<3;h++)c=i+1/3*-(h-1),c<0&&c++,c>1&&c--,6*c<1?f=u+(l-u)*6*c:2*c<1?f=l:3*c<2?f=u+(l-u)*(2/3-c)*6:f=u,d[h]=f*255;return d},r.hsl.hsv=function(s){const i=s[0];let o=s[1]/100,a=s[2]/100,l=o;const c=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,l*=c<=1?c:2-c;const f=(a+o)/2,u=a===0?2*l/(c+l):2*o/(a+o);return[i,u*100,f*100]},r.hsv.rgb=function(s){const i=s[0]/60,o=s[1]/100;let a=s[2]/100;const l=Math.floor(i)%6,c=i-Math.floor(i),f=255*a*(1-o),u=255*a*(1-o*c),d=255*a*(1-o*(1-c));switch(a*=255,l){case 0:return[a,d,f];case 1:return[u,a,f];case 2:return[f,a,d];case 3:return[f,u,a];case 4:return[d,f,a];case 5:return[a,f,u]}},r.hsv.hsl=function(s){const i=s[0],o=s[1]/100,a=s[2]/100,l=Math.max(a,.01);let c,f;f=(2-o)*a;const u=(2-o)*l;return c=o*l,c/=u<=1?u:2-u,c=c||0,f/=2,[i,c*100,f*100]},r.hwb.rgb=function(s){const i=s[0]/360;let o=s[1]/100,a=s[2]/100;const l=o+a;let c;l>1&&(o/=l,a/=l);const f=Math.floor(6*i),u=1-a;c=6*i-f,f&1&&(c=1-c);const d=o+c*(u-o);let h,v,y;switch(f){default:case 6:case 0:h=u,v=d,y=o;break;case 1:h=d,v=u,y=o;break;case 2:h=o,v=u,y=d;break;case 3:h=o,v=d,y=u;break;case 4:h=d,v=o,y=u;break;case 5:h=u,v=o,y=d;break}return[h*255,v*255,y*255]},r.cmyk.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100,l=s[3]/100,c=1-Math.min(1,i*(1-l)+l),f=1-Math.min(1,o*(1-l)+l),u=1-Math.min(1,a*(1-l)+l);return[c*255,f*255,u*255]},r.xyz.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100;let l,c,f;return l=i*3.2406+o*-1.5372+a*-.4986,c=i*-.9689+o*1.8758+a*.0415,f=i*.0557+o*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),c=Math.min(Math.max(0,c),1),f=Math.min(Math.max(0,f),1),[l*255,c*255,f*255]},r.xyz.lab=function(s){let i=s[0],o=s[1],a=s[2];i/=95.047,o/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const l=116*o-16,c=500*(i-o),f=200*(o-a);return[l,c,f]},r.lab.xyz=function(s){const i=s[0],o=s[1],a=s[2];let l,c,f;c=(i+16)/116,l=o/500+c,f=c-a/200;const u=c**3,d=l**3,h=f**3;return c=u>.008856?u:(c-16/116)/7.787,l=d>.008856?d:(l-16/116)/7.787,f=h>.008856?h:(f-16/116)/7.787,l*=95.047,c*=100,f*=108.883,[l,c,f]},r.lab.lch=function(s){const i=s[0],o=s[1],a=s[2];let l;l=Math.atan2(a,o)*360/2/Math.PI,l<0&&(l+=360);const f=Math.sqrt(o*o+a*a);return[i,f,l]},r.lch.lab=function(s){const i=s[0],o=s[1],l=s[2]/360*2*Math.PI,c=o*Math.cos(l),f=o*Math.sin(l);return[i,c,f]},r.rgb.ansi16=function(s,i=null){const[o,a,l]=s;let c=i===null?r.rgb.hsv(s)[2]:i;if(c=Math.round(c/50),c===0)return 30;let f=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return c===2&&(f+=60),f},r.hsv.ansi16=function(s){return r.rgb.ansi16(r.hsv.rgb(s),s[2])},r.rgb.ansi256=function(s){const i=s[0],o=s[1],a=s[2];return i===o&&o===a?i<8?16:i>248?231:Math.round((i-8)/247*24)+232:16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(s){let i=s%10;if(i===0||i===7)return s>50&&(i+=3.5),i=i/10.5*255,[i,i,i];const o=(~~(s>50)+1)*.5,a=(i&1)*o*255,l=(i>>1&1)*o*255,c=(i>>2&1)*o*255;return[a,l,c]},r.ansi256.rgb=function(s){if(s>=232){const c=(s-232)*10+8;return[c,c,c]}s-=16;let i;const o=Math.floor(s/36)/5*255,a=Math.floor((i=s%36)/6)/5*255,l=i%6/5*255;return[o,a,l]},r.rgb.hex=function(s){const o=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(s){const i=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];let o=i[0];i[0].length===3&&(o=o.split("").map(u=>u+u).join(""));const a=parseInt(o,16),l=a>>16&255,c=a>>8&255,f=a&255;return[l,c,f]},r.rgb.hcg=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.max(Math.max(i,o),a),c=Math.min(Math.min(i,o),a),f=l-c;let u,d;return f<1?u=c/(1-f):u=0,f<=0?d=0:l===i?d=(o-a)/f%6:l===o?d=2+(a-i)/f:d=4+(i-o)/f,d/=6,d%=1,[d*360,f*100,u*100]},r.hsl.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=o<.5?2*i*o:2*i*(1-o);let l=0;return a<1&&(l=(o-.5*a)/(1-a)),[s[0],a*100,l*100]},r.hsv.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=i*o;let l=0;return a<1&&(l=(o-a)/(1-a)),[s[0],a*100,l*100]},r.hcg.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;if(o===0)return[a*255,a*255,a*255];const l=[0,0,0],c=i%1*6,f=c%1,u=1-f;let d=0;switch(Math.floor(c)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=u,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=u,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=u}return d=(1-o)*a,[(o*l[0]+d)*255,(o*l[1]+d)*255,(o*l[2]+d)*255]},r.hcg.hsv=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);let l=0;return a>0&&(l=i/a),[s[0],l*100,a*100]},r.hcg.hsl=function(s){const i=s[1]/100,a=s[2]/100*(1-i)+.5*i;let l=0;return a>0&&a<.5?l=i/(2*a):a>=.5&&a<1&&(l=i/(2*(1-a))),[s[0],l*100,a*100]},r.hcg.hwb=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);return[s[0],(a-i)*100,(1-a)*100]},r.hwb.hcg=function(s){const i=s[1]/100,a=1-s[2]/100,l=a-i;let c=0;return l<1&&(c=(a-l)/(1-l)),[s[0],l*100,c*100]},r.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},r.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},r.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},r.gray.hsl=function(s){return[0,0,s[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(s){return[0,100,s[0]]},r.gray.cmyk=function(s){return[0,0,0,s[0]]},r.gray.lab=function(s){return[s[0],0,0]},r.gray.hex=function(s){const i=Math.round(s[0]/100*255)&255,a=((i<<16)+(i<<8)+i).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]},w5}var x5,eD;function iIe(){if(eD)return x5;eD=1;const t=_Y();function e(){const i={},o=Object.keys(t);for(let a=o.length,l=0;l1&&(l=c),o(l))};return"conversion"in o&&(a.conversion=o.conversion),a}function i(o){const a=function(...l){const c=l[0];if(c==null)return c;c.length>1&&(l=c);const f=o(l);if(typeof f=="object")for(let u=f.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(c=>{const f=a[c];r[o][c]=i(f),r[o][c].raw=s(f)})}),C5=r,C5}(function(t){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,r=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,i=(f,u,d)=>[f,u,d],o=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const l=(f,u,d,h)=>{a===void 0&&(a=oIe());const v=h?10:0,y={};for(const[g,b]of Object.entries(a)){const p=g==="ansi16"?"ansi":g;g===u?y[p]=f(d,v):typeof b=="object"&&(y[p]=f(b[u],v))}return y};function c(){const f=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,y]of Object.entries(h))u[v]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},h[v]=u[v],f.set(y[0],y[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>l(e,"ansi16",s,!1)),o(u.color,"ansi256",()=>l(r,"ansi256",s,!1)),o(u.color,"ansi16m",()=>l(n,"rgb",i,!1)),o(u.bgColor,"ansi",()=>l(e,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>l(r,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>l(n,"rgb",i,!0)),u}Object.defineProperty(t,"exports",{enumerable:!0,get:c})})(nIe);var aIe={stdout:!1,stderr:!1};const lIe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const s=e.length;let i=0,o="";do o+=t.substr(i,n-i)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return o+=t.substr(i),o},cIe=(t,e,r,n)=>{let s=0,i="";do{const o=t[n-1]==="\r";i+=t.substr(s,(o?n-1:n)-s)+e+(o?`\r `:` `)+r,s=n+1,n=t.indexOf(` -`,s)}while(n!==-1);return i+=t.substr(s),i};var dIe={stringReplaceAll:fIe,stringEncaseCRLFWithFirstIndex:uIe},E5,rD;function hIe(){if(rD)return E5;rD=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function i(c){const f=c[0]==="u",u=c[1]==="{";return f&&!u&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):f&&u?String.fromCodePoint(parseInt(c.slice(2,-1),16)):s.get(c)||c}function o(c,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const y=Number(v);if(!Number.isNaN(y))u.push(y);else if(h=v.match(r))u.push(h[2].replace(n,(g,b,p)=>b?i(b):p));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${c}')`)}return u}function a(c){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(c))!==null;){const d=u[1];if(u[2]){const h=o(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function l(c,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=c;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return E5=(c,f)=>{const u=[],d=[];let h=[];if(f.replace(t,(v,y,g,b,p,w)=>{if(y)h.push(i(y));else if(b){const E=h.join("");h=[],d.push(u.length===0?E:l(c,u)(E)),u.push({inverse:g,styles:a(b)})}else if(p){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(l(c,u)(h.join(""))),h=[],u.pop()}else h.push(w)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},E5}const Hy=bk,{stdout:wk,stderr:xk}=cIe,{stringReplaceAll:vIe,stringEncaseCRLFWithFirstIndex:yIe}=dIe,{isArray:r2}=Array,PY=["ansi","ansi","ansi256","ansi16m"],Kh=Object.create(null),mIe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=wk?wk.level:0;t.level=e.level===void 0?r:e.level};class pIe{constructor(e){return TY(e)}}const TY=t=>{const e={};return mIe(e,t),e.template=(...r)=>IY(e.template,...r),Object.setPrototypeOf(e,Dx.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=pIe,e.template};function Dx(t){return TY(t)}for(const[t,e]of Object.entries(Hy))Kh[t]={get(){const r=Nx(this,__(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Kh.visible={get(){const t=Nx(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const RY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of RY)Kh[t]={get(){const{level:e}=this;return function(...r){const n=__(Hy.color[PY[e]][t](...r),Hy.color.close,this._styler);return Nx(this,n,this._isEmpty)}}};for(const t of RY){const e="bg"+t[0].toUpperCase()+t.slice(1);Kh[e]={get(){const{level:r}=this;return function(...n){const s=__(Hy.bgColor[PY[r]][t](...n),Hy.bgColor.close,this._styler);return Nx(this,s,this._isEmpty)}}}}const gIe=Object.defineProperties(()=>{},{...Kh,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),__=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},Nx=(t,e,r)=>{const n=(...s)=>r2(s[0])&&r2(s[0].raw)?nD(n,IY(n,...s)):nD(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,gIe),n._generator=t,n._styler=e,n._isEmpty=r,n},nD=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=vIe(e,r.close,r.open),r=r.parent;const i=e.indexOf(` -`);return i!==-1&&(e=yIe(e,s,n,i)),n+e+s};let S5;const IY=(t,...e)=>{const[r]=e;if(!r2(r)||!r2(r.raw))return e.join(" ");const n=e.slice(1),s=[r.raw[0]];for(let i=1;i{k5.push(t)},registerClassName:t=>{iD.add(t)},registerComposition:t=>{oD.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=sIe({localClassNames:Array.from(iD),composedClassLists:oD,cssObjs:k5}).join(` -`);tRe({fileScope:t,css:e}),k5=[]},getIdentOption:()=>"short"};Q9e(OIe);function n2(t,e){return n2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},n2(t,e)}function MIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n2(t,e)}function Ck(){Ck=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),n2(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,l){var c=o[l];if(typeof c=="number")a[l]=s[c];else{for(var f=0;s[c[f]]===void 0&&f+1]+)>/g,function(l,c){var f=o[c];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(n(l,a)),i.apply(this,l)})}return t[Symbol.replace].call(this,s,i)},Ck.apply(this,arguments)}function DIe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=eu(),i=s.match(Ck(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function T_(t){var{debugId:e,debugFileName:r=!0}=Pv(Pv({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),n=eRe().toString(36),{filePath:s,packageName:i}=eu(),o=AY(i?"".concat(i).concat(s):s),a="".concat(o).concat(n);if(Z9e()==="debug"){var l=DIe({debugId:e,debugFileName:r});l&&(a="".concat(l,"__").concat(a))}return a.match(/^[0-9]/)?"_".concat(a):a}function NIe(t,e){var r=T_(e);gY(r);var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(WRe(n)),J9e({identifier:r,classList:o}),s.length>0&&bY(r)),s.length>0){var a=IIe.all(s,{arrayMerge:(l,c)=>c});Mx({type:"local",selector:r,rule:a},eu())}return o}function Fs(t,e){if(Array.isArray(t))return NIe(t,e);var r=T_(e);return gY(r),Mx({type:"local",selector:r,rule:t},eu()),r}function Ki(t,e){Mx({type:"global",selector:t,rule:e},eu())}function MY(t,e){var r=k_(T_(e),{isIdentifier:!0});return Mx({type:"keyframes",name:r,rule:t},eu()),r}function lh(){return lh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const jIe=["createConnector"],FIe=t=>{const e=[],r=t.find(s=>s.id==="injected");return t.filter(s=>!r||!r.hideConnectorId?!0:s.id!==r.hideConnectorId).forEach(s=>{const i=LIe(s,jIe),o=s.createConnector(),a=lh({},i),c=((f,u)=>{const d=f;return d._wallet=lh({},u),d})(o,a);e.push(c)}),e},BIe=t=>/^\S+@\S+\.\S{2,}$/.test(t),Ek={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},UIe=(t,e)=>{const r=e.find(i=>i.id===t);if(r){var n,s;return{name:r.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:Ek[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(s=r.blockExplorers)==null?void 0:s.default.url}}},Mr=(t,e)=>Ek[t]||UIe(t,e)||Ek[1],tu=()=>{const t=P.createContext(void 0);return[()=>{const r=P.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},R_=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},zIe=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},VIe=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function qIe(t){var e,r;const{account:n,chain:s,transport:i}=t,o={chainId:s.id,name:s.name,ensAddress:(e=s.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return new Oq(i,o).getSigner(n.address)}function WIe(t){var e,r;const{chain:n,transport:s}=t,i={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return s.type==="fallback"?new mwe(s.transports.map(({value:o})=>new xa(o==null?void 0:o.url,i))):new xa(s.url,i)}let Es=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t}({});const $5={showEmailInput:!0,miniAuthOptions:["google","discord","facebook","apple"],authOptions:["metamask","wallet-connect"]},DY=60*60*24*7,HIe=async t=>{const e=localStorage.getItem(Es.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(Es.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),s=t.account.address,i=new Uw;i.address=s,i.claims.app=n.app||"app",i.claims.ogn=n.origin,i.claims.n=n.nonce,i.setExpiryIn(n.expiry?Math.max(n.expiry,200):DY);const o=i.messageTypedData();o.domain.verifyingContract;const l=await qIe(t)._signTypedData(o.domain,o.types,o.message);i.signature=l;const f=await new Iy().encodeProof(i,!0);return{typedData:o,proofString:f}},GIe=async(t,e,r)=>{const n=t.account.address,i=await new Iy().decodeProof(r.proofString,!0),o=WIe(e);return await tG.utils.isValidTypedDataSignature(n,r.typedData,i.signature,o)},[KIe,QIe]=tu(),YIe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=KIe();return{setOpenConnectModal:t,openConnectModalState:e}},[JIe,XIe]=tu(),Na=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=JIe();return{setTheme:t,theme:e,position:r,setPosition:n}},[ZIe,eOe]=tu(),tOe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=ZIe();return{displayedAssets:e,setDisplayedAssets:t}};Xf("packages/kit/src/components/styles.css.ts","kit");const rOe=Fs({maxWidth:"400px",width:"100%",":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"networkButton"),Zm=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Sk=Fs({},"walletLogoContainer");Ki(`${Sk} svg`,{height:"40px"});const NY=Fs({},"walletLogoContainerExtended");Ki(`${NY} svg`,{width:"30px"});const I_=Fs({},"walletContent");Ki(`${I_} + button`,{backgroundColor:"transparent"});Ki(`${I_} + button > svg`,{width:"20px",height:"20px"});Zf();const nOe=({onConnect:t,connectors:e})=>{const{theme:r}=Na(),{connectors:n,connect:s,isLoading:i}=tV();return P.createElement(W,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(o=>{const a=r==="dark"?o._wallet.logoDark:o._wallet.logoLight,l=o._wallet.name;return P.createElement(W,{key:o.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:rOe,onClick:()=>t(o)},P.createElement(re,{variant:"medium"},l,i),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{backgroundColor:o._wallet.iconBackground},borderRadius:"md",className:NY},P.createElement(a,null)))}))},sOe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrlDarkMode:r,logoUrlLightMode:n}=e,{theme:s}=Na();return P.createElement(P.Fragment,null,s==="dark"&&r&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:r,style:{height:"110px"}})),s==="light"&&n&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:n,style:{height:"110px"}})))},iOe=t=>{const{isConnected:e}=Tn(),{theme:r}=Na(),{config:n={}}=t,{signIn:s={}}=n,{showEmailInput:i=$5.showEmailInput,authOptions:o=$5.authOptions,miniAuthOptions:a=$5.miniAuthOptions}=s,{openConnectModal:l,setOpenConnectModal:c}=t,[f,u]=m.useState(""),{connectors:d,connect:h,isLoading:v}=tV(),y=d,[g,b]=m.useState(!1),p=y.find(B=>B._wallet.id==="email"),w=y.filter(B=>!!o.find(U=>U===B._wallet.id)),E=y.filter(B=>!!a.find(U=>U===B._wallet.id)),k=w.length>6,$=B=>{u(B.target.value)};m.useEffect(()=>{e&&l&&c(!1)},[e,l]);const x=B=>{if(B._wallet.id==="email"){const L=prompt("Auto-email login, please specify the email address:");localStorage.setItem(hk,L||"")}h({connector:B})},T=B=>{B.preventDefault(),localStorage.setItem(hk,f),h({connector:p})};return g?P.createElement(P.Fragment,null,P.createElement(W,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>b(!1),className:Zm},P.createElement(Q2,null)),P.createElement(nOe,{connectors:w,onConnect:x})):P.createElement(P.Fragment,null,P.createElement(sOe,{config:n}),P.createElement(W,{marginTop:"5"},p&&i&&P.createElement(P.Fragment,null,P.createElement("form",{onSubmit:T},P.createElement(ac,{onChange:$,value:f,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),P.createElement(nt,{type:"submit",disabled:!BIe(f),marginTop:"4",width:"full",label:"Continue",rightIcon:Di}))),E.length>0&&P.createElement(P.Fragment,null,p&&i&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),P.createElement(W,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},E.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.miniLogoDark||B._wallet.logoDark:B._wallet.miniLogoLight||B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),aspectRatio:"1/1",style:{width:`calc(25% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(L,null)))}))),w.length>0&&P.createElement(P.Fragment,null,(p&&i||E.length>0)&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),P.createElement(W,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},w.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.logoDark:B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),style:{height:"110px",width:`calc(50% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},P.createElement(L,null),P.createElement(re,{fontSize:"normal",fontWeight:"bold"},B._wallet.name)))})),k&&P.createElement(W,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:Zm,onClick:()=>b(!0)},P.createElement(re,{variant:"medium"},"More options"),P.createElement(Di,null)))))},LY={dark:"dark",light:"light"},oOe=t=>{const{config:e={},children:r}=t,{defaultTheme:n="dark",signIn:s={},position:i="center",displayedAssets:o=[],ethAuth:a={}}=e,l=s.projectName||"app",{expiry:c=DY,app:f=l,origin:u=location.origin,nonce:d}=a,{projectName:h}=s,[v,y]=m.useState(!1),[g,b]=m.useState(n||LY.dark),[p,w]=m.useState(i),[E,k]=m.useState(o);return m.useEffect(()=>{localStorage.setItem(Es.Theme,g),localStorage.setItem(Es.EthAuthSettings,JSON.stringify({expiry:c,app:f,origin:u,nonce:d}))},[g,a]),m.useEffect(()=>{k(E)},[o]),P.createElement(XIe,{value:{theme:g,setTheme:b,position:p,setPosition:w}},P.createElement(QIe,{value:{setOpenConnectModal:y,openConnectModalState:v}},P.createElement(eOe,{value:{setDisplayedAssets:k,displayedAssets:E}},P.createElement(fw,{theme:g},P.createElement(H2,null,v&&P.createElement(P$,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:lh({maxWidth:"364px"},R_(i))},onClose:()=>y(!1)},P.createElement(W,{padding:"4",className:I_},P.createElement(W,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},P.createElement(re,null,"Sign in ",h?`to ${h}`:"")),P.createElement(iOe,lh({openConnectModal:v,setOpenConnectModal:y},t)))))),r)))};class U0{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ky=typeof window>"u"||"Deno"in window;function Hs(){}function aOe(t,e){return typeof t=="function"?t(e):t}function kk(t){return typeof t=="number"&&t>=0&&t!==1/0}function jY(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Xu(t,e,r){return Lx(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function ol(t,e,r){return Lx(t)?[{...e,queryKey:t},r]:[t||{},e]}function aD(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(Lx(o)){if(n){if(e.queryHash!==O_(o,e.options))return!1}else if(!s2(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function lD(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(Lx(i)){if(!e.options.mutationKey)return!1;if(r){if(ef(e.options.mutationKey)!==ef(i))return!1}else if(!s2(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function O_(t,e){return((e==null?void 0:e.queryKeyHashFn)||ef)(t)}function ef(t){return JSON.stringify(t,(e,r)=>$k(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function s2(t,e){return FY(t,e)}function FY(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!FY(t[r],e[r])):!1}function BY(t,e){if(t===e)return t;const r=fD(t)&&fD(e);if(r||$k(t)&&$k(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!uD(r)||!r.hasOwnProperty("isPrototypeOf"))}function uD(t){return Object.prototype.toString.call(t)==="[object Object]"}function Lx(t){return Array.isArray(t)}function UY(t){return new Promise(e=>{setTimeout(e,t)})}function dD(t){UY(0).then(t)}function lOe(){if(typeof AbortController=="function")return new AbortController}function Ak(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?BY(t,e):e}class cOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const i2=new cOe;class fOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const o2=new fOe;function uOe(t){return Math.min(1e3*2**t,3e4)}function jx(t){return(t??"online")==="online"?o2.isOnline():!0}class zY{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Zp(t){return t instanceof zY}function VY(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new zY(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!i2.isFocused()||t.networkMode!=="always"&&!o2.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:uOe,$=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return jx(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const M_=console;function dOe(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):dD(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&dD(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const Rr=dOe();class qY{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kk(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(Ky?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class hOe extends qY{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||M_,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||vOe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=Ak(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Hs).catch(Hs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!jY(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey);const o=lOe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Zp(h)&&h.silent||this.dispatch({type:"error",error:h}),!Zp(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=VY({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=e.meta)!=null?s:null,fetchStatus:jx(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Zp(o)&&o.revert&&this.revertState?{...this.revertState}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),Rr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function vOe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class yOe extends U0{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:O_(i,r);let a=this.get(o);return a||(a=new hOe({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){Rr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=ol(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>aD(n,s))}findAll(e,r){const[n]=ol(e,r);return Object.keys(n).length>0?this.queries.filter(s=>aD(n,s)):this.queries}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Rr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Rr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class mOe extends qY{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||M_,this.observers=[],this.state=e.state||pOe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var x;return this.retryer=VY({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,$;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!jx(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),Rr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function pOe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class gOe extends U0{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new mOe({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(s),s}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){Rr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>lD(e,r))}findAll(e){return this.mutations.filter(r=>lD(e,r))}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return Rr.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Hs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function _k(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),p=($,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...$]:[...$,T]),w=($,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&$.length)return Promise.resolve($);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p($,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",x=$?c:Pk(t.options,d);E=w(d,$,x)}else if(u){const $=typeof c<"u",x=$?c:WY(t.options,d);E=w(d,$,x,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:Pk(t.options,B);return w(B,$,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function Pk(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function WY(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function bOe(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=Pk(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function wOe(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=WY(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class HY{constructor(e={}){this.queryCache=e.queryCache||new yOe,this.mutationCache=e.mutationCache||new gOe,this.logger=e.logger||M_,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=i2.subscribe(()=>{i2.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=o2.subscribe(()=>{o2.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=ol(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const s=Xu(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=aOe(r,i);if(typeof o>"u")return;const a=Xu(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return Rr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=ol(e,r),s=this.queryCache;Rr.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=ol(e,r,n),o=this.queryCache,a={type:"active",...s};return Rr.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=ol(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=Rr.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Hs).catch(Hs)}invalidateQueries(e,r,n){const[s,i]=ol(e,r,n);return Rr.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=ol(e,r,n),o=Rr.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Hs);return i!=null&&i.throwOnError||(a=a.catch(Hs)),a}fetchQuery(e,r,n){const s=Xu(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Hs).catch(Hs)}fetchInfiniteQuery(e,r,n){const s=Xu(e,r,n);return s.behavior=_k(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Hs).catch(Hs)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(s=>ef(e)===ef(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>s2(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>ef(e)===ef(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>s2(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=O_(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class GY extends U0{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),hD(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return Tk(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tk(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),cD(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&vD(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Hs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Ky||this.currentResult.isStale||!kk(this.options.staleTime))return;const r=jY(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Ky||this.options.enabled===!1||!kk(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||i2.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&hD(e,r),L=T&&vD(e,n,r,s);(B||L)&&(y=jx(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=Ak(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=Ak(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",$=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:D_(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,cD(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options;if(o==="all"||!o&&!this.trackedProps.size)return!0;const a=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&a.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Zp(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){Rr.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(f=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function xOe(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function hD(t,e){return xOe(t,e)||t.state.dataUpdatedAt>0&&Tk(t,e,e.refetchOnMount)}function Tk(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&D_(t,e)}return!1}function vD(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&D_(t,r)}function D_(t,e){return t.isStaleByTime(e.staleTime)}class COe extends GY{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:_k()},r)}getOptimisticResult(e){return e.behavior=_k(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,s,i,o,a,l;const{state:c}=e,f=super.createResult(e,r),{isFetching:u,isRefetching:d}=f,h=u&&((n=c.fetchMeta)==null||(s=n.fetchMore)==null?void 0:s.direction)==="forward",v=u&&((i=c.fetchMeta)==null||(o=i.fetchMore)==null?void 0:o.direction)==="backward";return{...f,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bOe(r,(a=c.data)==null?void 0:a.pages),hasPreviousPage:wOe(r,(l=c.data)==null?void 0:l.pages),isFetchingNextPage:h,isFetchingPreviousPage:v,isRefetching:d&&!h&&!v}}}const EOe=jd.useSyncExternalStore,yD=m.createContext(void 0),KY=m.createContext(!1);function QY(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yD),window.ReactQueryClientContext):yD)}const SOe=({context:t}={})=>{const e=m.useContext(QY(t,m.useContext(KY)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},YY=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=QY(r,n);return m.createElement(KY.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},JY=m.createContext(!1),kOe=()=>m.useContext(JY);JY.Provider;function $Oe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const AOe=m.createContext($Oe()),_Oe=()=>m.useContext(AOe);function POe(t,e){return typeof t=="function"?t(...e):!!t}const TOe=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},ROe=t=>{m.useEffect(()=>{t.clearReset()},[t])},IOe=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&POe(r,[t.error,n]),OOe=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},MOe=(t,e)=>t.isLoading&&t.isFetching&&!e,DOe=(t,e,r)=>(t==null?void 0:t.suspense)&&MOe(e,r),NOe=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function XY(t,e){const r=SOe({context:t.context}),n=kOe(),s=_Oe(),i=r.defaultQueryOptions(t);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=Rr.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Rr.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Rr.batchCalls(i.onSettled)),OOe(i),TOe(i,s),ROe(s);const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(EOe(m.useCallback(l=>n?()=>{}:o.subscribe(Rr.batchCalls(l)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),DOe(i,a,n))throw NOe(i,o,s);if(IOe({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function hi(t,e,r){const n=Xu(t,e,r);return XY(n,GY)}function LOe(t,e,r){const n=Xu(t,e,r);return XY(n,COe)}function jOe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var ZY=jOe;function FOe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=zMe}var lJ=VMe,qMe=Fx,WMe=lJ,HMe=Bx,GMe="[object Arguments]",KMe="[object Array]",QMe="[object Boolean]",YMe="[object Date]",JMe="[object Error]",XMe="[object Function]",ZMe="[object Map]",eDe="[object Number]",tDe="[object Object]",rDe="[object RegExp]",nDe="[object Set]",sDe="[object String]",iDe="[object WeakMap]",oDe="[object ArrayBuffer]",aDe="[object DataView]",lDe="[object Float32Array]",cDe="[object Float64Array]",fDe="[object Int8Array]",uDe="[object Int16Array]",dDe="[object Int32Array]",hDe="[object Uint8Array]",vDe="[object Uint8ClampedArray]",yDe="[object Uint16Array]",mDe="[object Uint32Array]",Vt={};Vt[lDe]=Vt[cDe]=Vt[fDe]=Vt[uDe]=Vt[dDe]=Vt[hDe]=Vt[vDe]=Vt[yDe]=Vt[mDe]=!0;Vt[GMe]=Vt[KMe]=Vt[oDe]=Vt[QMe]=Vt[aDe]=Vt[YMe]=Vt[JMe]=Vt[XMe]=Vt[ZMe]=Vt[eDe]=Vt[tDe]=Vt[rDe]=Vt[nDe]=Vt[sDe]=Vt[iDe]=!1;function pDe(t){return HMe(t)&&WMe(t.length)&&!!Vt[qMe(t)]}var gDe=pDe;function bDe(t){return function(e){return t(e)}}var wDe=bDe,l2={},xDe={get exports(){return l2},set exports(t){l2=t}};(function(t,e){var r=tJ,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===n,o=i&&r.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(xDe,l2);var CDe=gDe,EDe=wDe,wD=l2,xD=wD&&wD.isTypedArray,SDe=xD?EDe(xD):CDe,kDe=SDe,$De=sMe,ADe=MMe,_De=oJ,PDe=a2,TDe=aJ,RDe=kDe,IDe=Object.prototype,ODe=IDe.hasOwnProperty;function MDe(t,e){var r=_De(t),n=!r&&ADe(t),s=!r&&!n&&PDe(t),i=!r&&!n&&!s&&RDe(t),o=r||n||s||i,a=o?$De(t.length,String):[],l=a.length;for(var c in t)(e||ODe.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||TDe(c,l)))&&a.push(c);return a}var DDe=MDe,NDe=Object.prototype;function LDe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||NDe;return t===r}var jDe=LDe;function FDe(t,e){return function(r){return t(e(r))}}var BDe=FDe,UDe=BDe,zDe=UDe(Object.keys,Object),VDe=zDe,qDe=jDe,WDe=VDe,HDe=Object.prototype,GDe=HDe.hasOwnProperty;function KDe(t){if(!qDe(t))return WDe(t);var e=[];for(var r in Object(t))GDe.call(t,r)&&r!="constructor"&&e.push(r);return e}var QDe=KDe;function YDe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var N_=YDe,JDe=Fx,XDe=N_,ZDe="[object AsyncFunction]",eNe="[object Function]",tNe="[object GeneratorFunction]",rNe="[object Proxy]";function nNe(t){if(!XDe(t))return!1;var e=JDe(t);return e==eNe||e==tNe||e==ZDe||e==rNe}var sNe=nNe,iNe=sNe,oNe=lJ;function aNe(t){return t!=null&&oNe(t.length)&&!iNe(t)}var cJ=aNe,lNe=DDe,cNe=QDe,fNe=cJ;function uNe(t){return fNe(t)?lNe(t):cNe(t)}var dNe=uNe,hNe=rMe,vNe=dNe;function yNe(t){return t==null?[]:hNe(t,vNe(t))}var mNe=yNe,pNe=ZY,gNe=eJ,bNe=mNe;function wNe(t,e){var r=bNe(t);return gNe(r,pNe(e,0,r.length))}var xNe=wNe;function CNe(t,e){return t===e||t!==t&&e!==e}var ENe=CNe,SNe=ENe,kNe=cJ,$Ne=aJ,ANe=N_;function _Ne(t,e,r){if(!ANe(r))return!1;var n=typeof e;return(n=="number"?kNe(r)&&$Ne(e,r.length):n=="string"&&e in r)?SNe(r[e],t):!1}var PNe=_Ne,TNe=/\s/;function RNe(t){for(var e=t.length;e--&&TNe.test(t.charAt(e)););return e}var INe=RNe,ONe=INe,MNe=/^\s+/;function DNe(t){return t&&t.slice(0,ONe(t)+1).replace(MNe,"")}var NNe=DNe,LNe=Fx,jNe=Bx,FNe="[object Symbol]";function BNe(t){return typeof t=="symbol"||jNe(t)&&LNe(t)==FNe}var UNe=BNe,zNe=NNe,CD=N_,VNe=UNe,ED=0/0,qNe=/^[-+]0x[0-9a-f]+$/i,WNe=/^0b[01]+$/i,HNe=/^0o[0-7]+$/i,GNe=parseInt;function KNe(t){if(typeof t=="number")return t;if(VNe(t))return ED;if(CD(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=CD(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=zNe(t);var r=WNe.test(t);return r||HNe.test(t)?GNe(t.slice(2),r?2:8):qNe.test(t)?ED:+t}var QNe=KNe,YNe=QNe,SD=1/0,JNe=17976931348623157e292;function XNe(t){if(!t)return t===0?t:0;if(t=YNe(t),t===SD||t===-SD){var e=t<0?-1:1;return e*JNe}return t===t?t:0}var ZNe=XNe,eLe=ZNe;function tLe(t){var e=eLe(t),r=e%1;return e===e?r?e-r:e:0}var rLe=tLe,nLe=JOe,sLe=xNe,iLe=oJ,oLe=PNe,aLe=rLe;function lLe(t,e,r){(r?oLe(t,e,r):e===void 0)?e=1:e=aLe(e);var n=iLe(t)?nLe:sLe;return n(t,e)}var cLe=lLe,Ux={},fLe=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var u=kD[e.format]||kD.default;window.clipboardData.setData(u,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),n=hLe("message"in e?e.message:dLe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var yLe=vLe;function Rk(t){return Rk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rk(t)}Object.defineProperty(Ux,"__esModule",{value:!0});Ux.CopyToClipboard=void 0;var ep=fJ(m),mLe=fJ(yLe),pLe=["text","onCopy","options","children"];function fJ(t){return t&&t.__esModule?t:{default:t}}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function AD(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function bLe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}function wLe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _D(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c2(t){return c2=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},c2(t)}function L_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dJ=function(t){CLe(r,t);var e=ELe(r);function r(){var n;wLe(this,r);for(var s=arguments.length,i=new Array(s),o=0;oe in t?ALe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qy=(t,e)=>{for(var r in e||(e={}))vJ.call(e,r)&&PD(t,r,e[r]);if(f2)for(var r of f2(e))yJ.call(e,r)&&PD(t,r,e[r]);return t},j_=(t,e)=>{var r={};for(var n in t)vJ.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&f2)for(var n of f2(t))e.indexOf(n)<0&&yJ.call(t,n)&&(r[n]=t[n]);return r};/** +`,s)}while(n!==-1);return i+=t.substr(s),i};var fIe={stringReplaceAll:lIe,stringEncaseCRLFWithFirstIndex:cIe},E5,rD;function uIe(){if(rD)return E5;rD=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function i(c){const f=c[0]==="u",u=c[1]==="{";return f&&!u&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):f&&u?String.fromCodePoint(parseInt(c.slice(2,-1),16)):s.get(c)||c}function o(c,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const y=Number(v);if(!Number.isNaN(y))u.push(y);else if(h=v.match(r))u.push(h[2].replace(n,(g,b,p)=>b?i(b):p));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${c}')`)}return u}function a(c){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(c))!==null;){const d=u[1];if(u[2]){const h=o(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function l(c,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=c;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return E5=(c,f)=>{const u=[],d=[];let h=[];if(f.replace(t,(v,y,g,b,p,w)=>{if(y)h.push(i(y));else if(b){const E=h.join("");h=[],d.push(u.length===0?E:l(c,u)(E)),u.push({inverse:g,styles:a(b)})}else if(p){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(l(c,u)(h.join(""))),h=[],u.pop()}else h.push(w)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},E5}const Hy=bk,{stdout:wk,stderr:xk}=aIe,{stringReplaceAll:dIe,stringEncaseCRLFWithFirstIndex:hIe}=fIe,{isArray:r2}=Array,PY=["ansi","ansi","ansi256","ansi16m"],Kh=Object.create(null),vIe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=wk?wk.level:0;t.level=e.level===void 0?r:e.level};class yIe{constructor(e){return TY(e)}}const TY=t=>{const e={};return vIe(e,t),e.template=(...r)=>IY(e.template,...r),Object.setPrototypeOf(e,Dx.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=yIe,e.template};function Dx(t){return TY(t)}for(const[t,e]of Object.entries(Hy))Kh[t]={get(){const r=Nx(this,__(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Kh.visible={get(){const t=Nx(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const RY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of RY)Kh[t]={get(){const{level:e}=this;return function(...r){const n=__(Hy.color[PY[e]][t](...r),Hy.color.close,this._styler);return Nx(this,n,this._isEmpty)}}};for(const t of RY){const e="bg"+t[0].toUpperCase()+t.slice(1);Kh[e]={get(){const{level:r}=this;return function(...n){const s=__(Hy.bgColor[PY[r]][t](...n),Hy.bgColor.close,this._styler);return Nx(this,s,this._isEmpty)}}}}const mIe=Object.defineProperties(()=>{},{...Kh,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),__=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},Nx=(t,e,r)=>{const n=(...s)=>r2(s[0])&&r2(s[0].raw)?nD(n,IY(n,...s)):nD(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,mIe),n._generator=t,n._styler=e,n._isEmpty=r,n},nD=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=dIe(e,r.close,r.open),r=r.parent;const i=e.indexOf(` +`);return i!==-1&&(e=hIe(e,s,n,i)),n+e+s};let S5;const IY=(t,...e)=>{const[r]=e;if(!r2(r)||!r2(r.raw))return e.join(" ");const n=e.slice(1),s=[r.raw[0]];for(let i=1;i{k5.push(t)},registerClassName:t=>{iD.add(t)},registerComposition:t=>{oD.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=rIe({localClassNames:Array.from(iD),composedClassLists:oD,cssObjs:k5}).join(` +`);ZRe({fileScope:t,css:e}),k5=[]},getIdentOption:()=>"short"};GRe(RIe);function n2(t,e){return n2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},n2(t,e)}function IIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n2(t,e)}function Ck(){Ck=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),n2(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,l){var c=o[l];if(typeof c=="number")a[l]=s[c];else{for(var f=0;s[c[f]]===void 0&&f+1]+)>/g,function(l,c){var f=o[c];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(n(l,a)),i.apply(this,l)})}return t[Symbol.replace].call(this,s,i)},Ck.apply(this,arguments)}function OIe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=eu(),i=s.match(Ck(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function T_(t){var{debugId:e,debugFileName:r=!0}=Pv(Pv({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),n=XRe().toString(36),{filePath:s,packageName:i}=eu(),o=AY(i?"".concat(i).concat(s):s),a="".concat(o).concat(n);if(JRe()==="debug"){var l=OIe({debugId:e,debugFileName:r});l&&(a="".concat(l,"__").concat(a))}return a.match(/^[0-9]/)?"_".concat(a):a}function MIe(t,e){var r=T_(e);gY(r);var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(V9e(n)),QRe({identifier:r,classList:o}),s.length>0&&bY(r)),s.length>0){var a=TIe.all(s,{arrayMerge:(l,c)=>c});Mx({type:"local",selector:r,rule:a},eu())}return o}function Fs(t,e){if(Array.isArray(t))return MIe(t,e);var r=T_(e);return gY(r),Mx({type:"local",selector:r,rule:t},eu()),r}function Gi(t,e){Mx({type:"global",selector:t,rule:e},eu())}function MY(t,e){var r=k_(T_(e),{isIdentifier:!0});return Mx({type:"keyframes",name:r,rule:t},eu()),r}function lh(){return lh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const NIe=["createConnector"],LIe=t=>{const e=[],r=t.find(s=>s.id==="injected");return t.filter(s=>!r||!r.hideConnectorId?!0:s.id!==r.hideConnectorId).forEach(s=>{const i=DIe(s,NIe),o=s.createConnector(),a=lh({},i),c=((f,u)=>{const d=f;return d._wallet=lh({},u),d})(o,a);e.push(c)}),e},jIe=t=>/^\S+@\S+\.\S{2,}$/.test(t),Ek={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},FIe=(t,e)=>{const r=e.find(i=>i.id===t);if(r){var n,s;return{name:r.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:Ek[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(s=r.blockExplorers)==null?void 0:s.default.url}}},Mr=(t,e)=>Ek[t]||FIe(t,e)||Ek[1],tu=()=>{const t=P.createContext(void 0);return[()=>{const r=P.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},R_=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},BIe=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},UIe=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function zIe(t){var e,r;const{account:n,chain:s,transport:i}=t,o={chainId:s.id,name:s.name,ensAddress:(e=s.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return new Oq(i,o).getSigner(n.address)}function VIe(t){var e,r;const{chain:n,transport:s}=t,i={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return s.type==="fallback"?new vwe(s.transports.map(({value:o})=>new xa(o==null?void 0:o.url,i))):new xa(s.url,i)}let Es=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t}({});const $5={showEmailInput:!0,miniAuthOptions:["google","discord","facebook","apple"],authOptions:["metamask","wallet-connect"]},DY=60*60*24*7,qIe=async t=>{const e=localStorage.getItem(Es.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(Es.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),s=t.account.address,i=new Uw;i.address=s,i.claims.app=n.app||"app",i.claims.ogn=n.origin,i.claims.n=n.nonce,i.setExpiryIn(n.expiry?Math.max(n.expiry,200):DY);const o=i.messageTypedData();o.domain.verifyingContract;const l=await zIe(t)._signTypedData(o.domain,o.types,o.message);i.signature=l;const f=await new Iy().encodeProof(i,!0);return{typedData:o,proofString:f}},WIe=async(t,e,r)=>{const n=t.account.address,i=await new Iy().decodeProof(r.proofString,!0),o=VIe(e);return await tG.utils.isValidTypedDataSignature(n,r.typedData,i.signature,o)},[HIe,GIe]=tu(),KIe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=HIe();return{setOpenConnectModal:t,openConnectModalState:e}},[QIe,YIe]=tu(),Na=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=QIe();return{setTheme:t,theme:e,position:r,setPosition:n}},[JIe,XIe]=tu(),ZIe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=JIe();return{displayedAssets:e,setDisplayedAssets:t}};Xf("packages/kit/src/components/styles.css.ts","kit");const eOe=Fs({maxWidth:"400px",width:"100%",":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"networkButton"),Zm=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Sk=Fs({},"walletLogoContainer");Gi(`${Sk} svg`,{height:"40px"});const NY=Fs({},"walletLogoContainerExtended");Gi(`${NY} svg`,{width:"30px"});const I_=Fs({},"walletContent");Gi(`${I_} + button`,{backgroundColor:"transparent"});Gi(`${I_} + button > svg`,{width:"20px",height:"20px"});Zf();const tOe=({onConnect:t,connectors:e})=>{const{theme:r}=Na(),{connectors:n,connect:s,isLoading:i}=tV();return P.createElement(W,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(o=>{const a=r==="dark"?o._wallet.logoDark:o._wallet.logoLight,l=o._wallet.name;return P.createElement(W,{key:o.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:eOe,onClick:()=>t(o)},P.createElement(re,{variant:"medium"},l,i),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{backgroundColor:o._wallet.iconBackground},borderRadius:"md",className:NY},P.createElement(a,null)))}))},rOe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrlDarkMode:r,logoUrlLightMode:n}=e,{theme:s}=Na();return P.createElement(P.Fragment,null,s==="dark"&&r&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:r,style:{height:"110px"}})),s==="light"&&n&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:n,style:{height:"110px"}})))},nOe=t=>{const{isConnected:e}=Tn(),{theme:r}=Na(),{config:n={}}=t,{signIn:s={}}=n,{showEmailInput:i=$5.showEmailInput,authOptions:o=$5.authOptions,miniAuthOptions:a=$5.miniAuthOptions}=s,{openConnectModal:l,setOpenConnectModal:c}=t,[f,u]=m.useState(""),{connectors:d,connect:h,isLoading:v}=tV(),y=d,[g,b]=m.useState(!1),p=y.find(B=>B._wallet.id==="email"),w=y.filter(B=>!!o.find(U=>U===B._wallet.id)),E=y.filter(B=>!!a.find(U=>U===B._wallet.id)),k=w.length>6,A=B=>{u(B.target.value)};m.useEffect(()=>{e&&l&&c(!1)},[e,l]);const x=B=>{if(B._wallet.id==="email"){const L=prompt("Auto-email login, please specify the email address:");localStorage.setItem(hk,L||"")}h({connector:B})},T=B=>{B.preventDefault(),localStorage.setItem(hk,f),h({connector:p})};return g?P.createElement(P.Fragment,null,P.createElement(W,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>b(!1),className:Zm},P.createElement(Q2,null)),P.createElement(tOe,{connectors:w,onConnect:x})):P.createElement(P.Fragment,null,P.createElement(rOe,{config:n}),P.createElement(W,{marginTop:"5"},p&&i&&P.createElement(P.Fragment,null,P.createElement("form",{onSubmit:T},P.createElement(ac,{onChange:A,value:f,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),P.createElement(it,{type:"submit",disabled:!jIe(f),marginTop:"4",width:"full",label:"Continue",rightIcon:Co}))),E.length>0&&P.createElement(P.Fragment,null,p&&i&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),P.createElement(W,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},E.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.miniLogoDark||B._wallet.logoDark:B._wallet.miniLogoLight||B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),aspectRatio:"1/1",style:{width:`calc(25% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(L,null)))}))),w.length>0&&P.createElement(P.Fragment,null,(p&&i||E.length>0)&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),P.createElement(W,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},w.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.logoDark:B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),style:{height:"110px",width:`calc(50% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},P.createElement(L,null),P.createElement(re,{fontSize:"normal",fontWeight:"bold"},B._wallet.name)))})),k&&P.createElement(W,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:Zm,onClick:()=>b(!0)},P.createElement(re,{variant:"medium"},"More options"),P.createElement(Co,null)))))},LY={dark:"dark",light:"light"},sOe=t=>{const{config:e={},children:r}=t,{defaultTheme:n="dark",signIn:s={},position:i="center",displayedAssets:o=[],ethAuth:a={}}=e,l=s.projectName||"app",{expiry:c=DY,app:f=l,origin:u=location.origin,nonce:d}=a,{projectName:h}=s,[v,y]=m.useState(!1),[g,b]=m.useState(n||LY.dark),[p,w]=m.useState(i),[E,k]=m.useState(o);return m.useEffect(()=>{localStorage.setItem(Es.Theme,g),localStorage.setItem(Es.EthAuthSettings,JSON.stringify({expiry:c,app:f,origin:u,nonce:d}))},[g,a]),m.useEffect(()=>{k(E)},[o]),P.createElement(YIe,{value:{theme:g,setTheme:b,position:p,setPosition:w}},P.createElement(GIe,{value:{setOpenConnectModal:y,openConnectModalState:v}},P.createElement(XIe,{value:{setDisplayedAssets:k,displayedAssets:E}},P.createElement(fw,{theme:g},P.createElement(H2,null,v&&P.createElement(P$,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:lh({maxWidth:"364px"},R_(i))},onClose:()=>y(!1)},P.createElement(W,{padding:"4",className:I_},P.createElement(W,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},P.createElement(re,null,"Sign in ",h?`to ${h}`:"")),P.createElement(nOe,lh({openConnectModal:v,setOpenConnectModal:y},t)))))),r)))};class U0{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ky=typeof window>"u"||"Deno"in window;function Hs(){}function iOe(t,e){return typeof t=="function"?t(e):t}function kk(t){return typeof t=="number"&&t>=0&&t!==1/0}function jY(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Xu(t,e,r){return Lx(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function ol(t,e,r){return Lx(t)?[{...e,queryKey:t},r]:[t||{},e]}function aD(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(Lx(o)){if(n){if(e.queryHash!==O_(o,e.options))return!1}else if(!s2(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function lD(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(Lx(i)){if(!e.options.mutationKey)return!1;if(r){if(ef(e.options.mutationKey)!==ef(i))return!1}else if(!s2(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function O_(t,e){return((e==null?void 0:e.queryKeyHashFn)||ef)(t)}function ef(t){return JSON.stringify(t,(e,r)=>$k(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function s2(t,e){return FY(t,e)}function FY(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!FY(t[r],e[r])):!1}function BY(t,e){if(t===e)return t;const r=fD(t)&&fD(e);if(r||$k(t)&&$k(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!uD(r)||!r.hasOwnProperty("isPrototypeOf"))}function uD(t){return Object.prototype.toString.call(t)==="[object Object]"}function Lx(t){return Array.isArray(t)}function UY(t){return new Promise(e=>{setTimeout(e,t)})}function dD(t){UY(0).then(t)}function oOe(){if(typeof AbortController=="function")return new AbortController}function Ak(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?BY(t,e):e}class aOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const i2=new aOe;class lOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const o2=new lOe;function cOe(t){return Math.min(1e3*2**t,3e4)}function jx(t){return(t??"online")==="online"?o2.isOnline():!0}class zY{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Zp(t){return t instanceof zY}function VY(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new zY(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!i2.isFocused()||t.networkMode!=="always"&&!o2.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:cOe,A=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return jx(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const M_=console;function fOe(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):dD(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&dD(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const Rr=fOe();class qY{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kk(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(Ky?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class uOe extends qY{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||M_,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||dOe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=Ak(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Hs).catch(Hs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!jY(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey);const o=oOe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Zp(h)&&h.silent||this.dispatch({type:"error",error:h}),!Zp(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=VY({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=e.meta)!=null?s:null,fetchStatus:jx(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Zp(o)&&o.revert&&this.revertState?{...this.revertState}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),Rr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function dOe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class hOe extends U0{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:O_(i,r);let a=this.get(o);return a||(a=new uOe({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){Rr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=ol(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>aD(n,s))}findAll(e,r){const[n]=ol(e,r);return Object.keys(n).length>0?this.queries.filter(s=>aD(n,s)):this.queries}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Rr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Rr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class vOe extends qY{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||M_,this.observers=[],this.state=e.state||yOe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var x;return this.retryer=VY({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,A;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!jx(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),Rr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function yOe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class mOe extends U0{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new vOe({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(s),s}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){Rr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>lD(e,r))}findAll(e){return this.mutations.filter(r=>lD(e,r))}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return Rr.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Hs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function _k(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),p=(A,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...A]:[...A,T]),w=(A,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&A.length)return Promise.resolve(A);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p(A,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const A=typeof c<"u",x=A?c:Pk(t.options,d);E=w(d,A,x)}else if(u){const A=typeof c<"u",x=A?c:WY(t.options,d);E=w(d,A,x,!0)}else{v=[];const A=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],A,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=A?h[T]:Pk(t.options,B);return w(B,A,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then(A=>({pages:A,pageParams:v}))}}}}function Pk(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function WY(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function pOe(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=Pk(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function gOe(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=WY(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class HY{constructor(e={}){this.queryCache=e.queryCache||new hOe,this.mutationCache=e.mutationCache||new mOe,this.logger=e.logger||M_,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=i2.subscribe(()=>{i2.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=o2.subscribe(()=>{o2.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=ol(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const s=Xu(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=iOe(r,i);if(typeof o>"u")return;const a=Xu(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return Rr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=ol(e,r),s=this.queryCache;Rr.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=ol(e,r,n),o=this.queryCache,a={type:"active",...s};return Rr.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=ol(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=Rr.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Hs).catch(Hs)}invalidateQueries(e,r,n){const[s,i]=ol(e,r,n);return Rr.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=ol(e,r,n),o=Rr.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Hs);return i!=null&&i.throwOnError||(a=a.catch(Hs)),a}fetchQuery(e,r,n){const s=Xu(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Hs).catch(Hs)}fetchInfiniteQuery(e,r,n){const s=Xu(e,r,n);return s.behavior=_k(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Hs).catch(Hs)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(s=>ef(e)===ef(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>s2(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>ef(e)===ef(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>s2(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=O_(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class GY extends U0{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),hD(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return Tk(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tk(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),cD(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&vD(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Hs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Ky||this.currentResult.isStale||!kk(this.options.staleTime))return;const r=jY(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Ky||this.options.enabled===!1||!kk(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||i2.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&hD(e,r),L=T&&vD(e,n,r,s);(B||L)&&(y=jx(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=Ak(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=Ak(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",A=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:A,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:A&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:A&&u.dataUpdatedAt!==0,isStale:D_(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,cD(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options;if(o==="all"||!o&&!this.trackedProps.size)return!0;const a=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&a.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Zp(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){Rr.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(f=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function bOe(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function hD(t,e){return bOe(t,e)||t.state.dataUpdatedAt>0&&Tk(t,e,e.refetchOnMount)}function Tk(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&D_(t,e)}return!1}function vD(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&D_(t,r)}function D_(t,e){return t.isStaleByTime(e.staleTime)}class wOe extends GY{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:_k()},r)}getOptimisticResult(e){return e.behavior=_k(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,s,i,o,a,l;const{state:c}=e,f=super.createResult(e,r),{isFetching:u,isRefetching:d}=f,h=u&&((n=c.fetchMeta)==null||(s=n.fetchMore)==null?void 0:s.direction)==="forward",v=u&&((i=c.fetchMeta)==null||(o=i.fetchMore)==null?void 0:o.direction)==="backward";return{...f,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:pOe(r,(a=c.data)==null?void 0:a.pages),hasPreviousPage:gOe(r,(l=c.data)==null?void 0:l.pages),isFetchingNextPage:h,isFetchingPreviousPage:v,isRefetching:d&&!h&&!v}}}const xOe=jd.useSyncExternalStore,yD=m.createContext(void 0),KY=m.createContext(!1);function QY(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yD),window.ReactQueryClientContext):yD)}const COe=({context:t}={})=>{const e=m.useContext(QY(t,m.useContext(KY)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},YY=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=QY(r,n);return m.createElement(KY.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},JY=m.createContext(!1),EOe=()=>m.useContext(JY);JY.Provider;function SOe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const kOe=m.createContext(SOe()),$Oe=()=>m.useContext(kOe);function AOe(t,e){return typeof t=="function"?t(...e):!!t}const _Oe=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},POe=t=>{m.useEffect(()=>{t.clearReset()},[t])},TOe=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&AOe(r,[t.error,n]),ROe=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},IOe=(t,e)=>t.isLoading&&t.isFetching&&!e,OOe=(t,e,r)=>(t==null?void 0:t.suspense)&&IOe(e,r),MOe=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function XY(t,e){const r=COe({context:t.context}),n=EOe(),s=$Oe(),i=r.defaultQueryOptions(t);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=Rr.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Rr.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Rr.batchCalls(i.onSettled)),ROe(i),_Oe(i,s),POe(s);const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(xOe(m.useCallback(l=>n?()=>{}:o.subscribe(Rr.batchCalls(l)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),OOe(i,a,n))throw MOe(i,o,s);if(TOe({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function hi(t,e,r){const n=Xu(t,e,r);return XY(n,GY)}function DOe(t,e,r){const n=Xu(t,e,r);return XY(n,wOe)}function NOe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var ZY=NOe;function LOe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=BMe}var lJ=UMe,zMe=Fx,VMe=lJ,qMe=Bx,WMe="[object Arguments]",HMe="[object Array]",GMe="[object Boolean]",KMe="[object Date]",QMe="[object Error]",YMe="[object Function]",JMe="[object Map]",XMe="[object Number]",ZMe="[object Object]",eDe="[object RegExp]",tDe="[object Set]",rDe="[object String]",nDe="[object WeakMap]",sDe="[object ArrayBuffer]",iDe="[object DataView]",oDe="[object Float32Array]",aDe="[object Float64Array]",lDe="[object Int8Array]",cDe="[object Int16Array]",fDe="[object Int32Array]",uDe="[object Uint8Array]",dDe="[object Uint8ClampedArray]",hDe="[object Uint16Array]",vDe="[object Uint32Array]",Vt={};Vt[oDe]=Vt[aDe]=Vt[lDe]=Vt[cDe]=Vt[fDe]=Vt[uDe]=Vt[dDe]=Vt[hDe]=Vt[vDe]=!0;Vt[WMe]=Vt[HMe]=Vt[sDe]=Vt[GMe]=Vt[iDe]=Vt[KMe]=Vt[QMe]=Vt[YMe]=Vt[JMe]=Vt[XMe]=Vt[ZMe]=Vt[eDe]=Vt[tDe]=Vt[rDe]=Vt[nDe]=!1;function yDe(t){return qMe(t)&&VMe(t.length)&&!!Vt[zMe(t)]}var mDe=yDe;function pDe(t){return function(e){return t(e)}}var gDe=pDe,l2={},bDe={get exports(){return l2},set exports(t){l2=t}};(function(t,e){var r=tJ,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===n,o=i&&r.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(bDe,l2);var wDe=mDe,xDe=gDe,wD=l2,xD=wD&&wD.isTypedArray,CDe=xD?xDe(xD):wDe,EDe=CDe,SDe=rMe,kDe=IMe,$De=oJ,ADe=a2,_De=aJ,PDe=EDe,TDe=Object.prototype,RDe=TDe.hasOwnProperty;function IDe(t,e){var r=$De(t),n=!r&&kDe(t),s=!r&&!n&&ADe(t),i=!r&&!n&&!s&&PDe(t),o=r||n||s||i,a=o?SDe(t.length,String):[],l=a.length;for(var c in t)(e||RDe.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_De(c,l)))&&a.push(c);return a}var ODe=IDe,MDe=Object.prototype;function DDe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||MDe;return t===r}var NDe=DDe;function LDe(t,e){return function(r){return t(e(r))}}var jDe=LDe,FDe=jDe,BDe=FDe(Object.keys,Object),UDe=BDe,zDe=NDe,VDe=UDe,qDe=Object.prototype,WDe=qDe.hasOwnProperty;function HDe(t){if(!zDe(t))return VDe(t);var e=[];for(var r in Object(t))WDe.call(t,r)&&r!="constructor"&&e.push(r);return e}var GDe=HDe;function KDe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var N_=KDe,QDe=Fx,YDe=N_,JDe="[object AsyncFunction]",XDe="[object Function]",ZDe="[object GeneratorFunction]",eNe="[object Proxy]";function tNe(t){if(!YDe(t))return!1;var e=QDe(t);return e==XDe||e==ZDe||e==JDe||e==eNe}var rNe=tNe,nNe=rNe,sNe=lJ;function iNe(t){return t!=null&&sNe(t.length)&&!nNe(t)}var cJ=iNe,oNe=ODe,aNe=GDe,lNe=cJ;function cNe(t){return lNe(t)?oNe(t):aNe(t)}var fNe=cNe,uNe=eMe,dNe=fNe;function hNe(t){return t==null?[]:uNe(t,dNe(t))}var vNe=hNe,yNe=ZY,mNe=eJ,pNe=vNe;function gNe(t,e){var r=pNe(t);return mNe(r,yNe(e,0,r.length))}var bNe=gNe;function wNe(t,e){return t===e||t!==t&&e!==e}var xNe=wNe,CNe=xNe,ENe=cJ,SNe=aJ,kNe=N_;function $Ne(t,e,r){if(!kNe(r))return!1;var n=typeof e;return(n=="number"?ENe(r)&&SNe(e,r.length):n=="string"&&e in r)?CNe(r[e],t):!1}var ANe=$Ne,_Ne=/\s/;function PNe(t){for(var e=t.length;e--&&_Ne.test(t.charAt(e)););return e}var TNe=PNe,RNe=TNe,INe=/^\s+/;function ONe(t){return t&&t.slice(0,RNe(t)+1).replace(INe,"")}var MNe=ONe,DNe=Fx,NNe=Bx,LNe="[object Symbol]";function jNe(t){return typeof t=="symbol"||NNe(t)&&DNe(t)==LNe}var FNe=jNe,BNe=MNe,CD=N_,UNe=FNe,ED=0/0,zNe=/^[-+]0x[0-9a-f]+$/i,VNe=/^0b[01]+$/i,qNe=/^0o[0-7]+$/i,WNe=parseInt;function HNe(t){if(typeof t=="number")return t;if(UNe(t))return ED;if(CD(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=CD(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=BNe(t);var r=VNe.test(t);return r||qNe.test(t)?WNe(t.slice(2),r?2:8):zNe.test(t)?ED:+t}var GNe=HNe,KNe=GNe,SD=1/0,QNe=17976931348623157e292;function YNe(t){if(!t)return t===0?t:0;if(t=KNe(t),t===SD||t===-SD){var e=t<0?-1:1;return e*QNe}return t===t?t:0}var JNe=YNe,XNe=JNe;function ZNe(t){var e=XNe(t),r=e%1;return e===e?r?e-r:e:0}var eLe=ZNe,tLe=QOe,rLe=bNe,nLe=oJ,sLe=ANe,iLe=eLe;function oLe(t,e,r){(r?sLe(t,e,r):e===void 0)?e=1:e=iLe(e);var n=nLe(t)?tLe:rLe;return n(t,e)}var aLe=oLe,Ux={},lLe=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var u=kD[e.format]||kD.default;window.clipboardData.setData(u,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),n=uLe("message"in e?e.message:fLe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var hLe=dLe;function Rk(t){return Rk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rk(t)}Object.defineProperty(Ux,"__esModule",{value:!0});Ux.CopyToClipboard=void 0;var ep=fJ(m),vLe=fJ(hLe),yLe=["text","onCopy","options","children"];function fJ(t){return t&&t.__esModule?t:{default:t}}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function AD(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function pLe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}function gLe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _D(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c2(t){return c2=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},c2(t)}function L_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dJ=function(t){wLe(r,t);var e=xLe(r);function r(){var n;gLe(this,r);for(var s=arguments.length,i=new Array(s),o=0;oe in t?kLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qy=(t,e)=>{for(var r in e||(e={}))vJ.call(e,r)&&PD(t,r,e[r]);if(f2)for(var r of f2(e))yJ.call(e,r)&&PD(t,r,e[r]);return t},j_=(t,e)=>{var r={};for(var n in t)vJ.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&f2)for(var n of f2(t))e.indexOf(n)<0&&yJ.call(t,n)&&(r[n]=t[n]);return r};/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT - */var If;(t=>{const e=class{constructor(l,c,f,u){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],le.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let v=0;v7)throw new RangeError("Invalid value");let v,y;for(v=f;;v++){const w=e.getNumDataCodewords(v,c)*8,E=a.getTotalBits(l,v);if(E<=w){y=E;break}if(v>=u)throw new RangeError("Data too long")}for(const w of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&y<=e.getNumDataCodewords(v,w)*8&&(c=w);let g=[];for(const w of l){n(w.mode.modeBits,4,g),n(w.numChars,w.mode.numCharCountBits(v),g);for(const E of w.getData())g.push(E)}i(g.length==y);const b=e.getNumDataCodewords(v,c)*8;i(g.length<=b),n(0,Math.min(4,b-g.length),g),n(0,(8-g.length%8)%8,g),i(g.length%8==0);for(let w=236;g.lengthp[E>>>3]|=w<<7-(E&7)),new e(v,c,p,d)}getModule(l,c){return 0<=l&&l>>9)*1335;const u=(c<<10|f)^21522;i(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,s(u,d));this.setFunctionModule(8,7,s(u,6)),this.setFunctionModule(8,8,s(u,7)),this.setFunctionModule(7,8,s(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,s(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,s(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,s(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let f=0;f<12;f++)l=l<<1^(l>>>11)*7973;const c=this.version<<12|l;i(c>>>18==0);for(let f=0;f<18;f++){const u=s(c,f),d=this.size-11+f%3,h=Math.floor(f/3);this.setFunctionModule(d,h,u),this.setFunctionModule(h,d,u)}}drawFinderPattern(l,c){for(let f=-4;f<=4;f++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(f)),h=l+u,v=c+f;0<=h&&h{(w!=y-d||k>=v)&&p.push(E[w])});return i(p.length==h),p}drawCodewords(l){if(l.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let u=0;u>>3],7-(c&7)),c++)}}i(c==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[d][g],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[g][d],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;dh+(v?1:0),c);const f=this.size*this.size,u=Math.ceil(Math.abs(c*20-f*10)/f)-1;return i(0<=u&&u<=9),l+=u*e.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let f=[6];for(let u=this.size-7;f.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*l+128)*l+64;if(l>=2){const f=Math.floor(l/7)+2;c-=(25*f-10)*f-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(l,c){return Math.floor(e.getNumRawDataModules(l)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let c=[];for(let u=0;u0);for(const u of l){const d=u^f.shift();f.push(0),c.forEach((h,v)=>f[v]^=e.reedSolomonMultiply(h,d))}return f}static reedSolomonMultiply(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");let f=0;for(let u=7;u>=0;u--)f=f<<1^(f>>>7)*285,f^=(c>>>u&1)*l;return i(f>>>8==0),f}finderPenaltyCountPatterns(l){const c=l[1];i(c<=this.size*3);const f=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(f&&l[0]>=c*4&&l[6]>=c?1:0)+(f&&l[6]>=c*4&&l[0]>=c?1:0)}finderPenaltyTerminateAndCount(l,c,f){return l&&(this.finderPenaltyAddHistory(c,f),c=0),c+=this.size,this.finderPenaltyAddHistory(c,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(l,c,f){if(c<0||c>31||l>>>c)throw new RangeError("Value out of range");for(let u=c-1;u>=0;u--)f.push(l>>>u&1)}function s(l,c){return(l>>>c&1)!=0}function i(l){if(!l)throw new Error("Assertion error")}const o=class{constructor(l,c,f){if(this.mode=l,this.numChars=c,this.bitData=f,c<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(l){let c=[];for(const f of l)n(f,8,c);return new o(o.Mode.BYTE,l.length,c)}static makeNumeric(l){if(!o.isNumeric(l))throw new RangeError("String contains non-numeric characters");let c=[];for(let f=0;f=1<{(e=>{const r=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(If||(If={}));(t=>{(e=>{const r=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(If||(If={}));var Zu=If;/** + */var If;(t=>{const e=class{constructor(l,c,f,u){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],le.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let v=0;v7)throw new RangeError("Invalid value");let v,y;for(v=f;;v++){const w=e.getNumDataCodewords(v,c)*8,E=a.getTotalBits(l,v);if(E<=w){y=E;break}if(v>=u)throw new RangeError("Data too long")}for(const w of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&y<=e.getNumDataCodewords(v,w)*8&&(c=w);let g=[];for(const w of l){n(w.mode.modeBits,4,g),n(w.numChars,w.mode.numCharCountBits(v),g);for(const E of w.getData())g.push(E)}i(g.length==y);const b=e.getNumDataCodewords(v,c)*8;i(g.length<=b),n(0,Math.min(4,b-g.length),g),n(0,(8-g.length%8)%8,g),i(g.length%8==0);for(let w=236;g.lengthp[E>>>3]|=w<<7-(E&7)),new e(v,c,p,d)}getModule(l,c){return 0<=l&&l>>9)*1335;const u=(c<<10|f)^21522;i(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,s(u,d));this.setFunctionModule(8,7,s(u,6)),this.setFunctionModule(8,8,s(u,7)),this.setFunctionModule(7,8,s(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,s(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,s(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,s(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let f=0;f<12;f++)l=l<<1^(l>>>11)*7973;const c=this.version<<12|l;i(c>>>18==0);for(let f=0;f<18;f++){const u=s(c,f),d=this.size-11+f%3,h=Math.floor(f/3);this.setFunctionModule(d,h,u),this.setFunctionModule(h,d,u)}}drawFinderPattern(l,c){for(let f=-4;f<=4;f++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(f)),h=l+u,v=c+f;0<=h&&h{(w!=y-d||k>=v)&&p.push(E[w])});return i(p.length==h),p}drawCodewords(l){if(l.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let u=0;u>>3],7-(c&7)),c++)}}i(c==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[d][g],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[g][d],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;dh+(v?1:0),c);const f=this.size*this.size,u=Math.ceil(Math.abs(c*20-f*10)/f)-1;return i(0<=u&&u<=9),l+=u*e.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let f=[6];for(let u=this.size-7;f.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*l+128)*l+64;if(l>=2){const f=Math.floor(l/7)+2;c-=(25*f-10)*f-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(l,c){return Math.floor(e.getNumRawDataModules(l)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let c=[];for(let u=0;u0);for(const u of l){const d=u^f.shift();f.push(0),c.forEach((h,v)=>f[v]^=e.reedSolomonMultiply(h,d))}return f}static reedSolomonMultiply(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");let f=0;for(let u=7;u>=0;u--)f=f<<1^(f>>>7)*285,f^=(c>>>u&1)*l;return i(f>>>8==0),f}finderPenaltyCountPatterns(l){const c=l[1];i(c<=this.size*3);const f=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(f&&l[0]>=c*4&&l[6]>=c?1:0)+(f&&l[6]>=c*4&&l[0]>=c?1:0)}finderPenaltyTerminateAndCount(l,c,f){return l&&(this.finderPenaltyAddHistory(c,f),c=0),c+=this.size,this.finderPenaltyAddHistory(c,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(l,c,f){if(c<0||c>31||l>>>c)throw new RangeError("Value out of range");for(let u=c-1;u>=0;u--)f.push(l>>>u&1)}function s(l,c){return(l>>>c&1)!=0}function i(l){if(!l)throw new Error("Assertion error")}const o=class{constructor(l,c,f){if(this.mode=l,this.numChars=c,this.bitData=f,c<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(l){let c=[];for(const f of l)n(f,8,c);return new o(o.Mode.BYTE,l.length,c)}static makeNumeric(l){if(!o.isNumeric(l))throw new RangeError("String contains non-numeric characters");let c=[];for(let f=0;f=1<{(e=>{const r=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(If||(If={}));(t=>{(e=>{const r=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(If||(If={}));var Zu=If;/** * @license qrcode.react * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC - */var mJ={L:Zu.QrCode.Ecc.LOW,M:Zu.QrCode.Ecc.MEDIUM,Q:Zu.QrCode.Ecc.QUARTILE,H:Zu.QrCode.Ecc.HIGH},pJ=128,gJ="L",bJ="#FFFFFF",wJ="#000000",xJ=!1,F_=4,_Le=.1;function CJ(t,e=0){const r=[];return t.forEach(function(n,s){let i=null;n.forEach(function(o,a){if(!o&&i!==null){r.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===n.length-1){if(!o)return;i===null?r.push(`M${a+e},${s+e} h1v1H${a+e}z`):r.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),r.join("")}function EJ(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((s,i)=>i=e.x+e.w?s:!1))}function SJ(t,e,r,n){if(n==null)return null;const s=r?F_:0,i=t.length+s*2,o=Math.floor(e*_Le),a=i/e,l=(n.width||o)*a,c=(n.height||o)*a,f=n.x==null?t.length/2-l/2:n.x*a,u=n.y==null?t.length/2-c/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(f),v=Math.floor(u),y=Math.ceil(l+f-h),g=Math.ceil(c+u-v);d={x:h,y:v,w:y,h:g}}return{x:f,y:u,h:c,w:l,excavation:d}}var PLe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function TLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,style:l,imageSettings:c}=e,f=j_(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),u=c==null?void 0:c.src,d=m.useRef(null),h=m.useRef(null),[v,y]=m.useState(!1);m.useEffect(()=>{if(d.current!=null){const p=d.current,w=p.getContext("2d");if(!w)return;let E=Zu.QrCode.encodeText(r,mJ[s]).getModules();const k=a?F_:0,$=E.length+k*2,x=SJ(E,n,a,c),T=h.current,B=x!=null&&T!==null&&T.complete&&T.naturalHeight!==0&&T.naturalWidth!==0;B&&x.excavation!=null&&(E=EJ(E,x.excavation));const L=window.devicePixelRatio||1;p.height=p.width=n*L;const U=n/$*L;w.scale(U,U),w.fillStyle=i,w.fillRect(0,0,$,$),w.fillStyle=o,PLe?w.fill(new Path2D(CJ(E,k))):E.forEach(function(V,N){V.forEach(function(C,S){C&&w.fillRect(S+k,N+k,1,1)})}),B&&w.drawImage(T,x.x+k,x.y+k,x.w,x.h)}}),m.useEffect(()=>{y(!1)},[u]);const g=Qy({height:n,width:n},l);let b=null;return u!=null&&(b=P.createElement("img",{src:u,key:u,style:{display:"none"},onLoad:()=>{y(!0)},ref:h})),P.createElement(P.Fragment,null,P.createElement("canvas",Qy({style:g,height:n,width:n,ref:d},f)),b)}function RLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,imageSettings:l}=e,c=j_(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Zu.QrCode.encodeText(r,mJ[s]).getModules();const u=a?F_:0,d=f.length+u*2,h=SJ(f,n,a,l);let v=null;l!=null&&h!=null&&(h.excavation!=null&&(f=EJ(f,h.excavation)),v=P.createElement("image",{xlinkHref:l.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"}));const y=CJ(f,u);return P.createElement("svg",Qy({height:n,width:n,viewBox:`0 0 ${d} ${d}`},c),P.createElement("path",{fill:i,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),P.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),v)}var ILe=t=>{const e=t,{renderAs:r}=e,n=j_(e,["renderAs"]);return r==="svg"?P.createElement(RLe,Qy({},n)):P.createElement(TLe,Qy({},n))},Mk={},OLe={get exports(){return Mk},set exports(t){Mk=t}};(function(t,e){(function(r,n){t.exports=n()})(Wr,function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",f="week",u="month",d="quarter",h="year",v="date",y="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var C=["th","st","nd","rd"],S=N%100;return"["+N+(C[(S-20)%10]||C[S]||C[0])+"]"}},w=function(N,C,S){var R=String(N);return!R||R.length>=C?N:""+Array(C+1-R.length).join(S)+N},E={s:w,z:function(N){var C=-N.utcOffset(),S=Math.abs(C),R=Math.floor(S/60),M=S%60;return(C<=0?"+":"-")+w(R,2,"0")+":"+w(M,2,"0")},m:function N(C,S){if(C.date()1)return N(I[0])}else{var F=C.name;$[F]=C,M=F}return!R&&M&&(k=M),M||!R&&k},B=function(N,C){if(x(N))return N.clone();var S=typeof C=="object"?C:{};return S.date=N,S.args=arguments,new U(S)},L=E;L.l=T,L.i=x,L.w=function(N,C){return B(N,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var U=function(){function N(S){this.$L=T(S.locale,null,!0),this.parse(S)}var C=N.prototype;return C.parse=function(S){this.$d=function(R){var M=R.date,_=R.utc;if(M===null)return new Date(NaN);if(L.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var I=M.match(g);if(I){var F=I[2]-1||0,D=(I[7]||"0").substring(0,3);return _?new Date(Date.UTC(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)):new Date(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)}}return new Date(M)}(S),this.$x=S.x||{},this.init()},C.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},C.$utils=function(){return L},C.isValid=function(){return this.$d.toString()!==y},C.isSame=function(S,R){var M=B(S);return this.startOf(R)<=M&&M<=this.endOf(R)},C.isAfter=function(S,R){return B(S)`Invalid value for key ${t}`,ULe=t=>`Pattern length exceeds max of ${t}.`,zLe=t=>`Missing ${t} property in key`,VLe=t=>`Property 'weight' in key '${t}' must be a positive integer`,TD=Object.prototype.hasOwnProperty;class qLe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let s=PJ(n);r+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,r+=s.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function PJ(t){let e=null,r=null,n=null,s=1,i=null;if(bo(t)||Ca(t))n=t,e=RD(t),r=Dk(t);else{if(!TD.call(t,"name"))throw new Error(zLe("name"));const o=t.name;if(n=o,TD.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(VLe(o));e=RD(o),r=Dk(o),i=t.getFn}return{path:e,id:r,weight:s,src:n,getFn:i}}function RD(t){return Ca(t)?t:t.split(".")}function Dk(t){return Ca(t)?t.join("."):t}function WLe(t,e){let r=[],n=!1;const s=(i,o,a)=>{if(xs(i))if(!o[a])r.push(i);else{let l=o[a];const c=i[l];if(!xs(c))return;if(a===o.length-1&&(bo(c)||$J(c)||LLe(c)))r.push(NLe(c));else if(Ca(c)){n=!0;for(let f=0,u=c.length;ft.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,bo(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();bo(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(xs(o)){if(Ca(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:f}=l.pop();if(xs(f))if(bo(f)&&!A5(f)){let u={v:f,i:c,n:this.norm.get(f)};a.push(u)}else Ca(f)&&f.forEach((u,d)=>{l.push({nestedArrIndex:d,value:u})})}n.$[i]=a}else if(bo(o)&&!A5(o)){let a={v:o,n:this.norm.get(o)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function TJ(t,e,{getFn:r=_e.getFn,fieldNormWeight:n=_e.fieldNormWeight}={}){const s=new B_({getFn:r,fieldNormWeight:n});return s.setKeys(t.map(PJ)),s.setSources(e),s.create(),s}function XLe(t,{getFn:e=_e.getFn,fieldNormWeight:r=_e.fieldNormWeight}={}){const{keys:n,records:s}=t,i=new B_({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i}function tp(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:s=_e.distance,ignoreLocation:i=_e.ignoreLocation}={}){const o=e/t.length;if(i)return o;const a=Math.abs(n-r);return s?o+a/s:a?1:o}function ZLe(t=[],e=_e.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let o=t.length;i=e&&r.push([n,s]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}const Wc=32;function eje(t,e,r,{location:n=_e.location,distance:s=_e.distance,threshold:i=_e.threshold,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,includeMatches:l=_e.includeMatches,ignoreLocation:c=_e.ignoreLocation}={}){if(e.length>Wc)throw new Error(ULe(Wc));const f=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let h=i,v=d;const y=a>1||l,g=y?Array(u):[];let b;for(;(b=t.indexOf(e,v))>-1;){let x=tp(e,{currentLocation:b,expectedLocation:d,distance:s,ignoreLocation:c});if(h=Math.min(x,h),v=b+f,y){let T=0;for(;T=L;C-=1){let S=C-1,R=r[t.charAt(S)];if(y&&(g[S]=+!!R),V[C]=(V[C+1]<<1|1)&R,x&&(V[C]|=(p[C+1]|p[C])<<1|1|p[C+1]),V[C]&k&&(w=tp(e,{errors:x,currentLocation:S,expectedLocation:d,distance:s,ignoreLocation:c}),w<=h)){if(h=w,v=S,v<=d)break;L=Math.max(1,2*d-v)}}if(tp(e,{errors:x+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:c})>h)break;p=V}const $={isMatch:v>=0,score:Math.max(.001,w)};if(y){const x=ZLe(g,a);x.length?l&&($.indices=x):$.isMatch=!1}return $}function tje(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:tje(d),startIndex:h})},u=this.pattern.length;if(u>Wc){let d=0;const h=u%Wc,v=u-h;for(;d{const{isMatch:b,score:p,indices:w}=eje(e,v,y,{location:s+g,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});b&&(d=!0),u+=p,b&&w&&(f=[...f,...w])});let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=f),h}}class vc{constructor(e){this.pattern=e}static isMultiMatch(e){return ID(e,this.multiRegex)}static isSingleMatch(e){return ID(e,this.singleRegex)}search(){}}function ID(t,e){const r=t.match(e);return r?r[1]:null}class rje extends vc{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class nje extends vc{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class sje extends vc{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class ije extends vc{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class oje extends vc{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class aje extends vc{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class IJ extends vc{constructor(e,{location:r=_e.location,threshold:n=_e.threshold,distance:s=_e.distance,includeMatches:i=_e.includeMatches,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,isCaseSensitive:l=_e.isCaseSensitive,ignoreLocation:c=_e.ignoreLocation}={}){super(e),this._bitapSearch=new RJ(e,{location:r,threshold:n,distance:s,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class OJ extends vc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const s=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+i,s.push([n,r-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const Nk=[rje,OJ,sje,ije,aje,oje,nje,IJ],OD=Nk.length,lje=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,cje="|";function fje(t,e={}){return t.split(cje).map(r=>{let n=r.trim().split(lje).filter(i=>i&&!!i.trim()),s=[];for(let i=0,o=n.length;i!!(t[u2.AND]||t[u2.OR]),vje=t=>!!t[Fk.PATH],yje=t=>!Ca(t)&&AJ(t)&&!Bk(t),MD=t=>({[u2.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function MJ(t,e,{auto:r=!0}={}){const n=s=>{let i=Object.keys(s);const o=vje(s);if(!o&&i.length>1&&!Bk(s))return n(MD(s));if(yje(s)){const l=o?s[Fk.PATH]:i[0],c=o?s[Fk.PATTERN]:s[l];if(!bo(c))throw new Error(BLe(l));const f={keyId:Dk(l),pattern:c};return r&&(f.searcher=jk(c,e)),f}let a={children:[],operator:i[0]};return i.forEach(l=>{const c=s[l];Ca(c)&&c.forEach(f=>{a.children.push(n(f))})}),a};return Bk(t)||(t=MD(t)),n(t)}function mje(t,{ignoreFieldNorm:e=_e.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:s,norm:i,score:o})=>{const a=s?s.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:i))}),r.score=n})}function pje(t,e){const r=t.matches;e.matches=[],xs(r)&&r.forEach(n=>{if(!xs(n.indices)||!n.indices.length)return;const{indices:s,value:i}=n;let o={indices:s,value:i};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function gje(t,e){e.score=t.score}function bje(t,e,{includeMatches:r=_e.includeMatches,includeScore:n=_e.includeScore}={}){const s=[];return r&&s.push(pje),n&&s.push(gje),t.map(i=>{const{idx:o}=i,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(i,a)}),a})}class Ea{constructor(e,r={},n){this.options={..._e,...r},this.options.useExtendedSearch,this._keyStore=new qLe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof B_))throw new Error(FLe);this._myIndex=r||TJ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){xs(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,s=this._docs.length;n-1&&(l=l.slice(0,r)),bje(l,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const r=jk(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=r.searchIn(i);l&&s.push({item:i,idx:o,matches:[{score:c,value:i,norm:a,indices:f}]})}),s}_searchLogical(e){const r=MJ(e,this.options),n=(a,l,c)=>{if(!a.children){const{keyId:u,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:d});return h&&h.length?[{idx:c,item:l,matches:h}]:[]}const f=[];for(let u=0,d=a.children.length;u{if(xs(a)){let c=n(r,a,l);c.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},o.push(i[l])),c.forEach(({matches:f})=>{i[l].matches.push(...f)}))}}),o}_searchObjectList(e){const r=jk(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:o,i:a})=>{if(!xs(o))return;let l=[];n.forEach((c,f)=>{l.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),l.length&&i.push({idx:a,item:o,matches:l})}),i}_findMatches({key:e,value:r,searcher:n}){if(!xs(r))return[];let s=[];if(Ca(r))r.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=n.searchIn(i);l&&s.push({score:c,key:e,value:i,idx:o,norm:a,indices:f})});else{const{v:i,n:o}=r,{isMatch:a,score:l,indices:c}=n.searchIn(i);a&&s.push({score:l,key:e,value:i,norm:o,indices:c})}return s}}Ea.version="6.6.2";Ea.createIndex=TJ;Ea.parseIndex=XLe;Ea.config=_e;Ea.parseQuery=MJ;hje(dje);function DJ(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;et.forEach(r=>xje(r,e))}function ru(...t){return m.useCallback(NJ(...t),t)}function LJ(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,Cje(s,...e)]}function Cje(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const U_=m.forwardRef((t,e)=>{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(Sje);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(Uk,tn({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(Uk,tn({},n,{ref:e}),r)});U_.displayName="Slot";const Uk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...kje(n,r.props),ref:e?NJ(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});Uk.displayName="SlotClone";const Eje=({children:t})=>m.createElement(m.Fragment,null,t);function Sje(t){return m.isValidElement(t)&&t.type===Eje}function kje(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const $je=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Qh=$je.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?U_:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,tn({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Aje(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}function Xl(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function _je(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const zk="dismissableLayer.update",Pje="dismissableLayer.pointerDownOutside",Tje="dismissableLayer.focusOutside";let DD;const Rje=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ije=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(Rje),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=ru(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=Oje(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=Mje(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return _je(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(DD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ND(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=DD)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ND())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(zk,T),()=>document.removeEventListener(zk,T)},[]),m.createElement(Qh.div,tn({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:df(t.onFocusCapture,x.onFocusCapture),onBlurCapture:df(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:df(t.onPointerDownCapture,$.onPointerDownCapture)}))});function Oje(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){jJ(Pje,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Mje(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&jJ(Tje,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ND(){const t=new CustomEvent(zk);document.dispatchEvent(t)}function jJ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Aje(s,i):s.dispatchEvent(i)}let _5=0;function Dje(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:LD()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:LD()),_5++,()=>{_5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_5--}},[])}function LD(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const P5="focusScope.autoFocusOnMount",T5="focusScope.autoFocusOnUnmount",jD={bubbles:!1,cancelable:!0},Nje=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=Xl(s),f=Xl(i),u=m.useRef(null),d=ru(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ja(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ja(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ja(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){BD.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(P5,jD);a.addEventListener(P5,c),a.dispatchEvent(b),b.defaultPrevented||(Lje(zje(FJ(a)),{select:!0}),document.activeElement===y&&Ja(a))}return()=>{a.removeEventListener(P5,c),setTimeout(()=>{const b=new CustomEvent(T5,jD);a.addEventListener(T5,f),a.dispatchEvent(b),b.defaultPrevented||Ja(y??document.body,{select:!0}),a.removeEventListener(T5,f),BD.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=jje(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ja(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ja(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(Qh.div,tn({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function Lje(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ja(n,{select:e}),document.activeElement!==r)return}function jje(t){const e=FJ(t),r=FD(e,t),n=FD(e.reverse(),t);return[r,n]}function FJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function FD(t,e){for(const r of t)if(!Fje(r,{upTo:e}))return r}function Fje(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Bje(t){return t instanceof HTMLInputElement&&"select"in t}function Ja(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Bje(t)&&e&&t.select()}}const BD=Uje();function Uje(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=UD(t,e),t.unshift(e)},remove(e){var r;t=UD(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function UD(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function zje(t){return t.filter(e=>e.tagName!=="A")}const ch=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{},Vje=t8["useId".toString()]||(()=>{});let qje=0;function Wje(t){const[e,r]=m.useState(Vje());return ch(()=>{t||r(n=>n??String(qje++))},[t]),t||(e?`radix-${e}`:"")}const Hje=["top","right","bottom","left"],Zl=Math.min,Cs=Math.max,d2=Math.round,rp=Math.floor,ec=t=>({x:t,y:t}),Gje={left:"right",right:"left",bottom:"top",top:"bottom"},Kje={start:"end",end:"start"};function Vk(t,e,r){return Cs(t,Zl(e,r))}function Sa(t,e){return typeof t=="function"?t(e):t}function ka(t){return t.split("-")[0]}function Yh(t){return t.split("-")[1]}function z_(t){return t==="x"?"y":"x"}function V_(t){return t==="y"?"height":"width"}function Jh(t){return["top","bottom"].includes(ka(t))?"y":"x"}function q_(t){return z_(Jh(t))}function Qje(t,e,r){r===void 0&&(r=!1);const n=Yh(t),s=q_(t),i=V_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=h2(o)),[o,h2(o)]}function Yje(t){const e=h2(t);return[qk(t),e,qk(e)]}function qk(t){return t.replace(/start|end/g,e=>Kje[e])}function Jje(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function Xje(t,e,r,n){const s=Yh(t);let i=Jje(ka(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(qk)))),i}function h2(t){return t.replace(/left|right|bottom|top/g,e=>Gje[e])}function Zje(t){return{top:0,right:0,bottom:0,left:0,...t}}function BJ(t){return typeof t!="number"?Zje(t):{top:t,right:t,bottom:t,left:t}}function v2(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function zD(t,e,r){let{reference:n,floating:s}=t;const i=Jh(e),o=q_(e),a=V_(o),l=ka(e),c=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Yh(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const eFe=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=zD(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Sa(t,e)||{};if(c==null)return{};const u=BJ(f),d={x:r,y:n},h=q_(s),v=V_(h),y=await o.getDimensions(c),g=h==="y",b=g?"top":"left",p=g?"bottom":"right",w=g?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[h]-d[h]-i.floating[v],k=d[h]-i.reference[h],$=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let x=$?$[w]:0;(!x||!await(o.isElement==null?void 0:o.isElement($)))&&(x=a.floating[w]||i.floating[v]);const T=E/2-k/2,B=x/2-y[v]/2-1,L=Zl(u[b],B),U=Zl(u[p],B),V=L,N=x-y[v]-U,C=x/2-y[v]/2+T,S=Vk(V,C,N),R=!l.arrow&&Yh(s)!=null&&C!=S&&i.reference[v]/2-(CV<=0)){var B,L;const V=(((B=i.flip)==null?void 0:B.index)||0)+1,N=k[V];if(N)return{data:{index:V,overflows:T},reset:{placement:N}};let C=(L=T.filter(S=>S.overflows[0]<=0).sort((S,R)=>S.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!C)switch(h){case"bestFit":{var U;const S=(U=T.map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,_)=>M+_,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:U[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function qD(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function WD(t){return Hje.some(e=>t[e]>=0)}const rFe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Sa(t,e);switch(n){case"referenceHidden":{const i=await Yy(e,{...s,elementContext:"reference"}),o=qD(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:WD(o)}}}case"escaped":{const i=await Yy(e,{...s,altBoundary:!0}),o=qD(i,r.floating);return{data:{escapedOffsets:o,escaped:WD(o)}}}default:return{}}}}};async function nFe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=ka(r),a=Yh(r),l=Jh(r)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,u=Sa(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const sFe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await nFe(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},iFe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=Sa(t,e),c={x:r,y:n},f=await Yy(e,l),u=Jh(ka(s)),d=z_(u);let h=c[d],v=c[u];if(i){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",p=h+f[g],w=h-f[b];h=Vk(p,h,w)}if(o){const g=u==="y"?"top":"left",b=u==="y"?"bottom":"right",p=v+f[g],w=v-f[b];v=Vk(p,v,w)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},oFe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Sa(t,e),f={x:r,y:n},u=Jh(s),d=z_(u);let h=f[d],v=f[u];const y=Sa(a,e),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",E=i.reference[d]-i.floating[w]+g.mainAxis,k=i.reference[d]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=d==="y"?"width":"height",E=["top","left"].includes(ka(s)),k=i.reference[u]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[u])||0)+(E?0:g.crossAxis),$=i.reference[u]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[u])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[d]:h,[u]:v}}}},aFe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Sa(t,e),l=await Yy(e,a),c=ka(r),f=Yh(r),u=Jh(r)==="y",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?Zl(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?Zl(g,$):$}if(p&&!f){const $=Cs(l.left,0),x=Cs(l.right,0),T=Cs(l.top,0),B=Cs(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Cs(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Cs(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function tc(t){return UJ(t)?(t.nodeName||"").toLowerCase():"#document"}function Ps(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function La(t){var e;return(e=(UJ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function UJ(t){return t instanceof Node||t instanceof Ps(t).Node}function $a(t){return t instanceof Element||t instanceof Ps(t).Element}function No(t){return t instanceof HTMLElement||t instanceof Ps(t).HTMLElement}function HD(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ps(t).ShadowRoot}function z0(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=li(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function lFe(t){return["table","td","th"].includes(tc(t))}function W_(t){const e=H_(),r=li(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function cFe(t){let e=fh(t);for(;No(e)&&!zx(e);){if(W_(e))return e;e=fh(e)}return null}function H_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zx(t){return["html","body","#document"].includes(tc(t))}function li(t){return Ps(t).getComputedStyle(t)}function Vx(t){return $a(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fh(t){if(tc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||HD(t)&&t.host||La(t);return HD(e)?e.host:e}function zJ(t){const e=fh(t);return zx(e)?t.ownerDocument?t.ownerDocument.body:t.body:No(e)&&z0(e)?e:zJ(e)}function Jy(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=zJ(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Ps(s);return i?e.concat(o,o.visualViewport||[],z0(s)?s:[],o.frameElement&&r?Jy(o.frameElement):[]):e.concat(s,Jy(s,[],r))}function VJ(t){const e=li(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=No(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=d2(r)!==i||d2(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function G_(t){return $a(t)?t:t.contextElement}function Ed(t){const e=G_(t);if(!No(e))return ec(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=VJ(e);let o=(i?d2(r.width):r.width)/n,a=(i?d2(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const fFe=ec(0);function qJ(t){const e=Ps(t);return!H_()||!e.visualViewport?fFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function uFe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ps(t)?!1:e}function Of(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=G_(t);let o=ec(1);e&&(n?$a(n)&&(o=Ed(n)):o=Ed(t));const a=uFe(i,r,n)?qJ(i):ec(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Ps(i),h=n&&$a(n)?Ps(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Ed(v),g=v.getBoundingClientRect(),b=li(v),p=g.left+(v.clientLeft+parseFloat(b.paddingLeft))*y.x,w=g.top+(v.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=p,c+=w,v=Ps(v).frameElement}}return v2({width:f,height:u,x:l,y:c})}function dFe(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=No(r),i=La(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=ec(1);const l=ec(0);if((s||!s&&n!=="fixed")&&((tc(r)!=="body"||z0(i))&&(o=Vx(r)),No(r))){const c=Of(r);a=Ed(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function hFe(t){return Array.from(t.getClientRects())}function WJ(t){return Of(La(t)).left+Vx(t).scrollLeft}function vFe(t){const e=La(t),r=Vx(t),n=t.ownerDocument.body,s=Cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+WJ(t);const a=-r.scrollTop;return li(n).direction==="rtl"&&(o+=Cs(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function yFe(t,e){const r=Ps(t),n=La(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=H_();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function mFe(t,e){const r=Of(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=No(t)?Ed(t):ec(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function GD(t,e,r){let n;if(e==="viewport")n=yFe(t,r);else if(e==="document")n=vFe(La(t));else if($a(e))n=mFe(e,r);else{const s=qJ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return v2(n)}function HJ(t,e){const r=fh(t);return r===e||!$a(r)||zx(r)?!1:li(r).position==="fixed"||HJ(r,e)}function pFe(t,e){const r=e.get(t);if(r)return r;let n=Jy(t,[],!1).filter(a=>$a(a)&&tc(a)!=="body"),s=null;const i=li(t).position==="fixed";let o=i?fh(t):t;for(;$a(o)&&!zx(o);){const a=li(o),l=W_(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||z0(o)&&!l&&HJ(t,o))?n=n.filter(f=>f!==o):s=a,o=fh(o)}return e.set(t,n),n}function gFe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?pFe(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=GD(e,f,s);return c.top=Cs(u.top,c.top),c.right=Zl(u.right,c.right),c.bottom=Zl(u.bottom,c.bottom),c.left=Cs(u.left,c.left),c},GD(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bFe(t){return VJ(t)}function wFe(t,e,r){const n=No(e),s=La(e),i=r==="fixed",o=Of(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ec(0);if(n||!n&&!i)if((tc(e)!=="body"||z0(s))&&(a=Vx(e)),n){const c=Of(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=WJ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function KD(t,e){return!No(t)||li(t).position==="fixed"?null:e?e(t):t.offsetParent}function GJ(t,e){const r=Ps(t);if(!No(t))return r;let n=KD(t,e);for(;n&&lFe(n)&&li(n).position==="static";)n=KD(n,e);return n&&(tc(n)==="html"||tc(n)==="body"&&li(n).position==="static"&&!W_(n))?r:n||cFe(t)||r}const xFe=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||GJ,i=this.getDimensions;return{reference:wFe(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function CFe(t){return li(t).direction==="rtl"}const EFe={convertOffsetParentRelativeRectToViewportRelativeRect:dFe,getDocumentElement:La,getClippingRect:gFe,getOffsetParent:GJ,getElementRects:xFe,getClientRects:hFe,getDimensions:bFe,getScale:Ed,isElement:$a,isRTL:CFe};function SFe(t,e){let r=null,n;const s=La(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=rp(f),v=rp(s.clientWidth-(c+u)),y=rp(s.clientHeight-(f+d)),g=rp(c),p={rootMargin:-h+"px "+-v+"px "+-y+"px "+-g+"px",threshold:Cs(0,Zl(1,l))||1};let w=!0;function E(k){const $=k[0].intersectionRatio;if($!==l){if(!w)return o();$?o(!1,$):n=setTimeout(()=>{o(!1,1e-7)},100)}w=!1}try{r=new IntersectionObserver(E,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,p)}r.observe(t)}return o(!0),i}function kFe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=G_(t),f=s||i?[...c?Jy(c):[],...Jy(e)]:[];f.forEach(b=>{s&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const u=c&&a?SFe(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[p]=b;p&&p.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let v,y=l?Of(t):null;l&&g();function g(){const b=Of(t);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,v=requestAnimationFrame(g)}return r(),()=>{f.forEach(b=>{s&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const $Fe=(t,e,r)=>{const n=new Map,s={platform:EFe,...r},i={...s.platform,_c:n};return eFe(t,e,{...s,platform:i})},AFe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?VD({element:n.current,padding:s}).fn(r):{}:n?VD({element:n,padding:s}).fn(r):{}}}};var eg=typeof document<"u"?m.useLayoutEffect:m.useEffect;function y2(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!y2(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!y2(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function KJ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function QD(t,e){const r=KJ(t);return Math.round(e*r)/r}function YD(t){const e=m.useRef(t);return eg(()=>{e.current=t}),e}function _Fe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);y2(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=YD(l),L=YD(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),$Fe($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!y2(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);eg(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);eg(()=>(V.current=!0,()=>{V.current=!1}),[]),eg(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=QD(C.floating,f.x),_=QD(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...KJ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}function PFe(t){const[e,r]=m.useState(void 0);return ch(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}const QJ="Popper",[YJ,JJ]=LJ(QJ),[TFe,XJ]=YJ(QJ),RFe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(TFe,{scope:e,anchor:n,onAnchorChange:s},r)},IFe="PopperAnchor",OFe=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=XJ(IFe,r),o=m.useRef(null),a=ru(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(Qh.div,tn({},s,{ref:a}))}),ZJ="PopperContent",[MFe,PHe]=YJ(ZJ),DFe=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=XJ(ZJ,f),[T,B]=m.useState(null),L=ru(e,ie=>B(ie)),[U,V]=m.useState(null),N=PFe(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(NFe),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=_Fe({strategy:"fixed",placement:R,whileElementsMounted:kFe,elements:{reference:x.anchor},middleware:[sFe({mainAxis:d+S,alignmentAxis:v}),E&&iFe({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?oFe():void 0,...F}),E&&tFe({...F}),aFe({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&AFe({element:U,padding:y}),LFe({arrowWidth:C,arrowHeight:S}),w&&rFe({strategy:"referenceHidden"})]}),[q,z]=eX(j),H=Xl(k);ch(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ch(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(MFe,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(Qh.div,tn({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function NFe(t){return t!==null}const LFe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=eX(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function eX(t){const[e,r="center"]=t.split("-");return[e,r]}const jFe=RFe,tX=OFe,FFe=DFe,BFe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(Qh.div,tn({},s,{ref:e})),n):null});function UFe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const K_=t=>{const{present:e,children:r}=t,n=zFe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=ru(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};K_.displayName="Presence";function zFe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=UFe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=np(n.current);i.current=a==="mounted"?c:"none"},[a]),ch(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=np(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ch(()=>{if(e){const c=u=>{const h=np(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=np(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function np(t){return(t==null?void 0:t.animationName)||"none"}function VFe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=qFe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Xl(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function qFe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=Xl(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var WFe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},bu=new WeakMap,sp=new WeakMap,ip={},R5=0,rX=function(t){return t&&(t.host||rX(t.parentNode))},HFe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=rX(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},GFe=function(t,e,r,n){var s=HFe(e,Array.isArray(t)?t:[t]);ip[r]||(ip[r]=new WeakMap);var i=ip[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(bu.get(d)||0)+1,g=(i.get(d)||0)+1;bu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&sp.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),R5++,function(){o.forEach(function(u){var d=bu.get(u)-1,h=i.get(u)-1;bu.set(u,d),i.set(u,h),d||(sp.has(u)||u.removeAttribute(n),sp.delete(u)),h||u.removeAttribute(r)}),R5--,R5||(bu=new WeakMap,bu=new WeakMap,sp=new WeakMap,ip={})}},KFe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||WFe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),GFe(n,s,r,"aria-hidden")):function(){return null}},tg="right-scroll-bar-position",rg="width-before-scroll-bar",QFe="with-scroll-bars-hidden",YFe="--removed-body-scroll-bar-size";function JFe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function XFe(t,e){var r=m.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}function ZFe(t,e){return XFe(e||null,function(r){return t.forEach(function(n){return JFe(n,r)})})}function eBe(t){return t}function tBe(t,e){e===void 0&&(e=eBe);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var f=o;o=[],f.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){o.push(f),c()},filter:function(f){return o=o.filter(f),r}}}};return s}function rBe(t){t===void 0&&(t={});var e=tBe(null);return e.options=ho({async:!0,ssr:!1},t),e}var nX=function(t){var e=t.sideCar,r=QF(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return m.createElement(n,ho({},r))};nX.isSideCarExport=!0;function nBe(t,e){return t.useMedium(e),nX}var sX=rBe(),I5=function(){},qx=m.forwardRef(function(t,e){var r=m.useRef(null),n=m.useState({onScrollCapture:I5,onWheelCapture:I5,onTouchMoveCapture:I5}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,f=t.enabled,u=t.shards,d=t.sideCar,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,g=t.as,b=g===void 0?"div":g,p=QF(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,E=ZFe([r,e]),k=ho(ho({},p),s);return m.createElement(m.Fragment,null,f&&m.createElement(w,{sideCar:sX,removeScrollBar:c,shards:u,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),o?m.cloneElement(m.Children.only(a),ho(ho({},k),{ref:E})):m.createElement(b,ho({},k,{className:l,ref:E}),a))});qx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qx.classNames={fullWidth:rg,zeroRight:tg};var JD,sBe=function(){if(JD)return JD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iBe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=sBe();return e&&t.setAttribute("nonce",e),t}function oBe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function aBe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var lBe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=iBe())&&(oBe(e,r),aBe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},cBe=function(){var t=lBe();return function(e,r){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},iX=function(){var t=cBe(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},fBe={left:0,top:0,right:0,gap:0},O5=function(t){return parseInt(t||"",10)||0},uBe=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[O5(r),O5(n),O5(s)]},dBe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return fBe;var e=uBe(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},hBe=iX(),vBe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(QFe,` { + */var mJ={L:Zu.QrCode.Ecc.LOW,M:Zu.QrCode.Ecc.MEDIUM,Q:Zu.QrCode.Ecc.QUARTILE,H:Zu.QrCode.Ecc.HIGH},pJ=128,gJ="L",bJ="#FFFFFF",wJ="#000000",xJ=!1,F_=4,$Le=.1;function CJ(t,e=0){const r=[];return t.forEach(function(n,s){let i=null;n.forEach(function(o,a){if(!o&&i!==null){r.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===n.length-1){if(!o)return;i===null?r.push(`M${a+e},${s+e} h1v1H${a+e}z`):r.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),r.join("")}function EJ(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((s,i)=>i=e.x+e.w?s:!1))}function SJ(t,e,r,n){if(n==null)return null;const s=r?F_:0,i=t.length+s*2,o=Math.floor(e*$Le),a=i/e,l=(n.width||o)*a,c=(n.height||o)*a,f=n.x==null?t.length/2-l/2:n.x*a,u=n.y==null?t.length/2-c/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(f),v=Math.floor(u),y=Math.ceil(l+f-h),g=Math.ceil(c+u-v);d={x:h,y:v,w:y,h:g}}return{x:f,y:u,h:c,w:l,excavation:d}}var ALe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function _Le(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,style:l,imageSettings:c}=e,f=j_(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),u=c==null?void 0:c.src,d=m.useRef(null),h=m.useRef(null),[v,y]=m.useState(!1);m.useEffect(()=>{if(d.current!=null){const p=d.current,w=p.getContext("2d");if(!w)return;let E=Zu.QrCode.encodeText(r,mJ[s]).getModules();const k=a?F_:0,A=E.length+k*2,x=SJ(E,n,a,c),T=h.current,B=x!=null&&T!==null&&T.complete&&T.naturalHeight!==0&&T.naturalWidth!==0;B&&x.excavation!=null&&(E=EJ(E,x.excavation));const L=window.devicePixelRatio||1;p.height=p.width=n*L;const U=n/A*L;w.scale(U,U),w.fillStyle=i,w.fillRect(0,0,A,A),w.fillStyle=o,ALe?w.fill(new Path2D(CJ(E,k))):E.forEach(function(V,N){V.forEach(function(C,S){C&&w.fillRect(S+k,N+k,1,1)})}),B&&w.drawImage(T,x.x+k,x.y+k,x.w,x.h)}}),m.useEffect(()=>{y(!1)},[u]);const g=Qy({height:n,width:n},l);let b=null;return u!=null&&(b=P.createElement("img",{src:u,key:u,style:{display:"none"},onLoad:()=>{y(!0)},ref:h})),P.createElement(P.Fragment,null,P.createElement("canvas",Qy({style:g,height:n,width:n,ref:d},f)),b)}function PLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,imageSettings:l}=e,c=j_(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Zu.QrCode.encodeText(r,mJ[s]).getModules();const u=a?F_:0,d=f.length+u*2,h=SJ(f,n,a,l);let v=null;l!=null&&h!=null&&(h.excavation!=null&&(f=EJ(f,h.excavation)),v=P.createElement("image",{xlinkHref:l.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"}));const y=CJ(f,u);return P.createElement("svg",Qy({height:n,width:n,viewBox:`0 0 ${d} ${d}`},c),P.createElement("path",{fill:i,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),P.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),v)}var TLe=t=>{const e=t,{renderAs:r}=e,n=j_(e,["renderAs"]);return r==="svg"?P.createElement(PLe,Qy({},n)):P.createElement(_Le,Qy({},n))},Mk={},RLe={get exports(){return Mk},set exports(t){Mk=t}};(function(t,e){(function(r,n){t.exports=n()})(Wr,function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",f="week",u="month",d="quarter",h="year",v="date",y="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var C=["th","st","nd","rd"],S=N%100;return"["+N+(C[(S-20)%10]||C[S]||C[0])+"]"}},w=function(N,C,S){var R=String(N);return!R||R.length>=C?N:""+Array(C+1-R.length).join(S)+N},E={s:w,z:function(N){var C=-N.utcOffset(),S=Math.abs(C),R=Math.floor(S/60),M=S%60;return(C<=0?"+":"-")+w(R,2,"0")+":"+w(M,2,"0")},m:function N(C,S){if(C.date()1)return N(I[0])}else{var F=C.name;A[F]=C,M=F}return!R&&M&&(k=M),M||!R&&k},B=function(N,C){if(x(N))return N.clone();var S=typeof C=="object"?C:{};return S.date=N,S.args=arguments,new U(S)},L=E;L.l=T,L.i=x,L.w=function(N,C){return B(N,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var U=function(){function N(S){this.$L=T(S.locale,null,!0),this.parse(S)}var C=N.prototype;return C.parse=function(S){this.$d=function(R){var M=R.date,_=R.utc;if(M===null)return new Date(NaN);if(L.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var I=M.match(g);if(I){var F=I[2]-1||0,D=(I[7]||"0").substring(0,3);return _?new Date(Date.UTC(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)):new Date(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)}}return new Date(M)}(S),this.$x=S.x||{},this.init()},C.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},C.$utils=function(){return L},C.isValid=function(){return this.$d.toString()!==y},C.isSame=function(S,R){var M=B(S);return this.startOf(R)<=M&&M<=this.endOf(R)},C.isAfter=function(S,R){return B(S)`Invalid value for key ${t}`,FLe=t=>`Pattern length exceeds max of ${t}.`,BLe=t=>`Missing ${t} property in key`,ULe=t=>`Property 'weight' in key '${t}' must be a positive integer`,TD=Object.prototype.hasOwnProperty;class zLe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let s=PJ(n);r+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,r+=s.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function PJ(t){let e=null,r=null,n=null,s=1,i=null;if(go(t)||Ca(t))n=t,e=RD(t),r=Dk(t);else{if(!TD.call(t,"name"))throw new Error(BLe("name"));const o=t.name;if(n=o,TD.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(ULe(o));e=RD(o),r=Dk(o),i=t.getFn}return{path:e,id:r,weight:s,src:n,getFn:i}}function RD(t){return Ca(t)?t:t.split(".")}function Dk(t){return Ca(t)?t.join("."):t}function VLe(t,e){let r=[],n=!1;const s=(i,o,a)=>{if(xs(i))if(!o[a])r.push(i);else{let l=o[a];const c=i[l];if(!xs(c))return;if(a===o.length-1&&(go(c)||$J(c)||DLe(c)))r.push(MLe(c));else if(Ca(c)){n=!0;for(let f=0,u=c.length;ft.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,go(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();go(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(xs(o)){if(Ca(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:f}=l.pop();if(xs(f))if(go(f)&&!A5(f)){let u={v:f,i:c,n:this.norm.get(f)};a.push(u)}else Ca(f)&&f.forEach((u,d)=>{l.push({nestedArrIndex:d,value:u})})}n.$[i]=a}else if(go(o)&&!A5(o)){let a={v:o,n:this.norm.get(o)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function TJ(t,e,{getFn:r=_e.getFn,fieldNormWeight:n=_e.fieldNormWeight}={}){const s=new B_({getFn:r,fieldNormWeight:n});return s.setKeys(t.map(PJ)),s.setSources(e),s.create(),s}function YLe(t,{getFn:e=_e.getFn,fieldNormWeight:r=_e.fieldNormWeight}={}){const{keys:n,records:s}=t,i=new B_({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i}function tp(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:s=_e.distance,ignoreLocation:i=_e.ignoreLocation}={}){const o=e/t.length;if(i)return o;const a=Math.abs(n-r);return s?o+a/s:a?1:o}function JLe(t=[],e=_e.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let o=t.length;i=e&&r.push([n,s]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}const Wc=32;function XLe(t,e,r,{location:n=_e.location,distance:s=_e.distance,threshold:i=_e.threshold,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,includeMatches:l=_e.includeMatches,ignoreLocation:c=_e.ignoreLocation}={}){if(e.length>Wc)throw new Error(FLe(Wc));const f=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let h=i,v=d;const y=a>1||l,g=y?Array(u):[];let b;for(;(b=t.indexOf(e,v))>-1;){let x=tp(e,{currentLocation:b,expectedLocation:d,distance:s,ignoreLocation:c});if(h=Math.min(x,h),v=b+f,y){let T=0;for(;T=L;C-=1){let S=C-1,R=r[t.charAt(S)];if(y&&(g[S]=+!!R),V[C]=(V[C+1]<<1|1)&R,x&&(V[C]|=(p[C+1]|p[C])<<1|1|p[C+1]),V[C]&k&&(w=tp(e,{errors:x,currentLocation:S,expectedLocation:d,distance:s,ignoreLocation:c}),w<=h)){if(h=w,v=S,v<=d)break;L=Math.max(1,2*d-v)}}if(tp(e,{errors:x+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:c})>h)break;p=V}const A={isMatch:v>=0,score:Math.max(.001,w)};if(y){const x=JLe(g,a);x.length?l&&(A.indices=x):A.isMatch=!1}return A}function ZLe(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:ZLe(d),startIndex:h})},u=this.pattern.length;if(u>Wc){let d=0;const h=u%Wc,v=u-h;for(;d{const{isMatch:b,score:p,indices:w}=XLe(e,v,y,{location:s+g,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});b&&(d=!0),u+=p,b&&w&&(f=[...f,...w])});let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=f),h}}class vc{constructor(e){this.pattern=e}static isMultiMatch(e){return ID(e,this.multiRegex)}static isSingleMatch(e){return ID(e,this.singleRegex)}search(){}}function ID(t,e){const r=t.match(e);return r?r[1]:null}class eje extends vc{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class tje extends vc{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class rje extends vc{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class nje extends vc{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class sje extends vc{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ije extends vc{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class IJ extends vc{constructor(e,{location:r=_e.location,threshold:n=_e.threshold,distance:s=_e.distance,includeMatches:i=_e.includeMatches,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,isCaseSensitive:l=_e.isCaseSensitive,ignoreLocation:c=_e.ignoreLocation}={}){super(e),this._bitapSearch=new RJ(e,{location:r,threshold:n,distance:s,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class OJ extends vc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const s=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+i,s.push([n,r-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const Nk=[eje,OJ,rje,nje,ije,sje,tje,IJ],OD=Nk.length,oje=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,aje="|";function lje(t,e={}){return t.split(aje).map(r=>{let n=r.trim().split(oje).filter(i=>i&&!!i.trim()),s=[];for(let i=0,o=n.length;i!!(t[u2.AND]||t[u2.OR]),dje=t=>!!t[Fk.PATH],hje=t=>!Ca(t)&&AJ(t)&&!Bk(t),MD=t=>({[u2.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function MJ(t,e,{auto:r=!0}={}){const n=s=>{let i=Object.keys(s);const o=dje(s);if(!o&&i.length>1&&!Bk(s))return n(MD(s));if(hje(s)){const l=o?s[Fk.PATH]:i[0],c=o?s[Fk.PATTERN]:s[l];if(!go(c))throw new Error(jLe(l));const f={keyId:Dk(l),pattern:c};return r&&(f.searcher=jk(c,e)),f}let a={children:[],operator:i[0]};return i.forEach(l=>{const c=s[l];Ca(c)&&c.forEach(f=>{a.children.push(n(f))})}),a};return Bk(t)||(t=MD(t)),n(t)}function vje(t,{ignoreFieldNorm:e=_e.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:s,norm:i,score:o})=>{const a=s?s.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:i))}),r.score=n})}function yje(t,e){const r=t.matches;e.matches=[],xs(r)&&r.forEach(n=>{if(!xs(n.indices)||!n.indices.length)return;const{indices:s,value:i}=n;let o={indices:s,value:i};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function mje(t,e){e.score=t.score}function pje(t,e,{includeMatches:r=_e.includeMatches,includeScore:n=_e.includeScore}={}){const s=[];return r&&s.push(yje),n&&s.push(mje),t.map(i=>{const{idx:o}=i,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(i,a)}),a})}class Ea{constructor(e,r={},n){this.options={..._e,...r},this.options.useExtendedSearch,this._keyStore=new zLe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof B_))throw new Error(LLe);this._myIndex=r||TJ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){xs(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,s=this._docs.length;n-1&&(l=l.slice(0,r)),pje(l,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const r=jk(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=r.searchIn(i);l&&s.push({item:i,idx:o,matches:[{score:c,value:i,norm:a,indices:f}]})}),s}_searchLogical(e){const r=MJ(e,this.options),n=(a,l,c)=>{if(!a.children){const{keyId:u,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:d});return h&&h.length?[{idx:c,item:l,matches:h}]:[]}const f=[];for(let u=0,d=a.children.length;u{if(xs(a)){let c=n(r,a,l);c.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},o.push(i[l])),c.forEach(({matches:f})=>{i[l].matches.push(...f)}))}}),o}_searchObjectList(e){const r=jk(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:o,i:a})=>{if(!xs(o))return;let l=[];n.forEach((c,f)=>{l.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),l.length&&i.push({idx:a,item:o,matches:l})}),i}_findMatches({key:e,value:r,searcher:n}){if(!xs(r))return[];let s=[];if(Ca(r))r.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=n.searchIn(i);l&&s.push({score:c,key:e,value:i,idx:o,norm:a,indices:f})});else{const{v:i,n:o}=r,{isMatch:a,score:l,indices:c}=n.searchIn(i);a&&s.push({score:l,key:e,value:i,norm:o,indices:c})}return s}}Ea.version="6.6.2";Ea.createIndex=TJ;Ea.parseIndex=YLe;Ea.config=_e;Ea.parseQuery=MJ;uje(fje);function DJ(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;et.forEach(r=>bje(r,e))}function ru(...t){return m.useCallback(NJ(...t),t)}function LJ(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,wje(s,...e)]}function wje(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const U_=m.forwardRef((t,e)=>{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(Cje);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(Uk,tn({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(Uk,tn({},n,{ref:e}),r)});U_.displayName="Slot";const Uk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...Eje(n,r.props),ref:e?NJ(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});Uk.displayName="SlotClone";const xje=({children:t})=>m.createElement(m.Fragment,null,t);function Cje(t){return m.isValidElement(t)&&t.type===xje}function Eje(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const Sje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Qh=Sje.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?U_:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,tn({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function kje(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}function Xl(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function $je(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const zk="dismissableLayer.update",Aje="dismissableLayer.pointerDownOutside",_je="dismissableLayer.focusOutside";let DD;const Pje=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tje=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(Pje),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=ru(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,A=Rje(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=Ije(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return $je(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(DD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ND(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=DD)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ND())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(zk,T),()=>document.removeEventListener(zk,T)},[]),m.createElement(Qh.div,tn({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:df(t.onFocusCapture,x.onFocusCapture),onBlurCapture:df(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:df(t.onPointerDownCapture,A.onPointerDownCapture)}))});function Rje(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){jJ(Aje,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Ije(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&jJ(_je,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ND(){const t=new CustomEvent(zk);document.dispatchEvent(t)}function jJ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?kje(s,i):s.dispatchEvent(i)}let _5=0;function Oje(){m.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:LD()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:LD()),_5++,()=>{_5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_5--}},[])}function LD(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const P5="focusScope.autoFocusOnMount",T5="focusScope.autoFocusOnUnmount",jD={bubbles:!1,cancelable:!0},Mje=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=Xl(s),f=Xl(i),u=m.useRef(null),d=ru(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ja(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ja(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ja(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){BD.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(P5,jD);a.addEventListener(P5,c),a.dispatchEvent(b),b.defaultPrevented||(Dje(Bje(FJ(a)),{select:!0}),document.activeElement===y&&Ja(a))}return()=>{a.removeEventListener(P5,c),setTimeout(()=>{const b=new CustomEvent(T5,jD);a.addEventListener(T5,f),a.dispatchEvent(b),b.defaultPrevented||Ja(y??document.body,{select:!0}),a.removeEventListener(T5,f),BD.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=Nje(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ja(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ja(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(Qh.div,tn({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function Dje(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ja(n,{select:e}),document.activeElement!==r)return}function Nje(t){const e=FJ(t),r=FD(e,t),n=FD(e.reverse(),t);return[r,n]}function FJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function FD(t,e){for(const r of t)if(!Lje(r,{upTo:e}))return r}function Lje(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function jje(t){return t instanceof HTMLInputElement&&"select"in t}function Ja(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&jje(t)&&e&&t.select()}}const BD=Fje();function Fje(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=UD(t,e),t.unshift(e)},remove(e){var r;t=UD(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function UD(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Bje(t){return t.filter(e=>e.tagName!=="A")}const ch=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{},Uje=t8["useId".toString()]||(()=>{});let zje=0;function Vje(t){const[e,r]=m.useState(Uje());return ch(()=>{t||r(n=>n??String(zje++))},[t]),t||(e?`radix-${e}`:"")}const qje=["top","right","bottom","left"],Zl=Math.min,Cs=Math.max,d2=Math.round,rp=Math.floor,ec=t=>({x:t,y:t}),Wje={left:"right",right:"left",bottom:"top",top:"bottom"},Hje={start:"end",end:"start"};function Vk(t,e,r){return Cs(t,Zl(e,r))}function Sa(t,e){return typeof t=="function"?t(e):t}function ka(t){return t.split("-")[0]}function Yh(t){return t.split("-")[1]}function z_(t){return t==="x"?"y":"x"}function V_(t){return t==="y"?"height":"width"}function Jh(t){return["top","bottom"].includes(ka(t))?"y":"x"}function q_(t){return z_(Jh(t))}function Gje(t,e,r){r===void 0&&(r=!1);const n=Yh(t),s=q_(t),i=V_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=h2(o)),[o,h2(o)]}function Kje(t){const e=h2(t);return[qk(t),e,qk(e)]}function qk(t){return t.replace(/start|end/g,e=>Hje[e])}function Qje(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function Yje(t,e,r,n){const s=Yh(t);let i=Qje(ka(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(qk)))),i}function h2(t){return t.replace(/left|right|bottom|top/g,e=>Wje[e])}function Jje(t){return{top:0,right:0,bottom:0,left:0,...t}}function BJ(t){return typeof t!="number"?Jje(t):{top:t,right:t,bottom:t,left:t}}function v2(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function zD(t,e,r){let{reference:n,floating:s}=t;const i=Jh(e),o=q_(e),a=V_(o),l=ka(e),c=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Yh(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const Xje=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=zD(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Sa(t,e)||{};if(c==null)return{};const u=BJ(f),d={x:r,y:n},h=q_(s),v=V_(h),y=await o.getDimensions(c),g=h==="y",b=g?"top":"left",p=g?"bottom":"right",w=g?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[h]-d[h]-i.floating[v],k=d[h]-i.reference[h],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let x=A?A[w]:0;(!x||!await(o.isElement==null?void 0:o.isElement(A)))&&(x=a.floating[w]||i.floating[v]);const T=E/2-k/2,B=x/2-y[v]/2-1,L=Zl(u[b],B),U=Zl(u[p],B),V=L,N=x-y[v]-U,C=x/2-y[v]/2+T,S=Vk(V,C,N),R=!l.arrow&&Yh(s)!=null&&C!=S&&i.reference[v]/2-(CV<=0)){var B,L;const V=(((B=i.flip)==null?void 0:B.index)||0)+1,N=k[V];if(N)return{data:{index:V,overflows:T},reset:{placement:N}};let C=(L=T.filter(S=>S.overflows[0]<=0).sort((S,R)=>S.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!C)switch(h){case"bestFit":{var U;const S=(U=T.map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,_)=>M+_,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:U[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function qD(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function WD(t){return qje.some(e=>t[e]>=0)}const eFe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Sa(t,e);switch(n){case"referenceHidden":{const i=await Yy(e,{...s,elementContext:"reference"}),o=qD(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:WD(o)}}}case"escaped":{const i=await Yy(e,{...s,altBoundary:!0}),o=qD(i,r.floating);return{data:{escapedOffsets:o,escaped:WD(o)}}}default:return{}}}}};async function tFe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=ka(r),a=Yh(r),l=Jh(r)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,u=Sa(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const rFe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await tFe(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},nFe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=Sa(t,e),c={x:r,y:n},f=await Yy(e,l),u=Jh(ka(s)),d=z_(u);let h=c[d],v=c[u];if(i){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",p=h+f[g],w=h-f[b];h=Vk(p,h,w)}if(o){const g=u==="y"?"top":"left",b=u==="y"?"bottom":"right",p=v+f[g],w=v-f[b];v=Vk(p,v,w)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},sFe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Sa(t,e),f={x:r,y:n},u=Jh(s),d=z_(u);let h=f[d],v=f[u];const y=Sa(a,e),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",E=i.reference[d]-i.floating[w]+g.mainAxis,k=i.reference[d]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=d==="y"?"width":"height",E=["top","left"].includes(ka(s)),k=i.reference[u]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[u])||0)+(E?0:g.crossAxis),A=i.reference[u]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[u])||0)-(E?g.crossAxis:0);vA&&(v=A)}return{[d]:h,[u]:v}}}},iFe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Sa(t,e),l=await Yy(e,a),c=ka(r),f=Yh(r),u=Jh(r)==="y",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const A=d-l.left-l.right;E=f||p?Zl(b,A):A}else{const A=h-l.top-l.bottom;w=f||p?Zl(g,A):A}if(p&&!f){const A=Cs(l.left,0),x=Cs(l.right,0),T=Cs(l.top,0),B=Cs(l.bottom,0);u?E=d-2*(A!==0||x!==0?A+x:Cs(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Cs(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function tc(t){return UJ(t)?(t.nodeName||"").toLowerCase():"#document"}function Ps(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function La(t){var e;return(e=(UJ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function UJ(t){return t instanceof Node||t instanceof Ps(t).Node}function $a(t){return t instanceof Element||t instanceof Ps(t).Element}function No(t){return t instanceof HTMLElement||t instanceof Ps(t).HTMLElement}function HD(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ps(t).ShadowRoot}function z0(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=li(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function oFe(t){return["table","td","th"].includes(tc(t))}function W_(t){const e=H_(),r=li(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function aFe(t){let e=fh(t);for(;No(e)&&!zx(e);){if(W_(e))return e;e=fh(e)}return null}function H_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zx(t){return["html","body","#document"].includes(tc(t))}function li(t){return Ps(t).getComputedStyle(t)}function Vx(t){return $a(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fh(t){if(tc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||HD(t)&&t.host||La(t);return HD(e)?e.host:e}function zJ(t){const e=fh(t);return zx(e)?t.ownerDocument?t.ownerDocument.body:t.body:No(e)&&z0(e)?e:zJ(e)}function Jy(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=zJ(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Ps(s);return i?e.concat(o,o.visualViewport||[],z0(s)?s:[],o.frameElement&&r?Jy(o.frameElement):[]):e.concat(s,Jy(s,[],r))}function VJ(t){const e=li(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=No(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=d2(r)!==i||d2(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function G_(t){return $a(t)?t:t.contextElement}function Ed(t){const e=G_(t);if(!No(e))return ec(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=VJ(e);let o=(i?d2(r.width):r.width)/n,a=(i?d2(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const lFe=ec(0);function qJ(t){const e=Ps(t);return!H_()||!e.visualViewport?lFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function cFe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ps(t)?!1:e}function Of(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=G_(t);let o=ec(1);e&&(n?$a(n)&&(o=Ed(n)):o=Ed(t));const a=cFe(i,r,n)?qJ(i):ec(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Ps(i),h=n&&$a(n)?Ps(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Ed(v),g=v.getBoundingClientRect(),b=li(v),p=g.left+(v.clientLeft+parseFloat(b.paddingLeft))*y.x,w=g.top+(v.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=p,c+=w,v=Ps(v).frameElement}}return v2({width:f,height:u,x:l,y:c})}function fFe(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=No(r),i=La(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=ec(1);const l=ec(0);if((s||!s&&n!=="fixed")&&((tc(r)!=="body"||z0(i))&&(o=Vx(r)),No(r))){const c=Of(r);a=Ed(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function uFe(t){return Array.from(t.getClientRects())}function WJ(t){return Of(La(t)).left+Vx(t).scrollLeft}function dFe(t){const e=La(t),r=Vx(t),n=t.ownerDocument.body,s=Cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+WJ(t);const a=-r.scrollTop;return li(n).direction==="rtl"&&(o+=Cs(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function hFe(t,e){const r=Ps(t),n=La(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=H_();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function vFe(t,e){const r=Of(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=No(t)?Ed(t):ec(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function GD(t,e,r){let n;if(e==="viewport")n=hFe(t,r);else if(e==="document")n=dFe(La(t));else if($a(e))n=vFe(e,r);else{const s=qJ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return v2(n)}function HJ(t,e){const r=fh(t);return r===e||!$a(r)||zx(r)?!1:li(r).position==="fixed"||HJ(r,e)}function yFe(t,e){const r=e.get(t);if(r)return r;let n=Jy(t,[],!1).filter(a=>$a(a)&&tc(a)!=="body"),s=null;const i=li(t).position==="fixed";let o=i?fh(t):t;for(;$a(o)&&!zx(o);){const a=li(o),l=W_(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||z0(o)&&!l&&HJ(t,o))?n=n.filter(f=>f!==o):s=a,o=fh(o)}return e.set(t,n),n}function mFe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?yFe(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=GD(e,f,s);return c.top=Cs(u.top,c.top),c.right=Zl(u.right,c.right),c.bottom=Zl(u.bottom,c.bottom),c.left=Cs(u.left,c.left),c},GD(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pFe(t){return VJ(t)}function gFe(t,e,r){const n=No(e),s=La(e),i=r==="fixed",o=Of(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ec(0);if(n||!n&&!i)if((tc(e)!=="body"||z0(s))&&(a=Vx(e)),n){const c=Of(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=WJ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function KD(t,e){return!No(t)||li(t).position==="fixed"?null:e?e(t):t.offsetParent}function GJ(t,e){const r=Ps(t);if(!No(t))return r;let n=KD(t,e);for(;n&&oFe(n)&&li(n).position==="static";)n=KD(n,e);return n&&(tc(n)==="html"||tc(n)==="body"&&li(n).position==="static"&&!W_(n))?r:n||aFe(t)||r}const bFe=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||GJ,i=this.getDimensions;return{reference:gFe(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function wFe(t){return li(t).direction==="rtl"}const xFe={convertOffsetParentRelativeRectToViewportRelativeRect:fFe,getDocumentElement:La,getClippingRect:mFe,getOffsetParent:GJ,getElementRects:bFe,getClientRects:uFe,getDimensions:pFe,getScale:Ed,isElement:$a,isRTL:wFe};function CFe(t,e){let r=null,n;const s=La(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=rp(f),v=rp(s.clientWidth-(c+u)),y=rp(s.clientHeight-(f+d)),g=rp(c),p={rootMargin:-h+"px "+-v+"px "+-y+"px "+-g+"px",threshold:Cs(0,Zl(1,l))||1};let w=!0;function E(k){const A=k[0].intersectionRatio;if(A!==l){if(!w)return o();A?o(!1,A):n=setTimeout(()=>{o(!1,1e-7)},100)}w=!1}try{r=new IntersectionObserver(E,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,p)}r.observe(t)}return o(!0),i}function EFe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=G_(t),f=s||i?[...c?Jy(c):[],...Jy(e)]:[];f.forEach(b=>{s&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const u=c&&a?CFe(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[p]=b;p&&p.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let v,y=l?Of(t):null;l&&g();function g(){const b=Of(t);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,v=requestAnimationFrame(g)}return r(),()=>{f.forEach(b=>{s&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const SFe=(t,e,r)=>{const n=new Map,s={platform:xFe,...r},i={...s.platform,_c:n};return Xje(t,e,{...s,platform:i})},kFe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?VD({element:n.current,padding:s}).fn(r):{}:n?VD({element:n,padding:s}).fn(r):{}}}};var eg=typeof document<"u"?m.useLayoutEffect:m.useEffect;function y2(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!y2(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!y2(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function KJ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function QD(t,e){const r=KJ(t);return Math.round(e*r)/r}function YD(t){const e=m.useRef(t);return eg(()=>{e.current=t}),e}function $Fe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);y2(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=A.current&&(A.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,A=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=YD(l),L=YD(s),U=m.useCallback(()=>{if(!A.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),SFe(A.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!y2(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);eg(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);eg(()=>(V.current=!0,()=>{V.current=!1}),[]),eg(()=>{if(E&&(A.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:A,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=QD(C.floating,f.x),_=QD(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...KJ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}function AFe(t){const[e,r]=m.useState(void 0);return ch(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}const QJ="Popper",[YJ,JJ]=LJ(QJ),[_Fe,XJ]=YJ(QJ),PFe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(_Fe,{scope:e,anchor:n,onAnchorChange:s},r)},TFe="PopperAnchor",RFe=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=XJ(TFe,r),o=m.useRef(null),a=ru(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(Qh.div,tn({},s,{ref:a}))}),ZJ="PopperContent",[IFe,$He]=YJ(ZJ),OFe=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...A}=t,x=XJ(ZJ,f),[T,B]=m.useState(null),L=ru(e,ie=>B(ie)),[U,V]=m.useState(null),N=AFe(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(MFe),altBoundary:I},{refs:D,floatingStyles:$,placement:j,isPositioned:G,middlewareData:O}=$Fe({strategy:"fixed",placement:R,whileElementsMounted:EFe,elements:{reference:x.anchor},middleware:[rFe({mainAxis:d+S,alignmentAxis:v}),E&&nFe({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?sFe():void 0,...F}),E&&Zje({...F}),iFe({...F,apply:({elements:ie,rects:ue,availableWidth:nt,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${nt}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&kFe({element:U,padding:y}),DFe({arrowWidth:C,arrowHeight:S}),w&&eFe({strategy:"referenceHidden"})]}),[q,z]=eX(j),H=Xl(k);ch(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ch(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:G?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(IFe,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(Qh.div,tn({"data-side":q,"data-align":z},A,{ref:L,style:{...A.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function MFe(t){return t!==null}const DFe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=eX(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function eX(t){const[e,r="center"]=t.split("-");return[e,r]}const NFe=PFe,tX=RFe,LFe=OFe,jFe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(Qh.div,tn({},s,{ref:e})),n):null});function FFe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const K_=t=>{const{present:e,children:r}=t,n=BFe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=ru(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};K_.displayName="Presence";function BFe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=FFe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=np(n.current);i.current=a==="mounted"?c:"none"},[a]),ch(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=np(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ch(()=>{if(e){const c=u=>{const h=np(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=np(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function np(t){return(t==null?void 0:t.animationName)||"none"}function UFe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=zFe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Xl(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function zFe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=Xl(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var VFe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},bu=new WeakMap,sp=new WeakMap,ip={},R5=0,rX=function(t){return t&&(t.host||rX(t.parentNode))},qFe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=rX(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},WFe=function(t,e,r,n){var s=qFe(e,Array.isArray(t)?t:[t]);ip[r]||(ip[r]=new WeakMap);var i=ip[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(bu.get(d)||0)+1,g=(i.get(d)||0)+1;bu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&sp.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),R5++,function(){o.forEach(function(u){var d=bu.get(u)-1,h=i.get(u)-1;bu.set(u,d),i.set(u,h),d||(sp.has(u)||u.removeAttribute(n),sp.delete(u)),h||u.removeAttribute(r)}),R5--,R5||(bu=new WeakMap,bu=new WeakMap,sp=new WeakMap,ip={})}},HFe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||VFe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),WFe(n,s,r,"aria-hidden")):function(){return null}},tg="right-scroll-bar-position",rg="width-before-scroll-bar",GFe="with-scroll-bars-hidden",KFe="--removed-body-scroll-bar-size";function QFe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function YFe(t,e){var r=m.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}function JFe(t,e){return YFe(e||null,function(r){return t.forEach(function(n){return QFe(n,r)})})}function XFe(t){return t}function ZFe(t,e){e===void 0&&(e=XFe);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var f=o;o=[],f.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){o.push(f),c()},filter:function(f){return o=o.filter(f),r}}}};return s}function eBe(t){t===void 0&&(t={});var e=ZFe(null);return e.options=uo({async:!0,ssr:!1},t),e}var nX=function(t){var e=t.sideCar,r=QF(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return m.createElement(n,uo({},r))};nX.isSideCarExport=!0;function tBe(t,e){return t.useMedium(e),nX}var sX=eBe(),I5=function(){},qx=m.forwardRef(function(t,e){var r=m.useRef(null),n=m.useState({onScrollCapture:I5,onWheelCapture:I5,onTouchMoveCapture:I5}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,f=t.enabled,u=t.shards,d=t.sideCar,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,g=t.as,b=g===void 0?"div":g,p=QF(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,E=JFe([r,e]),k=uo(uo({},p),s);return m.createElement(m.Fragment,null,f&&m.createElement(w,{sideCar:sX,removeScrollBar:c,shards:u,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),o?m.cloneElement(m.Children.only(a),uo(uo({},k),{ref:E})):m.createElement(b,uo({},k,{className:l,ref:E}),a))});qx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qx.classNames={fullWidth:rg,zeroRight:tg};var JD,rBe=function(){if(JD)return JD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nBe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=rBe();return e&&t.setAttribute("nonce",e),t}function sBe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function iBe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var oBe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=nBe())&&(sBe(e,r),iBe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},aBe=function(){var t=oBe();return function(e,r){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},iX=function(){var t=aBe(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},lBe={left:0,top:0,right:0,gap:0},O5=function(t){return parseInt(t||"",10)||0},cBe=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[O5(r),O5(n),O5(s)]},fBe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return lBe;var e=cBe(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},uBe=iX(),dBe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(GFe,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -345,12 +345,12 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val } body { - `).concat(YFe,": ").concat(a,`px; + `).concat(KFe,": ").concat(a,`px; } -`)},yBe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return dBe(s)},[s]);return m.createElement(hBe,{styles:vBe(i,!e,s,r?"":"!important")})},Wk=!1;if(typeof window<"u")try{var op=Object.defineProperty({},"passive",{get:function(){return Wk=!0,!0}});window.addEventListener("test",op,op),window.removeEventListener("test",op,op)}catch{Wk=!1}var wu=Wk?{passive:!1}:!1,mBe=function(t){return t.tagName==="TEXTAREA"},oX=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!mBe(t)&&r[e]==="visible")},pBe=function(t){return oX(t,"overflowY")},gBe=function(t){return oX(t,"overflowX")},XD=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aX(t,r);if(n){var s=lX(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bBe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},wBe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},aX=function(t,e){return t==="v"?pBe(e):gBe(e)},lX=function(t,e){return t==="v"?bBe(e):wBe(e)},xBe=function(t,e){return t==="h"&&e==="rtl"?-1:1},CBe=function(t,e,r,n,s){var i=xBe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=lX(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&aX(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},ap=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ZD=function(t){return[t.deltaX,t.deltaY]},eN=function(t){return t&&"current"in t?t.current:t},EBe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},SBe=function(t){return` +`)},hBe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return fBe(s)},[s]);return m.createElement(uBe,{styles:dBe(i,!e,s,r?"":"!important")})},Wk=!1;if(typeof window<"u")try{var op=Object.defineProperty({},"passive",{get:function(){return Wk=!0,!0}});window.addEventListener("test",op,op),window.removeEventListener("test",op,op)}catch{Wk=!1}var wu=Wk?{passive:!1}:!1,vBe=function(t){return t.tagName==="TEXTAREA"},oX=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!vBe(t)&&r[e]==="visible")},yBe=function(t){return oX(t,"overflowY")},mBe=function(t){return oX(t,"overflowX")},XD=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aX(t,r);if(n){var s=lX(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},pBe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},gBe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},aX=function(t,e){return t==="v"?yBe(e):mBe(e)},lX=function(t,e){return t==="v"?pBe(e):gBe(e)},bBe=function(t,e){return t==="h"&&e==="rtl"?-1:1},wBe=function(t,e,r,n,s){var i=bBe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=lX(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&aX(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},ap=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ZD=function(t){return[t.deltaX,t.deltaY]},eN=function(t){return t&&"current"in t?t.current:t},xBe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},CBe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},kBe=0,xu=[];function $Be(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(kBe++)[0],i=m.useState(function(){return iX()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Vie([t.lockRef.current],(t.shards||[]).map(eN),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=ap(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=XD(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=XD(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return CBe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!xu.length||xu[xu.length-1]!==i)){var b="deltaY"in g?ZD(g):ap(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&EBe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(eN).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=ap(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,ZD(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,ap(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return xu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wu),document.addEventListener("touchmove",l,wu),document.addEventListener("touchstart",f,wu),function(){xu=xu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,wu),document.removeEventListener("touchmove",l,wu),document.removeEventListener("touchstart",f,wu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:SBe(s)}):null,h?m.createElement(yBe,{gapMode:"margin"}):null)}const ABe=nBe(sX,$Be);var cX=m.forwardRef(function(t,e){return m.createElement(qx,ho({},t,{ref:e,sideCar:ABe}))});cX.classNames=qx.classNames;const _Be=cX,fX="Popover",[uX,THe]=LJ(fX,[JJ]),Wx=JJ(),[PBe,nu]=uX(fX),TBe=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=Wx(e),l=m.useRef(null),[c,f]=m.useState(!1),[u=!1,d]=VFe({prop:n,defaultProp:s,onChange:i});return m.createElement(jFe,a,m.createElement(PBe,{scope:e,contentId:Wje(),triggerRef:l,open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:o},r))},RBe="PopoverAnchor",IBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(RBe,r),i=Wx(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),m.createElement(tX,tn({},i,n,{ref:e}))}),OBe="PopoverTrigger",MBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(OBe,r),i=Wx(r),o=ru(e,s.triggerRef),a=m.createElement(Qh.button,tn({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vX(s.open)},n,{ref:o,onClick:df(t.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:m.createElement(tX,tn({asChild:!0},i),a)}),dX="PopoverPortal",[DBe,NBe]=uX(dX,{forceMount:void 0}),LBe=t=>{const{__scopePopover:e,forceMount:r,children:n,container:s}=t,i=nu(dX,e);return m.createElement(DBe,{scope:e,forceMount:r},m.createElement(K_,{present:r||i.open},m.createElement(BFe,{asChild:!0,container:s},n)))},Xy="PopoverContent",jBe=m.forwardRef((t,e)=>{const r=NBe(Xy,t.__scopePopover),{forceMount:n=r.forceMount,...s}=t,i=nu(Xy,t.__scopePopover);return m.createElement(K_,{present:n||i.open},i.modal?m.createElement(FBe,tn({},s,{ref:e})):m.createElement(BBe,tn({},s,{ref:e})))}),FBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(null),s=ru(e,n),i=m.useRef(!1);return m.useEffect(()=>{const o=n.current;if(o)return KFe(o)},[]),m.createElement(_Be,{as:U_,allowPinchZoom:!0},m.createElement(hX,tn({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:df(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:df(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:df(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),BBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(hX,tn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),hX=m.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,...u}=t,d=nu(Xy,r),h=Wx(r);return Dje(),m.createElement(Nje,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(Ije,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1)},m.createElement(FFe,tn({"data-state":vX(d.open),role:"dialog",id:d.contentId},h,u,{ref:e,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function vX(t){return t?"open":"closed"}const UBe=TBe,zBe=IBe,VBe=MBe,qBe=LBe,WBe=jBe,[HBe,GBe]=tu(),V0=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=HBe();return{setOpenWalletModal:t,openWalletModalState:e}};function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const ja=t=>{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},cr=(t,e)=>t.toLowerCase()===e.toLowerCase(),Q_=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},yX=t=>`0x${Q_((t==null?void 0:t.substring(2))||"",8)}`;var Xa=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Xa||{});const Aa=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Xa.VERY_LARGE:e<1e-10?r=Xa.VERY_TINY:e<1?r=Xa.FRACTION:r=Xa.MIXED;let n,s;switch(r){case Xa.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Xa.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Xa.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",En({notation:n},s)).format(e)},KBe=t=>t.charAt(0).toUpperCase()+t.slice(1),mX=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},m2=t=>/0x[a-fA-F0-9]{40}/.test(t),QBe=t=>t>0?ge.colors.positive:t<0?ge.colors.negative:ge.colors.text50,tN=(t,e)=>{var r;const n=e.find(i=>cr(i.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},Lo=(t,e,r)=>{var n,s;let i=0;const o=e.find(h=>cr(h.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((n=o.price)==null?void 0:n.value)||0;let l=((s=t.contractInfo)==null?void 0:s.decimals)||18;if(t.contractType==="ERC721"||t.contractType==="ERC1155"){var c;l=((c=t.tokenMetadata)==null?void 0:c.decimals)||0}const f=_r(t.balance,l),u=parseFloat(f)*a;return i+=u,`${(i*r).toFixed(2)}`},pX=t=>{const e=[],r=[],n=[];return t.forEach(s=>{s.contractAddress===Ar?e.push(s):s.contractType==="ERC20"?r.push(s):(s.contractType==="ERC721"||s.contractType==="ERC1155")&&n.push(s)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},gX=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},p2=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await ja(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},Y_=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},g2=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{try{const{indexerClient:i}=await ja(e),o=await i.getTokenBalances(En({accountAddress:t,includeMetadata:!0},r?{contractAddress:r}:{}));let a=(o==null?void 0:o.balances)||[];if(n&&a.length>0){const l=await Y_({tokens:a.map(c=>({chainId:c.chainId,contractAddress:c.contractAddress,tokenId:c.tokenID}))});a=a.filter(c=>{const f=l==null?void 0:l.find(u=>cr(u.token.contractAddress,c.contractAddress)&&u.token.chainId===c.chainId);return c.contractType!=="ERC20"||!!f&&f.price!==null})}return s&&a.length>0&&(a=a.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),a}catch(i){return console.error(i),[]}},YBe=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([p2({accountAddress:t,chainId:e}),g2({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},bX=async({accountAddress:t,chainId:e,collectionAddress:r})=>{try{const{indexerClient:n}=await ja(e),s=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(n){return console.error(n),[]}},JBe=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{let o=[];try{if(r.length>0){const b=r.filter(k=>cr(k.contractAddress,Ar)),p=r.filter(k=>!cr(k.contractAddress,Ar)),w={},E={};b.forEach(k=>{w[k.chainId]||(w[k.chainId]=[]),w[k.chainId].push(k)}),p.forEach(k=>{E[k.chainId]||(E[k.chainId]=[]),E[k.chainId].push(k)}),o=(await Promise.all([...Object.keys(w).map(k=>p2({accountAddress:t,chainId:Number(k)})),...Object.keys(E).map(k=>E[Number(k)].map($=>g2({accountAddress:t,chainId:Number(k),contractAddress:$.contractAddress},{hideUnlistedTokens:n,hideCollectibles:s}))).flat()])).flat()}else o=(await Promise.all([...e.map(b=>p2({accountAddress:t,chainId:b})),...e.map(b=>g2({accountAddress:t,chainId:b},{hideUnlistedTokens:n,hideCollectibles:s}))])).flat();const{nativeTokens:a,erc20Tokens:l,collectibles:c}=pX(o),f=new Promise(async(b,p)=>{if(l.length>0){const w=l.map(k=>({chainId:k.chainId,contractAddress:k.contractAddress})),E=await Y_({tokens:w})||[];b(E)}else b([])}),u=c.map(async b=>await bX({accountAddress:t,chainId:b.chainId,collectionAddress:b.contractAddress})),[d,...h]=await Promise.all([f,...u]),v=l.sort((b,p)=>{var w,E;const k=d.find(N=>cr(N.token.contractAddress,b.contractAddress)),$=d.find(N=>cr(N.token.contractAddress,p.contractAddress)),x=k!=null&&k.price?k.price.value:0,T=$!=null&&$.price?$.price.value:0,B=Number(_r(b.balance,((w=b.contractInfo)==null?void 0:w.decimals)||0)),L=Number(_r(p.balance,((E=p.contractInfo)==null?void 0:E.decimals)||0)),U=B*x;return L*T-U}),y=cLe(h.flat(),10).sort((b,p)=>b.contractAddress.localeCompare(p.contractAddress));return s?[...a.length>0?[a[0]]:[],...v.length>0?v.slice(0,11):[]]:[...a.length>0?[a[0]]:[],...v.length>0?[v[0]]:[],...y.length>0?[...y]:[]]}catch(a){return console.error(a),[]}},XBe=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:s}=await ja(e);return(await s.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},ZBe=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},wX=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:s})=>{const{indexerClient:i}=ja(t);return i.getTransactionHistory({includeMetadata:!0,page:s,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},eUe=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(i=>wX({chainId:i,accountAddress:e,page:{page:1}}))])).map(i=>i.transactions).flat().sort((i,o)=>{const a=new Date(i.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),tUe=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=ja(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},rUe=["chainIds"],nUe=["disabled"],Bo={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},J_=(t,e)=>hi({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=Hx(t,rUe);return(await Promise.all(r.map(i=>YBe(En({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),sUe=t=>hi({queryKey:["collectionBalance",t],queryFn:()=>bX(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),su=t=>{let{disabled:e}=t,r=Hx(t,nUe);return hi({queryKey:["coinPrices",r],queryFn:()=>Y_(r),retry:!0,staleTime:1*Bo.oneMinute,enabled:r.tokens.length>0&&!e})},iUe=(t,e)=>hi({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>JBe(t,e),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),oUe=(t,e)=>hi({queryKey:["coinBalance",t,e],queryFn:()=>cr((t==null?void 0:t.contractAddress)||"",Ar)?p2({accountAddress:t.accountAddress,chainId:t.chainId}).then(s=>s[0]):g2(t,e).then(n=>n[0]),retry:!0,staleTime:1*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),xX=t=>hi({queryKey:["collectibleBalance",t],queryFn:()=>XBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),CX=t=>hi({queryKey:["useCollectiblePrices",t],queryFn:()=>ZBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:t.tokens.length>0}),EX=t=>LOe({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>wX(En({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:10*Bo.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),aUe=t=>hi({queryKey:["transactionHistorySummary",t],queryFn:()=>eUe(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),yc=t=>hi({queryKey:["useConversionRate",t],queryFn:()=>tUe(t),retry:!0,staleTime:60*Bo.oneMinute}),[lUe,cUe]=tu(),Qi=()=>{const{setHistory:t,history:e}=lUe();return{setNavigation:s=>{const i=document.getElementById("sequence-kit-wallet-content"),o=i==null?void 0:i.parentElement;o==null||o.scrollTo(0,0);const a=[...e,s];t(a)},history:e,setHistory:t,goBack:()=>{const s=[...e];s.pop(),t(s)}}},fUe=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],uUe=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],dUe=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],SX=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],hUe=SX[0],Bs="54px",Yi=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Yn=()=>{const{chains:t}=dn(),e=()=>{let c=!0,f=!1,u=hUe,d=t.map(h=>h.id);try{const h=localStorage.getItem(Es.Settings),v=JSON.parse(h||"{}");if((v==null?void 0:v.hideUnlistedTokens)!==void 0&&(c=v==null?void 0:v.hideUnlistedTokens),(v==null?void 0:v.hideCollectibles)!==void 0&&(f=v==null?void 0:v.hideCollectibles),(v==null?void 0:v.fiatCurrency)!==void 0&&(u=v==null?void 0:v.fiatCurrency),(v==null?void 0:v.selectedNetworks)!==void 0){let y=!0;v.selectedNetworks.forEach(g=>{t.find(b=>b.id===g)===void 0&&(y=!1)}),y&&(d=v==null?void 0:v.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:c,hideCollectibles:f,fiatCurrency:u,selectedNetworks:d}},r=e(),[n,s]=m.useState(r);return En({},n,{setFiatCurrency:c=>{const f=e(),u=En({},f,{fiatCurrency:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideCollectibles:c=>{const f=e(),u=En({},f,{hideCollectibles:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideUnlistedTokens:c=>{const f=e(),u=En({},f,{hideUnlistedTokens:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setSelectedNetworks:c=>{const f=e(),u=En({},f,{selectedNetworks:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)}})},vUe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{variant:"large",color:"textInverse100"},"?")),Mf=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(vUe,{size:e}),rN=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:s,priceChangePercentage:i,symbol:o})=>{const{fiatCurrency:a}=Yn(),l=i>0?"+":"";return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},P.createElement(W,{marginBottom:"1"},P.createElement(Mf,{size:36,imageUrl:e})),P.createElement(W,{marginBottom:"3"},P.createElement(W,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),P.createElement(Mf,{size:12,imageUrl:t})),P.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"bold"},`${a.sign}${s}`)),P.createElement(re,{style:{color:QBe(i)}},`${l}${i.toFixed(2)}%`)))},nN=({balance:t})=>{var e,r,n,s,i;const{chains:o=[]}=dn(),{fiatCurrency:a}=Yn(),l=cr(t.contractAddress,Ar),c=Mr(t.chainId,o),{data:f=[],isLoading:u}=su({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:d=1,isLoading:h}=yc({toCurrency:a.symbol});if(u||h)return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(l){const x=Lo(t,f,d),T=tN(t,f),B=_r(t.balance,c.decimals),L=Aa(B);return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:c.logoURI,tokenName:c.name,balance:L,balanceFiat:x,priceChangePercentage:T,symbol:c.symbol})}const y=Lo(t,f,d),g=tN(t,f),b=(e=(r=t.contractInfo)==null?void 0:r.decimals)!=null?e:18,p=_r(t.balance,b),w=Aa(p),E=((n=t.contractInfo)==null?void 0:n.name)||"Unknown",k=((s=t.contractInfo)==null?void 0:s.name)||"TOKEN",$=(i=t.contractInfo)==null?void 0:i.logoURI;return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:$,tokenName:E,balance:w,balanceFiat:y,priceChangePercentage:g,symbol:k})},X_=({imageUrl:t})=>P.createElement(To,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},P.createElement(fr,{style:{height:"100%"},src:t})),yUe=({balance:t})=>{var e;return P.createElement(X_,{imageUrl:t==null||(e=t.tokenMetadata)==null?void 0:e.image})};Xf("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const mUe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),pUe=Fs({height:"76px",backgroundColor:"#909090",animation:`${mUe} 2s ease-in-out infinite`},"skeleton");Zf();const wt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>P.createElement(W,{className:pUe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),gUe=()=>P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},Array(12).fill(null).map((t,e)=>P.createElement(W,{key:e},P.createElement(wt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Xf("packages/wallet/src/shared/styles.css.ts","kit");const _o=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Z_=Fs({"> div":{overflowY:"scroll"}},"scrollbar");Ki(`html:not(.is-apple) ${Z_} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Ki(`html:not(.is-apple) ${Z_} > div:hover::-webkit-scrollbar-thumb`,{background:ge.colors.text50,backgroundClip:"content-box"});const eP=Fs({},"walletContent");Ki(`${eP} + button`,{backgroundColor:"transparent"});Ki(`${eP} + button > svg`,{width:"20px",height:"20px"});Zf();const bUe=()=>{const{address:t}=Tn(),{setNavigation:e}=Qi(),{displayedAssets:r}=tOe(),{hideUnlistedTokens:n,hideCollectibles:s,selectedNetworks:i}=Yn(),{data:o=[],isLoading:a}=iUe({accountAddress:t||"",chainIds:i,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s});if(a)return P.createElement(gUe,null);const{nativeTokens:l,erc20Tokens:c,collectibles:f}=pX(o),u=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},l.map(d=>P.createElement(W,{key:d.contractAddress,className:_o,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),c.map(d=>P.createElement(W,{className:_o,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),f.map(d=>P.createElement(W,{className:_o,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>u(d)},P.createElement(yUe,{balance:d}))))},wUe=()=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(bUe,null)),xUe=()=>{const{address:t}=Tn(),{chain:e,chains:r=[]}=dn(),[n,s]=m.useState(!1),i=Mr((e==null?void 0:e.id)||1,r);m.useEffect(()=>{n&&setTimeout(()=>{s(!1)},4e3)},[n]);const o=()=>{s(!0)},a=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},P.createElement(W,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},P.createElement(ILe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),P.createElement(W,null,P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),P.createElement(fr,{width:"5",src:i.logoURI,alt:"icon"})),P.createElement(W,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},P.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),P.createElement(W,{gap:"3"},P.createElement(hJ.CopyToClipboard,{text:t||""},P.createElement(nt,{onClick:o,leftIcon:Y2,label:n?"Copied!":"Copy"})),P.createElement(nt,{onClick:a,leftIcon:Xoe,label:"Share"})),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},P.createElement(re,{variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${i.name} address. Please only send assets on the ${i.name} network.`))))},kX=({imageUrl:t,name:e,decimals:r,balance:n,symbol:s,fiatValue:i,chainId:o,showSquareImage:a})=>{const{chains:l=[]}=dn(),{fiatCurrency:c}=Yn(),f=_r(n,r),u=Aa(f),d=Mr(o,l);return P.createElement(W,{alignItems:"flex-end",justifyContent:"space-between"},P.createElement(W,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?P.createElement(W,{style:{width:"40px"}},P.createElement(X_,{imageUrl:t})):P.createElement(Mf,{imageUrl:t,size:40}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",alignItems:"center",gap:"1"},P.createElement(re,{variant:"medium"},e),P.createElement(Mf,{imageUrl:d.logoURI,size:12})),P.createElement(re,{color:"text50",variant:"normal"}," ",`${u} ${s} available`))),P.createElement(W,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},i&&P.createElement(re,{variant:"normal"},`${c.sign}${i}`)))},CUe=({chainId:t,contractAddress:e})=>{var r,n,s,i,o;const{chains:a=[]}=dn(),l=g4(),{address:c="",connector:f}=Tn(),u=!!(f!=null&&(r=f._wallet)!=null&&r.isSequenceBased),d=l===t,h=!d&&!u,{switchNetwork:v}=nV(),y=m.useRef(null),{setOpenWalletModal:g}=V0(),{fiatCurrency:b}=Yn(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:$}=p4(),{data:x=[],isLoading:T}=J_({accountAddress:c,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),B=Mr(t,a),L=x.find(K=>K.contractAddress===e),{data:U=[],isLoading:V}=su({tokens:[{chainId:t,contractAddress:e}]}),{data:N=1,isLoading:C}=yc({toCurrency:b.symbol});if(T||V||C)return null;const R=cr(e,Ar),M=R?B.decimals:(L==null||(n=L.contractInfo)==null?void 0:n.decimals)||18,_=R?B.name:(L==null||(s=L.contractInfo)==null?void 0:s.name)||"",I=R?B.logoURI:L==null||(i=L.contractInfo)==null?void 0:i.logoURI,F=R?B.symbol:(L==null||(o=L.contractInfo)==null?void 0:o.symbol)||"",D=p===""?"0":p,A=Gd(D,M),j=Lo(En({},L,{balance:A.toString()}),U,N),G=A.gt((L==null?void 0:L.balance)||"0"),O=A.gt(0),q=K=>{const{value:Q}=K.target,ae=mX(Q,M);w(ae)},z=()=>{var K;(K=y.current)==null||K.focus();const Q=_r((L==null?void 0:L.balance)||0,M).toString();w(Q)},H=async()=>{const K=await navigator.clipboard.readText();k(K)},J=()=>{k("")},X=async K=>{!d&&u&&v&&v(t),K.preventDefault();const Q=Gd(D,M);R?$==null||$.sendTransaction({to:E,value:BigInt(Q.toString())}).catch(ae=>console.error("User rejected transaction",ae)):$==null||$.sendTransaction({to:L==null?void 0:L.contractAddress,data:new en(uUe).encodeFunctionData("transfer",[E,Q.toHexString()])}).catch(ae=>console.error("User rejected transaction",ae)),g(!1)};return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:X},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:I,decimals:M,name:_,symbol:F,balance:(L==null?void 0:L.balance)||"0",fiatValue:Lo(L,U,N),chainId:t}),P.createElement(iU,{ref:y,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:q,controls:P.createElement(P.Fragment,null,P.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${j}`),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:z,"data-id":"maxCoin",flexShrink:"0"}),P.createElement(re,{fontSize:"xlarge",fontWeight:"bold"},F))}),G&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:J,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:K=>k(K.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:H,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),h&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:d,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!O||!m2(E)||G||!d&&!u,label:"Send",rightIcon:Di,style:{height:"52px",borderRadius:ge.radii.md}}))},EUe=({chainId:t,contractAddress:e,tokenId:r})=>{var n,s,i,o,a;const{chains:l=[]}=dn(),c=g4(),{address:f="",connector:u}=Tn(),d=!!(u!=null&&(n=u._wallet)!=null&&n.isSequenceBased),h=c===t,v=!h&&!d,{switchNetwork:y}=nV(),g=m.useRef(null),{setOpenWalletModal:b}=V0(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:$}=p4(),{data:x,isLoading:T}=xX({accountAddress:f,chainId:t,collectionAddress:e,tokenId:r}),B=Mr(t,l);if(T)return null;const U=(x==null||(s=x.tokenMetadata)==null?void 0:s.decimals)||0,V=(x==null||(i=x.tokenMetadata)==null?void 0:i.name)||"Unknown",N=(x==null||(o=x.tokenMetadata)==null?void 0:o.image)||(x==null||(a=x.contractInfo)==null?void 0:a.logoURI)||"",C=p===""?"0":p,S=Gd(C,U),R=S.gt((x==null?void 0:x.balance)||"0"),M=S.gt(0),_=H=>{const{value:J}=H.target,X=mX(J,U);w(X)},I=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)-1,X=Math.max(J,0).toString();w(X)},F=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)+1,X=Number(_r((x==null?void 0:x.balance)||0,U)),K=Math.min(J,X).toString();w(K)},D=()=>{var H;(H=g.current)==null||H.focus();const J=_r((x==null?void 0:x.balance)||0,U).toString();w(J)},A=async()=>{const H=await navigator.clipboard.readText();k(H)},j=()=>{k("")},G=async H=>{H.preventDefault(),!h&&d&&y&&y(t);const J=Gd(C,U),{contractType:X}=x;switch(X){case"ERC721":$==null||$.sendTransaction({to:x.contractAddress,data:new en(dUe).encodeFunctionData("safeTransferFrom",[f,E,r])}).catch(K=>console.error("User rejected transaction",K));break;case"ERC1155":default:$==null||$.sendTransaction({to:x.contractAddress,data:new en(fUe).encodeFunctionData("safeBatchTransferFrom",[f,E,[r],[J.toHexString()],[]])}).catch(K=>console.error("User rejected transaction",K))}b(!1)},O=_r((x==null?void 0:x.balance)||0,U).toString(),q=Number(p)===0,z=Number(p)>=Number(O);return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:G},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:N,showSquareImage:!0,decimals:U,name:V,symbol:"",balance:(x==null?void 0:x.balance)||"0",chainId:t}),P.createElement(iU,{ref:g,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:_,controls:P.createElement(W,{gap:"2"},P.createElement(nt,{disabled:q,size:"xs",onClick:I,leftIcon:tae}),P.createElement(nt,{disabled:z,size:"xs",onClick:F,leftIcon:$oe}),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:D,"data-id":"maxCoin",flexShrink:"0"}))}),R&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:j,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:H=>k(H.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:A,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),v&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>y&&y(t),disabled:h,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!M||!m2(E)||R||!h&&!d,label:"Send",rightIcon:Di,style:{height:"52px",borderRadius:ge.radii.md}}))},SUe=({transaction:t})=>{var e;const{chains:r=[]}=dn(),{fiatCurrency:n}=Yn(),{setNavigation:s}=Qi(),i=()=>{s({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(p=>{const w=p.contractAddress;o.includes(w)||o.push(w)});const{data:a=[],isLoading:l}=su({tokens:o.map(p=>({contractAddress:p,chainId:t.chainId}))}),{data:c=1,isLoading:f}=yc({toCurrency:n.symbol}),u=l||f,{transfers:d}=t,h=Mr(t.chainId,r),v=p=>{switch(p){case Ei.SEND:return P.createElement(X6,{style:{transform:"rotate(270deg)",width:"16px"}});case Ei.RECEIVE:return P.createElement(X6,{style:{transform:"rotate(90deg)",width:"16px"}});case Ei.UNKNOWN:default:return P.createElement(iB,{style:{width:"14px"}})}},y=p=>{switch(p){case Ei.SEND:return"Sent";case Ei.RECEIVE:return"Received";case Ei.UNKNOWN:default:return"Transacted"}},g=(p,w,E)=>{let k="";E===Ei.SEND?k="-":E===Ei.RECEIVE&&(k="+");let $="text50";return E===Ei.SEND?$=ge.colors.negative:E===Ei.RECEIVE&&($=ge.colors.positive),P.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:$}},`${k}${p} ${w}`)},b=({transfer:p,isFirstItem:w})=>{const{amounts:E}=p,k=kJ(t.timestamp).format("MMM DD, YYYY");return P.createElement(W,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},v(p.transferType),P.createElement(re,{fontWeight:"medium",fontSize:"normal"},y(p.transferType)),P.createElement(fr,{src:h.logoURI,width:"3"})),w&&P.createElement(W,null,P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},k))),E.map(($,x)=>{var T,B,L,U,V,N,C;const S=Mr(t.chainId,r),R=cr(p.contractAddress,Ar),M=((T=p.contractInfo)==null?void 0:T.type)==="ERC721"||((B=p.contractInfo)==null?void 0:B.type)==="ERC1155";let _;const I=(L=p.tokenIds)==null?void 0:L[x];if(M&&I){var F,D;_=((F=p.tokenMetadata)==null||(D=F[I])==null?void 0:D.decimals)||0}else{var A;_=R?S.decimals:(A=p.contractInfo)==null?void 0:A.decimals}const j=_r($,_),G=R?S.symbol:((U=p.contractInfo)==null?void 0:U.symbol)||"",O=R?S.logoURI:(V=p.contractInfo)==null?void 0:V.logoURI,q=(N=a.find(z=>cr(z.token.contractAddress,p.contractAddress)))==null||(C=N.price)==null?void 0:C.value;return P.createElement(W,{key:x,flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},O&&P.createElement(fr,{src:O,width:"5",alt:"token logo"}),g(Aa(j),G,p.transferType)),u&&P.createElement(wt,{width:"35px",height:"20px"}),q&&P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(j)*q*c).toFixed(2)}`))}))};return P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:_o,onClick:()=>i()},d==null?void 0:d.map((p,w)=>P.createElement(W,{key:`${t.txnHash}-${w}`,width:"full"},b({transfer:p,isFirstItem:w===0}))))},tP=()=>{const t=()=>P.createElement(W,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"65px",height:"20px"}),P.createElement(wt,{width:"75px",height:"17px"})),P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"120px",height:"20px"}),P.createElement(wt,{width:"35px",height:"17px"})));return P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(wt,{width:"70px",height:"17px"}),P.createElement(W,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>P.createElement(W,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},rP=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],s=m.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),l=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),c=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const v=new Date(h.timestamp).getTime();v>a?d.today.push(h):v>l?d.yesterday.push(h):v>c?d.week.push(h):v>f?d.month.push(h):v>u?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(tP,null));const i=({label:a})=>P.createElement(W,null,P.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>P.createElement(W,{flexDirection:"column",gap:"2"},a.map((l,c)=>P.createElement(W,{key:`${l.txnHash}-${c}`,flexDirection:"column",gap:"2"},P.createElement(SUe,{transaction:l}))));return P.createElement(W,{flexDirection:"column",gap:"5"},n.map(a=>{const l=s[a.id];return l.length===0?null:P.createElement(W,{key:a.id,flexDirection:"column",gap:"3"},P.createElement(i,{label:a.label}),P.createElement(o,{transactions:l}))}),t.length===0&&P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(i,{label:"History"}),P.createElement(re,null,"No Recent Transaction History Found")),r&&P.createElement(W,{margin:"4",alignItems:"center",justifyContent:"center"},P.createElement(I$,null)))},kUe=()=>{const{selectedNetworks:t}=Yn(),{address:e}=Tn(),{data:r=[],isLoading:n}=aUe({accountAddress:e||"",chainIds:t});return P.createElement(W,null,P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(rP,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},b2=({balance:t})=>{var e,r;const{chains:n=[]}=dn(),{setNavigation:s}=Qi(),i=cr(t.contractAddress,Ar),o=Mr(t.chainId,n),a=i?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,l=i?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",c=()=>{var u,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=i?o.decimals:t==null||(u=t.contractInfo)==null?void 0:u.decimals,v=_r(t.balance,h||0),y=Aa(v),g=i?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${y} ${g}`},f=()=>{const u=t.contractType==="ERC721"||t.contractType==="ERC1155";s(u?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return P.createElement(W,{key:t.contractAddress,onClick:f,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(W,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(Mf,{imageUrl:a,size:30}),P.createElement(W,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},l),P.createElement(fr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},P.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},c()),P.createElement(Di,{color:"text50"})))},sN=({toLocation:t,label:e})=>{const{setNavigation:r}=Qi(),n=()=>{r(t)};return P.createElement(W,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),P.createElement(Di,{color:"text50",size:"sm"})))},$Ue=()=>{const{chains:t=[]}=dn(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Yn(),[s,i]=m.useState(""),{address:o}=Tn(),{data:a,isLoading:l}=J_({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),c=(a==null?void 0:a.filter(L=>L.contractType==="ERC20"||cr(L.contractAddress,Ar)))||[],{data:f=[],isLoading:u}=su({tokens:c.map(L=>({chainId:L.chainId,contractAddress:L.contractAddress}))}),{data:d=1,isLoading:h}=yc({toCurrency:e.symbol}),v=c.sort((L,U)=>Number(Lo(U,f,d))-Number(Lo(L,f,d))),g=((a==null?void 0:a.filter(L=>L.contractType==="ERC721"||L.contractType==="ERC1155"))||[]).sort((L,U)=>Number(U.balance)-Number(L.balance)),b=l||u||h,p=g.map((L,U)=>{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}),w=v.map((L,U)=>{if(cr(L.contractAddress,Ar)){const N=Mr(L.chainId,t);return{index:U,name:N.name}}else{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}}),E=v.length,k=g.length,$=new Ea(w,{keys:["name"]}),x=new Ea(p,{keys:["name"]}),T=(s===""?w:$.search(s).map(L=>L.item)).slice(0,5),B=(s===""?p:x.search(s).map(L=>L.item)).slice(0,5);return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:s,onChange:L=>i(L.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${k})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):B.length===0?P.createElement(re,null,"No collections found"):B.map(L=>{const U=g[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${E})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):T.length===0?P.createElement(re,null,"No coins found"):T.map(L=>{const U=v[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})))},AUe=({defaultTab:t})=>{const{chains:e=[]}=dn(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:s}=Yn(),[i,o]=m.useState(""),[a,l]=m.useState(t);m.useEffect(()=>{o("")},[a]);const{address:c}=Tn(),{data:f,isLoading:u}=J_({accountAddress:c||"",chainIds:s},{hideUnlistedTokens:n}),d=(f==null?void 0:f.filter(S=>S.contractType==="ERC20"||cr(S.contractAddress,Ar)))||[],{data:h=[],isLoading:v}=su({tokens:d.map(S=>({chainId:S.chainId,contractAddress:S.contractAddress}))}),{data:y=1,isLoading:g}=yc({toCurrency:r.symbol}),b=d.sort((S,R)=>Number(Lo(R,h,y))-Number(Lo(S,h,y))),w=((f==null?void 0:f.filter(S=>S.contractType==="ERC721"||S.contractType==="ERC1155"))||[]).sort((S,R)=>Number(R.balance)-Number(S.balance)),E=b.length,k=w.length,$=u||v||g,x=w.map((S,R)=>{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}),T=b.map((S,R)=>{if(cr(S.contractAddress,Ar)){const _=Mr(S.chainId,e);return{index:R,name:_.name}}else{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}}),B=new Ea(T,{keys:["name"]}),L=new Ea(x,{keys:["name"]}),U=i===""?T:B.search(i).map(S=>S.item),V=i===""?x:L.search(i).map(S=>S.item),N=()=>P.createElement(wt,{width:"360px",height:"48px"}),C=()=>P.createElement(P.Fragment,null,Array(8).fill(null).map((S,R)=>P.createElement(wt,{key:R,width:"full",height:"32px"})));return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:i,onChange:S=>o(S.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full"},P.createElement(que,{value:a,onValueChange:S=>l(S)},P.createElement(W,{marginBottom:"5"},!$&&P.createElement(Vue,{value:a,tabs:[{label:`Collections (${k})`,value:"collections"},{label:`Coins (${E})`,value:"coins"}]}),$&&P.createElement(N,null)),P.createElement(s9,{value:"collections"},P.createElement(W,{flexDirection:"column",gap:"3"},$&&P.createElement(C,null),!$&&V.length===0&&P.createElement(re,null,"No Collectibles Found"),!$&&V.length>0&&V.map(S=>{const R=w[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))),P.createElement(s9,{value:"coins"},P.createElement(W,{flexDirection:"column",gap:"3"},$&&P.createElement(C,null),!$&&b.length==0&&P.createElement(re,null,"No Coins Found"),!$&&U.length>0&&U.map(S=>{const R=b[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))))))},_Ue=()=>{const{setNavigation:t}=Qi(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(nt,{onClick:e,leftIcon:nB,rightIcon:Di,width:"full",label:"General",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:r,leftIcon:Doe,rightIcon:Di,width:"full",label:"Currency",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:n,leftIcon:Voe,rightIcon:Di,width:"full",label:"Networks",style:{height:"52px",borderRadius:ge.radii.md}}))))},PUe=()=>{Na();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=Yn(),s=()=>{e(!t)},i=()=>{n(!r)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide unlisted tokens"),P.createElement(n9,{checked:t,onCheckedChange:s})),P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide collectibles"),P.createElement(n9,{checked:r,onCheckedChange:i}))))},TUe=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return P.createElement(W,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ge.radii.circle,width:"20px",height:"20px"}},P.createElement(W,{as:Zv.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":ge.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&P.createElement(mh,{color:"white",style:{width:"14px",height:"14px"}})))},RUe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],$X=t=>{const{value:e,selected:r,children:n,disabled:s,onClick:i,className:o,hideIndicator:a,squareIndicator:l=!1}=t,c=Hx(t,RUe);return P.createElement(To,En({as:"button",clickable:!0,className:wje(o),disabled:s,onClick:()=>i(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},c),n,!a&&P.createElement(TUe,{selected:r,squareIndicator:l}))},IUe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Yn();return P.createElement(W,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2"},SX.map(r=>P.createElement($X,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},P.createElement(W,{gap:"2",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),P.createElement(re,{color:"text50"},r.name.message))))))},OUe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Yn(),{chains:r=[]}=dn(),n=s=>{if(t.includes(s)){if(t.length===1)return;e(t.filter(i=>i!==s))}else e([...t,s])};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(re,{variant:"small",color:"text50"},"Networks"),P.createElement(W,{flexDirection:"column",gap:"2"},r.map(s=>{const i=Mr(s.id,r);return P.createElement($X,{disabled:t.length===1&&t.includes(s.id),key:s.id,selected:t.includes(s.id),onClick:()=>n(s.id),value:s.id,squareIndicator:!0},P.createElement(W,{gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{width:"3",height:"3",src:i.logoURI,alt:"network"}),P.createElement(re,{color:"text100",variant:"small"},i.name)))}))))},q0=({chainId:t})=>{const{chains:e=[]}=dn(),{network:r}=ja(t),n=Mr(t,e),s=zIe(t),i=VIe(t);return P.createElement(W,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:i},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},P.createElement(fr,{style:{width:"14px"},src:n.logoURI}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:s}},KBe(r.name)))},MUe=({chainId:t})=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{height:"24px",width:"70px"}),P.createElement(q0,{chainId:t})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"150px",height:"36px"}),P.createElement(wt,{width:"33px",height:"17px"}))),P.createElement(nt,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:X2,label:"Send",disabled:!0,onClick:()=>{}}),P.createElement(W,null,P.createElement(tP,null)))),DUe=(t,e)=>{var r;const[n,s]=m.useState(null),i=m.useMemo(()=>new IntersectionObserver(([o])=>s(o),e),[]);return m.useEffect(()=>(t.current&&i.observe(t.current),()=>{t.current&&i.disconnect()}),[t.current,i]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},AX=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[s,i]=m.useState(0),[o,a]=m.useState(!1),l=m.useRef(null),c=DUe(l);m.useEffect(()=>{c&&r&&!o&&f()},[c]);const f=async()=>{a(!0),await e(s),i(u=>u+1),a(!1)};return P.createElement(P.Fragment,null,n,P.createElement("div",{ref:l}))},NUe=({contractAddress:t,chainId:e})=>{var r,n,s,i;const{chains:o=[]}=dn(),{setNavigation:a}=Qi(),{fiatCurrency:l,hideUnlistedTokens:c}=Yn(),{address:f}=Tn(),{data:u,isLoading:d,fetchNextPage:h,hasNextPage:v,isFetchingNextPage:y}=EX({chainId:e,accountAddress:f||"",contractAddress:t}),g=gX(u),{data:b,isLoading:p}=oUe({accountAddress:f||"",contractAddress:t,chainId:e},{hideUnlistedTokens:c}),{data:w,isLoading:E}=su({tokens:[{chainId:e,contractAddress:t}]}),{data:k=1,isLoading:$}=yc({toCurrency:l.symbol});if(p||E||$)return P.createElement(MUe,{chainId:e});const T=cr(t,Ar),B=T?Mr(e,o).logoURI:b==null||(r=b.contractInfo)==null?void 0:r.logoURI,L=T?Mr(e,o).symbol:b==null||(n=b.contractInfo)==null?void 0:n.symbol,U=T?Mr(e,o).name:b==null||(s=b.contractInfo)==null?void 0:s.name,V=T?Mr(e,o).decimals:b==null||(i=b.contractInfo)==null?void 0:i.decimals,N=_r((b==null?void 0:b.balance)||"0",V),C=Aa(N),S=b?Lo(b,w||[],k):"0",R=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(fr,{width:"8",src:B,alt:"logo"}),P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},U),P.createElement(q0,{chainId:e})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${C} ${L}`),P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${l.sign}${S}`))),P.createElement(nt,{width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:R}),P.createElement(W,null,P.createElement(AX,{onLoad:()=>h(),hasMore:v},P.createElement(rP,{transactions:g,isLoading:d,isFetchingNextPage:y})))))},LUe=({chainId:t})=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{width:"100px",height:"24px"}),P.createElement(q0,{chainId:t}),P.createElement(wt,{width:"142px",height:"17px"})),P.createElement(W,{width:"full"},P.createElement(wt,{width:"168px",height:"20px"}),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>P.createElement(wt,{width:"full",aspectRatio:"1/1"}))))),jUe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Qi(),{address:s}=Tn(),{data:i,isLoading:o}=sUe({chainId:t,accountAddress:s||"",collectionAddress:e}),a=i==null||(r=i[0])==null?void 0:r.contractInfo,l=a==null?void 0:a.logoURI;if(o)return P.createElement(LUe,{chainId:t});const c=f=>{n&&n({location:"collectible-details",params:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenID}})};return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(Mf,{imageUrl:l,size:32}),P.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),P.createElement(q0,{chainId:t}),P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(i==null?void 0:i.length)||0} Unique Collectibles`)),P.createElement(W,{width:"full"},P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(i==null?void 0:i.length)||0})`),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},i==null?void 0:i.map(f=>{var u,d,h;const v=f.balance,y=(f==null||(u=f.tokenMetadata)==null?void 0:u.decimals)||0,g=Aa(_r(v,y));return P.createElement(W,{key:`${f.contractAddress}-${f.tokenID}`,onClick:()=>c(f),className:_o},P.createElement(W,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},P.createElement(fr,{style:{height:"100%"},src:(d=f.tokenMetadata)==null?void 0:d.image})),P.createElement(W,null,P.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=f.tokenMetadata)==null?void 0:h.name}`)),P.createElement(W,null,P.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},g," Owned")))}))))},FUe=()=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"120px",height:"30px"}),P.createElement(wt,{width:"140px",height:"40px"})),P.createElement(W,null,P.createElement(wt,{width:"347px",height:"347px"})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"44px",height:"36px"}),P.createElement(wt,{width:"34px",height:"17px"}))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:()=>{}})),P.createElement(W,null,P.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),P.createElement(tP,null)))),BUe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,s,i,o,a,l;const{chains:c=[]}=dn(),{address:f}=Tn(),{fiatCurrency:u}=Yn(),{setNavigation:d}=Qi(),{data:h,isLoading:v,fetchNextPage:y,hasNextPage:g,isFetchingNextPage:b}=EX({chainId:e,accountAddress:f||"",contractAddress:t,tokenId:r}),p=gX(h),{data:w,isLoading:E}=xX({accountAddress:f||"",collectionAddress:t,chainId:e,tokenId:r}),{data:k,isLoading:$}=CX({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:x=1,isLoading:T}=yc({toCurrency:u.symbol});if(E||$||T)return P.createElement(FUe,null);const L=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},U=Mr(e,c),V=w==null||(n=w.contractInfo)==null?void 0:n.logoURI,N=(w==null||(s=w.contractInfo)==null?void 0:s.name)||"Unknown Collection",C=(w==null||(i=w.tokenMetadata)==null?void 0:i.decimals)||0,S=(w==null?void 0:w.balance)||"0",R=_r(S,C),M=Aa(Number(R)),_=w?Lo(w,k||[],x):"0";return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{borderRadius:"circle",width:"8",src:V,alt:"collection logo",style:{objectFit:"cover"}}),P.createElement(W,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"small"},N),P.createElement(fr,{width:"3",src:U.logoURI,alt:"collection logo"}))),P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(w==null||(o=w.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),P.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),P.createElement(W,null,P.createElement(X_,{imageUrl:w==null||(a=w.tokenMetadata)==null?void 0:a.image})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},M),k&&((l=k[0].price)==null?void 0:l.value)&&P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${u.symbol} ${_}`))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:L})),P.createElement(W,null,P.createElement(AX,{onLoad:()=>y(),hasMore:g},P.createElement(rP,{transactions:p,isLoading:v,isFetchingNextPage:b})))))},UUe=["buttonVariant","text","size"],_X=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,s=Hx(t,UUe),[i,o]=m.useState(!1);m.useEffect(()=>{i&&setTimeout(()=>{o(!1)},4e3)},[i]);const a=()=>{o(!0)},l=i?"Copied!":"Copy",c=e==="icon"?"rgba(0,0,0,0)":ge.colors.buttonGlass;return P.createElement(hJ.CopyToClipboard,{text:r,onCopy:a},P.createElement(va,En({size:n,icon:i?mh:Y2},s,{style:En({background:c},t==null?void 0:t.style),label:e==="with-label"?l:void 0})))},zUe=({transaction:t})=>{var e,r;const{chains:n=[]}=dn(),{fiatCurrency:s}=Yn(),i=[],o=[];(e=t.transfers)==null||e.forEach(p=>{var w,E;if(((w=p.contractInfo)==null?void 0:w.type)==="ERC721"||((E=p.contractInfo)==null?void 0:E.type)==="ERC1155"){var k;(k=p.tokenIds)==null||k.forEach(x=>{if(!o.find(L=>{var U;return L.chainId===t.chainId&&cr(L.contractAddress,((U=p.contractInfo)==null?void 0:U.address)||"")&&L.tokenId===x})){var B;o.push({chainId:t.chainId,contractAddress:((B=p.contractInfo)==null?void 0:B.address)||"",tokenId:x})}})}else{var $;const x=(p==null||($=p.contractInfo)==null?void 0:$.address)||Ar;i.find(B=>B.chainId===t.chainId&&cr(B.contractAddress,x))||i.push({chainId:t.chainId,contractAddress:x})}});const{data:a,isLoading:l}=su({tokens:i}),{data:c,isLoading:f}=CX({tokens:o}),{data:u=1,isLoading:d}=yc({toCurrency:s.symbol}),h=i.length>0&&l||o.length>0&&f||d,v=Mr(t.chainId,n),y=kJ(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),g=()=>{window.open(`${v.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},b=({transfer:p})=>{var w,E,k,$;const x=p.to,T=x.substring(0,10)+"..."+x.substring(p.to.length-4,p.to.length),B=cr((p==null||(w=p.contractInfo)==null?void 0:w.address)||"",Ar),L=B?v.logoURI:p==null||(E=p.contractInfo)==null?void 0:E.logoURI,U=B?v.symbol:(p==null||(k=p.contractInfo)==null?void 0:k.symbol)||"";return P.createElement(P.Fragment,null,($=p.amounts)==null?void 0:$.map((V,N)=>{var C,S,R,M,_,I,F,D;const A=p.contractType==="ERC721"||p.contractType==="ERC1155",j=((C=p.tokenIds)==null?void 0:C[N])||"0",G=(p==null||(S=p.tokenMetadata)==null||(R=S[j])==null?void 0:R.decimals)||0,O=B?v.decimals:(p==null||(M=p.contractInfo)==null?void 0:M.decimals)||0,z=_r(V,A?G:O),H=Aa(z),J=A?c==null||(_=c.find(K=>{var Q,ae;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||"")&&K.token.tokenId===((ae=p.tokenIds)==null?void 0:ae[N])&&K.token.chainId===t.chainId}))==null||(I=_.price)==null?void 0:I.value:a==null||(F=a.find(K=>{var Q;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||Ar)&&K.token.chainId===t.chainId}))==null||(D=F.price)==null?void 0:D.value,X=(parseFloat(z)*(u*(J||0))).toFixed(2);return P.createElement(W,{key:N,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(Mf,{imageUrl:L,size:20}),P.createElement(W,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${H} ${U}`),h?P.createElement(wt,{width:"44px",height:"12px"}):P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},J?`${s.sign}${X}`:""))),P.createElement(X6,{color:"text50",style:{width:"16px"}}),P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(u0,{address:x,style:{width:"20px"}}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},T)))}))};return P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},P.createElement(W,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),P.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},y),P.createElement(q0,{chainId:t.chainId})),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},P.createElement(W,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},P.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),P.createElement(fr,{width:"3",src:v.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((p,w)=>P.createElement(W,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${w}`},P.createElement(b,{transfer:p})))),P.createElement(nt,{onClick:g,width:"full",borderRadius:"md",rightIcon:Foe,label:`View on ${v.blockExplorerName}`}),P.createElement(W,null,P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Complete")),P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),P.createElement(re,{fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),P.createElement(_X,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},VUe=m.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Tn();return P.createElement(W,{gap:"2",alignItems:"center"},P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(W,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:_o,position:"relative",ref:e},P.createElement(u0,{size:"sm",address:r||""}),P.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},yX(r||"")),P.createElement(rB,null))))}),qUe=m.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Qi(),{setOpenWalletModal:n}=V0(),{address:s}=Tn(),{disconnect:i}=rV(),{theme:o}=Na(),a=()=>{t(!1),r({location:"receive"})},l=()=>{t(!1),r({location:"history"})},c=()=>{t(!1),r({location:"settings"})},f=()=>{n(!1),t(!1),i()};return P.createElement(W,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:o==="dark"?"rgba(38, 38, 38, 0.85)":"rgba(217, 217, 217, 0.85)"}},P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2"},P.createElement(u0,{style:{width:"28px"},size:"md",address:s||""}),P.createElement(re,{fontSize:"large",color:"text100",style:{fontWeight:"700"}},yX(s||"")),P.createElement(_X,{buttonVariant:"icon",size:"md",text:s||"",style:{marginLeft:"-16px"}})),P.createElement(va,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:Bf})),P.createElement(W,{gap:"2",marginTop:"3",flexDirection:"column"},P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:Goe,label:"Receive",onClick:a}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:iB,label:"History",onClick:l}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:nB,label:"Settings",onClick:c}),P.createElement(nt,{label:"Sign Out",style:{borderRadius:ge.radii.md},width:"full",leftIcon:sB,onClick:f})))});Xf("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const WUe=Fs({":focus-visible":{boxShadow:"none"}},"searchButton");Zf();const M5=({})=>{const{openWalletModalState:t}=V0(),[e,r]=m.useState(!1),{goBack:n,history:s,setNavigation:i}=Qi(),o=m.useRef(!1);m.useEffect(()=>{t||r(!1)},[t]),m.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[s.length,e]);const a=()=>{r(!0)},l=()=>{n()},c=()=>{i({location:"search"})};return P.createElement(W,{as:Zv.div},P.createElement(UBe,{open:e},P.createElement(zBe,null),P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Bs,paddingTop:"6px"}},s.length>0?P.createElement(va,{onClick:l,icon:Q2,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}):P.createElement(va,{onClick:c,icon:J2,className:WUe,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}),P.createElement(VBe,{asChild:!0},P.createElement(VUe,{onClickAccount:a})),P.createElement(W,{style:{width:"44px"}})),P.createElement(H2,null,e&&P.createElement(qBe,null,P.createElement(WBe,{asChild:!0,side:"bottom",align:"start"},P.createElement(qUe,{setOpenWalletDropdown:r}))))))},eo=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Qi(),s=()=>{r()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Bs,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},n.length>0?P.createElement(va,{onClick:s,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))},iN=t=>{const{location:e}=t;switch(e){case"send-coin":return P.createElement(CUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return P.createElement(EUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return P.createElement(xUe,null);case"history":return P.createElement(kUe,null);case"search":return P.createElement($Ue,null);case"search-view-all":return P.createElement(AUe,{defaultTab:t.params.defaultTab});case"settings":return P.createElement(_Ue,null);case"settings-general":return P.createElement(PUe,null);case"settings-currency":return P.createElement(IUe,null);case"settings-networks":return P.createElement(OUe,null);case"coin-details":return P.createElement(NUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return P.createElement(BUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return P.createElement(jUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return P.createElement(zUe,{transaction:t.params.transaction});case"home":default:return P.createElement(wUe,null)}},HUe=t=>{const{location:e}=t;switch(e){case"search":return P.createElement(eo,{primaryText:"Search wallet"});case"search-view-all":return P.createElement(eo,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return P.createElement(M5,null);case"collectible-details":return P.createElement(M5,null);case"transaction-details":return P.createElement(eo,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return P.createElement(eo,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return P.createElement(M5,null)}},GUe={location:"home"},KUe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(QUe,t))},QUe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState([]),a=i.length>0?i[i.length-1]:GUe,l=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return m.useEffect(()=>{n&&o([])},[n]),P.createElement(GBe,{value:{setOpenWalletModal:s,openWalletModalState:n}},P.createElement(cUe,{value:{setHistory:o,history:i}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:En({maxWidth:"400px",height:"fit-content"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{className:eP,id:"sequence-kit-wallet-content"},HUe(a),l?P.createElement(sU,{className:Z_,style:{paddingTop:Bs,height:"min(800px, 80vh)"}},iN(a)):iN(a))))),t))};var YUe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",JUe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),PX=()=>{var t;return YUe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":JUe()?window.location.origin:"https://withpaper.com"},TX={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},XUe=Object.defineProperty,ZUe=Object.defineProperties,eze=Object.getOwnPropertyDescriptors,oN=Object.getOwnPropertySymbols,tze=Object.prototype.hasOwnProperty,rze=Object.prototype.propertyIsEnumerable,aN=(t,e,r)=>e in t?XUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xn=(t,e)=>{for(var r in e||(e={}))tze.call(e,r)&&aN(t,r,e[r]);if(oN)for(var r of oN(e))rze.call(e,r)&&aN(t,r,e[r]);return t},lN=(t,e)=>ZUe(t,eze(e)),nze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),RX=nze((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.5",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),IX=PX(),sze="/sdk/2022-08-12/checkout-with-card",ize=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(ize||{}),oze=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))(oze||{}),aze=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},lze=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,s=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${s}`)};function cN(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Xn({eventType:e},r),"*")}var cze=RX(),fze=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let s=document.createElement("iframe");if(s.src=r.href,s.id=n,s.allow="payment",s.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),s.onload=a=>{this.onLoad&&this.onLoad(a)},s.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${cze.version}`),!this.elementOrId)return window.addEventListener("message",e(s)),s;let i=this.elementOrId;if(typeof i=="string"){let a=document.getElementById(i);if(!a)throw new Error("Invalid id given");i=a}let o=i.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(s)),i.appendChild(s))}},fN={top:"0px",left:"0px",right:"0px",bottom:"0px"},uze=()=>({main:lN(Xn({},fN),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:lN(Xn({},fN),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),dze=` +`)},EBe=0,xu=[];function SBe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(EBe++)[0],i=m.useState(function(){return iX()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Vie([t.lockRef.current],(t.shards||[]).map(eN),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=ap(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,A=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&A.type==="range")return!1;var T=XD(x,A);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=XD(x,A)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return wBe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!xu.length||xu[xu.length-1]!==i)){var b="deltaY"in g?ZD(g):ap(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&xBe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(eN).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=ap(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,ZD(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,ap(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return xu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wu),document.addEventListener("touchmove",l,wu),document.addEventListener("touchstart",f,wu),function(){xu=xu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,wu),document.removeEventListener("touchmove",l,wu),document.removeEventListener("touchstart",f,wu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:CBe(s)}):null,h?m.createElement(hBe,{gapMode:"margin"}):null)}const kBe=tBe(sX,SBe);var cX=m.forwardRef(function(t,e){return m.createElement(qx,uo({},t,{ref:e,sideCar:kBe}))});cX.classNames=qx.classNames;const $Be=cX,fX="Popover",[uX,AHe]=LJ(fX,[JJ]),Wx=JJ(),[ABe,nu]=uX(fX),_Be=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=Wx(e),l=m.useRef(null),[c,f]=m.useState(!1),[u=!1,d]=UFe({prop:n,defaultProp:s,onChange:i});return m.createElement(NFe,a,m.createElement(ABe,{scope:e,contentId:Vje(),triggerRef:l,open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:o},r))},PBe="PopoverAnchor",TBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(PBe,r),i=Wx(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),m.createElement(tX,tn({},i,n,{ref:e}))}),RBe="PopoverTrigger",IBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(RBe,r),i=Wx(r),o=ru(e,s.triggerRef),a=m.createElement(Qh.button,tn({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vX(s.open)},n,{ref:o,onClick:df(t.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:m.createElement(tX,tn({asChild:!0},i),a)}),dX="PopoverPortal",[OBe,MBe]=uX(dX,{forceMount:void 0}),DBe=t=>{const{__scopePopover:e,forceMount:r,children:n,container:s}=t,i=nu(dX,e);return m.createElement(OBe,{scope:e,forceMount:r},m.createElement(K_,{present:r||i.open},m.createElement(jFe,{asChild:!0,container:s},n)))},Xy="PopoverContent",NBe=m.forwardRef((t,e)=>{const r=MBe(Xy,t.__scopePopover),{forceMount:n=r.forceMount,...s}=t,i=nu(Xy,t.__scopePopover);return m.createElement(K_,{present:n||i.open},i.modal?m.createElement(LBe,tn({},s,{ref:e})):m.createElement(jBe,tn({},s,{ref:e})))}),LBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(null),s=ru(e,n),i=m.useRef(!1);return m.useEffect(()=>{const o=n.current;if(o)return HFe(o)},[]),m.createElement($Be,{as:U_,allowPinchZoom:!0},m.createElement(hX,tn({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:df(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:df(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:df(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),jBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(hX,tn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),hX=m.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,...u}=t,d=nu(Xy,r),h=Wx(r);return Oje(),m.createElement(Mje,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(Tje,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1)},m.createElement(LFe,tn({"data-state":vX(d.open),role:"dialog",id:d.contentId},h,u,{ref:e,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function vX(t){return t?"open":"closed"}const FBe=_Be,BBe=TBe,UBe=IBe,zBe=DBe,VBe=NBe,[qBe,WBe]=tu(),V0=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=qBe();return{setOpenWalletModal:t,openWalletModalState:e}};function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const ja=t=>{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},cr=(t,e)=>t.toLowerCase()===e.toLowerCase(),Q_=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},yX=t=>`0x${Q_((t==null?void 0:t.substring(2))||"",8)}`;var Xa=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Xa||{});const Aa=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Xa.VERY_LARGE:e<1e-10?r=Xa.VERY_TINY:e<1?r=Xa.FRACTION:r=Xa.MIXED;let n,s;switch(r){case Xa.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Xa.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Xa.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",En({notation:n},s)).format(e)},HBe=t=>t.charAt(0).toUpperCase()+t.slice(1),mX=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},m2=t=>/0x[a-fA-F0-9]{40}/.test(t),GBe=t=>t>0?ge.colors.positive:t<0?ge.colors.negative:ge.colors.text50,tN=(t,e)=>{var r;const n=e.find(i=>cr(i.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},Lo=(t,e,r)=>{var n,s;let i=0;const o=e.find(h=>cr(h.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((n=o.price)==null?void 0:n.value)||0;let l=((s=t.contractInfo)==null?void 0:s.decimals)||18;if(t.contractType==="ERC721"||t.contractType==="ERC1155"){var c;l=((c=t.tokenMetadata)==null?void 0:c.decimals)||0}const f=_r(t.balance,l),u=parseFloat(f)*a;return i+=u,`${(i*r).toFixed(2)}`},pX=t=>{const e=[],r=[],n=[];return t.forEach(s=>{s.contractAddress===Ar?e.push(s):s.contractType==="ERC20"?r.push(s):(s.contractType==="ERC721"||s.contractType==="ERC1155")&&n.push(s)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},gX=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},p2=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await ja(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},Y_=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},g2=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{try{const{indexerClient:i}=await ja(e),o=await i.getTokenBalances(En({accountAddress:t,includeMetadata:!0},r?{contractAddress:r}:{}));let a=(o==null?void 0:o.balances)||[];if(n&&a.length>0){const l=await Y_({tokens:a.map(c=>({chainId:c.chainId,contractAddress:c.contractAddress,tokenId:c.tokenID}))});a=a.filter(c=>{const f=l==null?void 0:l.find(u=>cr(u.token.contractAddress,c.contractAddress)&&u.token.chainId===c.chainId);return c.contractType!=="ERC20"||!!f&&f.price!==null})}return s&&a.length>0&&(a=a.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),a}catch(i){return console.error(i),[]}},KBe=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([p2({accountAddress:t,chainId:e}),g2({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},bX=async({accountAddress:t,chainId:e,collectionAddress:r})=>{try{const{indexerClient:n}=await ja(e),s=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(n){return console.error(n),[]}},QBe=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{let o=[];try{if(r.length>0){const b=r.filter(k=>cr(k.contractAddress,Ar)),p=r.filter(k=>!cr(k.contractAddress,Ar)),w={},E={};b.forEach(k=>{w[k.chainId]||(w[k.chainId]=[]),w[k.chainId].push(k)}),p.forEach(k=>{E[k.chainId]||(E[k.chainId]=[]),E[k.chainId].push(k)}),o=(await Promise.all([...Object.keys(w).map(k=>p2({accountAddress:t,chainId:Number(k)})),...Object.keys(E).map(k=>E[Number(k)].map(A=>g2({accountAddress:t,chainId:Number(k),contractAddress:A.contractAddress},{hideUnlistedTokens:n,hideCollectibles:s}))).flat()])).flat()}else o=(await Promise.all([...e.map(b=>p2({accountAddress:t,chainId:b})),...e.map(b=>g2({accountAddress:t,chainId:b},{hideUnlistedTokens:n,hideCollectibles:s}))])).flat();const{nativeTokens:a,erc20Tokens:l,collectibles:c}=pX(o),f=new Promise(async(b,p)=>{if(l.length>0){const w=l.map(k=>({chainId:k.chainId,contractAddress:k.contractAddress})),E=await Y_({tokens:w})||[];b(E)}else b([])}),u=c.map(async b=>await bX({accountAddress:t,chainId:b.chainId,collectionAddress:b.contractAddress})),[d,...h]=await Promise.all([f,...u]),v=l.sort((b,p)=>{var w,E;const k=d.find(N=>cr(N.token.contractAddress,b.contractAddress)),A=d.find(N=>cr(N.token.contractAddress,p.contractAddress)),x=k!=null&&k.price?k.price.value:0,T=A!=null&&A.price?A.price.value:0,B=Number(_r(b.balance,((w=b.contractInfo)==null?void 0:w.decimals)||0)),L=Number(_r(p.balance,((E=p.contractInfo)==null?void 0:E.decimals)||0)),U=B*x;return L*T-U}),y=aLe(h.flat(),10).sort((b,p)=>b.contractAddress.localeCompare(p.contractAddress));return s?[...a.length>0?[a[0]]:[],...v.length>0?v.slice(0,11):[]]:[...a.length>0?[a[0]]:[],...v.length>0?[v[0]]:[],...y.length>0?[...y]:[]]}catch(a){return console.error(a),[]}},YBe=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:s}=await ja(e);return(await s.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},JBe=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},wX=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:s})=>{const{indexerClient:i}=ja(t);return i.getTransactionHistory({includeMetadata:!0,page:s,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},XBe=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(i=>wX({chainId:i,accountAddress:e,page:{page:1}}))])).map(i=>i.transactions).flat().sort((i,o)=>{const a=new Date(i.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),ZBe=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=ja(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},eUe=["chainIds"],tUe=["disabled"],Bo={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},J_=(t,e)=>hi({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=Hx(t,eUe);return(await Promise.all(r.map(i=>KBe(En({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),rUe=t=>hi({queryKey:["collectionBalance",t],queryFn:()=>bX(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),su=t=>{let{disabled:e}=t,r=Hx(t,tUe);return hi({queryKey:["coinPrices",r],queryFn:()=>Y_(r),retry:!0,staleTime:1*Bo.oneMinute,enabled:r.tokens.length>0&&!e})},nUe=(t,e)=>hi({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>QBe(t,e),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),sUe=(t,e)=>hi({queryKey:["coinBalance",t,e],queryFn:()=>cr((t==null?void 0:t.contractAddress)||"",Ar)?p2({accountAddress:t.accountAddress,chainId:t.chainId}).then(s=>s[0]):g2(t,e).then(n=>n[0]),retry:!0,staleTime:1*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),xX=t=>hi({queryKey:["collectibleBalance",t],queryFn:()=>YBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),CX=t=>hi({queryKey:["useCollectiblePrices",t],queryFn:()=>JBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:t.tokens.length>0}),EX=t=>DOe({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>wX(En({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:10*Bo.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),iUe=t=>hi({queryKey:["transactionHistorySummary",t],queryFn:()=>XBe(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),yc=t=>hi({queryKey:["useConversionRate",t],queryFn:()=>ZBe(t),retry:!0,staleTime:60*Bo.oneMinute}),[oUe,aUe]=tu(),Ki=()=>{const{setHistory:t,history:e}=oUe();return{setNavigation:s=>{const i=document.getElementById("sequence-kit-wallet-content"),o=i==null?void 0:i.parentElement;o==null||o.scrollTo(0,0);const a=[...e,s];t(a)},history:e,setHistory:t,goBack:()=>{const s=[...e];s.pop(),t(s)}}},lUe=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],cUe=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],fUe=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],SX=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],uUe=SX[0],Bs="54px",Qi=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Yn=()=>{const{chains:t}=dn(),e=()=>{let c=!0,f=!1,u=uUe,d=t.map(h=>h.id);try{const h=localStorage.getItem(Es.Settings),v=JSON.parse(h||"{}");if((v==null?void 0:v.hideUnlistedTokens)!==void 0&&(c=v==null?void 0:v.hideUnlistedTokens),(v==null?void 0:v.hideCollectibles)!==void 0&&(f=v==null?void 0:v.hideCollectibles),(v==null?void 0:v.fiatCurrency)!==void 0&&(u=v==null?void 0:v.fiatCurrency),(v==null?void 0:v.selectedNetworks)!==void 0){let y=!0;v.selectedNetworks.forEach(g=>{t.find(b=>b.id===g)===void 0&&(y=!1)}),y&&(d=v==null?void 0:v.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:c,hideCollectibles:f,fiatCurrency:u,selectedNetworks:d}},r=e(),[n,s]=m.useState(r);return En({},n,{setFiatCurrency:c=>{const f=e(),u=En({},f,{fiatCurrency:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideCollectibles:c=>{const f=e(),u=En({},f,{hideCollectibles:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideUnlistedTokens:c=>{const f=e(),u=En({},f,{hideUnlistedTokens:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setSelectedNetworks:c=>{const f=e(),u=En({},f,{selectedNetworks:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)}})},dUe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{variant:"large",color:"textInverse100"},"?")),Mf=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(dUe,{size:e}),rN=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:s,priceChangePercentage:i,symbol:o})=>{const{fiatCurrency:a}=Yn(),l=i>0?"+":"";return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},P.createElement(W,{marginBottom:"1"},P.createElement(Mf,{size:36,imageUrl:e})),P.createElement(W,{marginBottom:"3"},P.createElement(W,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),P.createElement(Mf,{size:12,imageUrl:t})),P.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"bold"},`${a.sign}${s}`)),P.createElement(re,{style:{color:GBe(i)}},`${l}${i.toFixed(2)}%`)))},nN=({balance:t})=>{var e,r,n,s,i;const{chains:o=[]}=dn(),{fiatCurrency:a}=Yn(),l=cr(t.contractAddress,Ar),c=Mr(t.chainId,o),{data:f=[],isLoading:u}=su({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:d=1,isLoading:h}=yc({toCurrency:a.symbol});if(u||h)return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(l){const x=Lo(t,f,d),T=tN(t,f),B=_r(t.balance,c.decimals),L=Aa(B);return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:c.logoURI,tokenName:c.name,balance:L,balanceFiat:x,priceChangePercentage:T,symbol:c.symbol})}const y=Lo(t,f,d),g=tN(t,f),b=(e=(r=t.contractInfo)==null?void 0:r.decimals)!=null?e:18,p=_r(t.balance,b),w=Aa(p),E=((n=t.contractInfo)==null?void 0:n.name)||"Unknown",k=((s=t.contractInfo)==null?void 0:s.name)||"TOKEN",A=(i=t.contractInfo)==null?void 0:i.logoURI;return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:A,tokenName:E,balance:w,balanceFiat:y,priceChangePercentage:g,symbol:k})},X_=({imageUrl:t})=>P.createElement(To,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},P.createElement(fr,{style:{height:"100%"},src:t})),hUe=({balance:t})=>{var e;return P.createElement(X_,{imageUrl:t==null||(e=t.tokenMetadata)==null?void 0:e.image})};Xf("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const vUe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),yUe=Fs({height:"76px",backgroundColor:"#909090",animation:`${vUe} 2s ease-in-out infinite`},"skeleton");Zf();const wt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>P.createElement(W,{className:yUe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),mUe=()=>P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},Array(12).fill(null).map((t,e)=>P.createElement(W,{key:e},P.createElement(wt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Xf("packages/wallet/src/shared/styles.css.ts","kit");const _o=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Z_=Fs({"> div":{overflowY:"scroll"}},"scrollbar");Gi(`html:not(.is-apple) ${Z_} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Gi(`html:not(.is-apple) ${Z_} > div:hover::-webkit-scrollbar-thumb`,{background:ge.colors.text50,backgroundClip:"content-box"});const eP=Fs({},"walletContent");Gi(`${eP} + button`,{backgroundColor:"transparent"});Gi(`${eP} + button > svg`,{width:"20px",height:"20px"});Zf();const pUe=()=>{const{address:t}=Tn(),{setNavigation:e}=Ki(),{displayedAssets:r}=ZIe(),{hideUnlistedTokens:n,hideCollectibles:s,selectedNetworks:i}=Yn(),{data:o=[],isLoading:a}=nUe({accountAddress:t||"",chainIds:i,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s});if(a)return P.createElement(mUe,null);const{nativeTokens:l,erc20Tokens:c,collectibles:f}=pX(o),u=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},l.map(d=>P.createElement(W,{key:d.contractAddress,className:_o,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),c.map(d=>P.createElement(W,{className:_o,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),f.map(d=>P.createElement(W,{className:_o,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>u(d)},P.createElement(hUe,{balance:d}))))},gUe=()=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(pUe,null)),bUe=()=>{const{address:t}=Tn(),{chain:e,chains:r=[]}=dn(),[n,s]=m.useState(!1),i=Mr((e==null?void 0:e.id)||1,r);m.useEffect(()=>{n&&setTimeout(()=>{s(!1)},4e3)},[n]);const o=()=>{s(!0)},a=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},P.createElement(W,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},P.createElement(TLe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),P.createElement(W,null,P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),P.createElement(fr,{width:"5",src:i.logoURI,alt:"icon"})),P.createElement(W,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},P.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),P.createElement(W,{gap:"3"},P.createElement(hJ.CopyToClipboard,{text:t||""},P.createElement(it,{onClick:o,leftIcon:Y2,label:n?"Copied!":"Copy"})),P.createElement(it,{onClick:a,leftIcon:Yoe,label:"Share"})),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},P.createElement(re,{variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${i.name} address. Please only send assets on the ${i.name} network.`))))},kX=({imageUrl:t,name:e,decimals:r,balance:n,symbol:s,fiatValue:i,chainId:o,showSquareImage:a})=>{const{chains:l=[]}=dn(),{fiatCurrency:c}=Yn(),f=_r(n,r),u=Aa(f),d=Mr(o,l);return P.createElement(W,{alignItems:"flex-end",justifyContent:"space-between"},P.createElement(W,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?P.createElement(W,{style:{width:"40px"}},P.createElement(X_,{imageUrl:t})):P.createElement(Mf,{imageUrl:t,size:40}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",alignItems:"center",gap:"1"},P.createElement(re,{variant:"medium"},e),P.createElement(Mf,{imageUrl:d.logoURI,size:12})),P.createElement(re,{color:"text50",variant:"normal"}," ",`${u} ${s} available`))),P.createElement(W,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},i&&P.createElement(re,{variant:"normal"},`${c.sign}${i}`)))},wUe=({chainId:t,contractAddress:e})=>{var r,n,s,i,o;const{chains:a=[]}=dn(),l=g4(),{address:c="",connector:f}=Tn(),u=!!(f!=null&&(r=f._wallet)!=null&&r.isSequenceBased),d=l===t,h=!d&&!u,{switchNetwork:v}=nV(),y=m.useRef(null),{setOpenWalletModal:g}=V0(),{fiatCurrency:b}=Yn(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:A}=p4(),{data:x=[],isLoading:T}=J_({accountAddress:c,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),B=Mr(t,a),L=x.find(K=>K.contractAddress===e),{data:U=[],isLoading:V}=su({tokens:[{chainId:t,contractAddress:e}]}),{data:N=1,isLoading:C}=yc({toCurrency:b.symbol});if(T||V||C)return null;const R=cr(e,Ar),M=R?B.decimals:(L==null||(n=L.contractInfo)==null?void 0:n.decimals)||18,_=R?B.name:(L==null||(s=L.contractInfo)==null?void 0:s.name)||"",I=R?B.logoURI:L==null||(i=L.contractInfo)==null?void 0:i.logoURI,F=R?B.symbol:(L==null||(o=L.contractInfo)==null?void 0:o.symbol)||"",D=p===""?"0":p,$=Gd(D,M),j=Lo(En({},L,{balance:$.toString()}),U,N),G=$.gt((L==null?void 0:L.balance)||"0"),O=$.gt(0),q=K=>{const{value:Q}=K.target,ae=mX(Q,M);w(ae)},z=()=>{var K;(K=y.current)==null||K.focus();const Q=_r((L==null?void 0:L.balance)||0,M).toString();w(Q)},H=async()=>{const K=await navigator.clipboard.readText();k(K)},J=()=>{k("")},X=async K=>{!d&&u&&v&&v(t),K.preventDefault();const Q=Gd(D,M);R?A==null||A.sendTransaction({to:E,value:BigInt(Q.toString())}).catch(ae=>console.error("User rejected transaction",ae)):A==null||A.sendTransaction({to:L==null?void 0:L.contractAddress,data:new en(cUe).encodeFunctionData("transfer",[E,Q.toHexString()])}).catch(ae=>console.error("User rejected transaction",ae)),g(!1)};return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:X},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:I,decimals:M,name:_,symbol:F,balance:(L==null?void 0:L.balance)||"0",fiatValue:Lo(L,U,N),chainId:t}),P.createElement(iU,{ref:y,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:q,controls:P.createElement(P.Fragment,null,P.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${j}`),P.createElement(it,{size:"xs",shape:"square",label:"Max",onClick:z,"data-id":"maxCoin",flexShrink:"0"}),P.createElement(re,{fontSize:"xlarge",fontWeight:"bold"},F))}),G&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:J,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:K=>k(K.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(it,{size:"xs",shape:"square",label:"Paste",onClick:H,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),h&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(it,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:d,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(it,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!O||!m2(E)||G||!d&&!u,label:"Send",rightIcon:Co,style:{height:"52px",borderRadius:ge.radii.md}}))},xUe=({chainId:t,contractAddress:e,tokenId:r})=>{var n,s,i,o,a;const{chains:l=[]}=dn(),c=g4(),{address:f="",connector:u}=Tn(),d=!!(u!=null&&(n=u._wallet)!=null&&n.isSequenceBased),h=c===t,v=!h&&!d,{switchNetwork:y}=nV(),g=m.useRef(null),{setOpenWalletModal:b}=V0(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:A}=p4(),{data:x,isLoading:T}=xX({accountAddress:f,chainId:t,collectionAddress:e,tokenId:r}),B=Mr(t,l);if(T)return null;const U=(x==null||(s=x.tokenMetadata)==null?void 0:s.decimals)||0,V=(x==null||(i=x.tokenMetadata)==null?void 0:i.name)||"Unknown",N=(x==null||(o=x.tokenMetadata)==null?void 0:o.image)||(x==null||(a=x.contractInfo)==null?void 0:a.logoURI)||"",C=p===""?"0":p,S=Gd(C,U),R=S.gt((x==null?void 0:x.balance)||"0"),M=S.gt(0),_=H=>{const{value:J}=H.target,X=mX(J,U);w(X)},I=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)-1,X=Math.max(J,0).toString();w(X)},F=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)+1,X=Number(_r((x==null?void 0:x.balance)||0,U)),K=Math.min(J,X).toString();w(K)},D=()=>{var H;(H=g.current)==null||H.focus();const J=_r((x==null?void 0:x.balance)||0,U).toString();w(J)},$=async()=>{const H=await navigator.clipboard.readText();k(H)},j=()=>{k("")},G=async H=>{H.preventDefault(),!h&&d&&y&&y(t);const J=Gd(C,U),{contractType:X}=x;switch(X){case"ERC721":A==null||A.sendTransaction({to:x.contractAddress,data:new en(fUe).encodeFunctionData("safeTransferFrom",[f,E,r])}).catch(K=>console.error("User rejected transaction",K));break;case"ERC1155":default:A==null||A.sendTransaction({to:x.contractAddress,data:new en(lUe).encodeFunctionData("safeBatchTransferFrom",[f,E,[r],[J.toHexString()],[]])}).catch(K=>console.error("User rejected transaction",K))}b(!1)},O=_r((x==null?void 0:x.balance)||0,U).toString(),q=Number(p)===0,z=Number(p)>=Number(O);return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:G},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:N,showSquareImage:!0,decimals:U,name:V,symbol:"",balance:(x==null?void 0:x.balance)||"0",chainId:t}),P.createElement(iU,{ref:g,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:_,controls:P.createElement(W,{gap:"2"},P.createElement(it,{disabled:q,size:"xs",onClick:I,leftIcon:Zoe}),P.createElement(it,{disabled:z,size:"xs",onClick:F,leftIcon:$oe}),P.createElement(it,{size:"xs",shape:"square",label:"Max",onClick:D,"data-id":"maxCoin",flexShrink:"0"}))}),R&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:j,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:H=>k(H.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(it,{size:"xs",shape:"square",label:"Paste",onClick:$,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),v&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(it,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>y&&y(t),disabled:h,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(it,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!M||!m2(E)||R||!h&&!d,label:"Send",rightIcon:Co,style:{height:"52px",borderRadius:ge.radii.md}}))},CUe=({transaction:t})=>{var e;const{chains:r=[]}=dn(),{fiatCurrency:n}=Yn(),{setNavigation:s}=Ki(),i=()=>{s({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(p=>{const w=p.contractAddress;o.includes(w)||o.push(w)});const{data:a=[],isLoading:l}=su({tokens:o.map(p=>({contractAddress:p,chainId:t.chainId}))}),{data:c=1,isLoading:f}=yc({toCurrency:n.symbol}),u=l||f,{transfers:d}=t,h=Mr(t.chainId,r),v=p=>{switch(p){case Ei.SEND:return P.createElement(X6,{style:{transform:"rotate(270deg)",width:"16px"}});case Ei.RECEIVE:return P.createElement(X6,{style:{transform:"rotate(90deg)",width:"16px"}});case Ei.UNKNOWN:default:return P.createElement(iB,{style:{width:"14px"}})}},y=p=>{switch(p){case Ei.SEND:return"Sent";case Ei.RECEIVE:return"Received";case Ei.UNKNOWN:default:return"Transacted"}},g=(p,w,E)=>{let k="";E===Ei.SEND?k="-":E===Ei.RECEIVE&&(k="+");let A="text50";return E===Ei.SEND?A=ge.colors.negative:E===Ei.RECEIVE&&(A=ge.colors.positive),P.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:A}},`${k}${p} ${w}`)},b=({transfer:p,isFirstItem:w})=>{const{amounts:E}=p,k=kJ(t.timestamp).format("MMM DD, YYYY");return P.createElement(W,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},v(p.transferType),P.createElement(re,{fontWeight:"medium",fontSize:"normal"},y(p.transferType)),P.createElement(fr,{src:h.logoURI,width:"3"})),w&&P.createElement(W,null,P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},k))),E.map((A,x)=>{var T,B,L,U,V,N,C;const S=Mr(t.chainId,r),R=cr(p.contractAddress,Ar),M=((T=p.contractInfo)==null?void 0:T.type)==="ERC721"||((B=p.contractInfo)==null?void 0:B.type)==="ERC1155";let _;const I=(L=p.tokenIds)==null?void 0:L[x];if(M&&I){var F,D;_=((F=p.tokenMetadata)==null||(D=F[I])==null?void 0:D.decimals)||0}else{var $;_=R?S.decimals:($=p.contractInfo)==null?void 0:$.decimals}const j=_r(A,_),G=R?S.symbol:((U=p.contractInfo)==null?void 0:U.symbol)||"",O=R?S.logoURI:(V=p.contractInfo)==null?void 0:V.logoURI,q=(N=a.find(z=>cr(z.token.contractAddress,p.contractAddress)))==null||(C=N.price)==null?void 0:C.value;return P.createElement(W,{key:x,flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},O&&P.createElement(fr,{src:O,width:"5",alt:"token logo"}),g(Aa(j),G,p.transferType)),u&&P.createElement(wt,{width:"35px",height:"20px"}),q&&P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(j)*q*c).toFixed(2)}`))}))};return P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:_o,onClick:()=>i()},d==null?void 0:d.map((p,w)=>P.createElement(W,{key:`${t.txnHash}-${w}`,width:"full"},b({transfer:p,isFirstItem:w===0}))))},tP=()=>{const t=()=>P.createElement(W,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"65px",height:"20px"}),P.createElement(wt,{width:"75px",height:"17px"})),P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"120px",height:"20px"}),P.createElement(wt,{width:"35px",height:"17px"})));return P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(wt,{width:"70px",height:"17px"}),P.createElement(W,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>P.createElement(W,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},rP=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],s=m.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),l=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),c=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const v=new Date(h.timestamp).getTime();v>a?d.today.push(h):v>l?d.yesterday.push(h):v>c?d.week.push(h):v>f?d.month.push(h):v>u?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(tP,null));const i=({label:a})=>P.createElement(W,null,P.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>P.createElement(W,{flexDirection:"column",gap:"2"},a.map((l,c)=>P.createElement(W,{key:`${l.txnHash}-${c}`,flexDirection:"column",gap:"2"},P.createElement(CUe,{transaction:l}))));return P.createElement(W,{flexDirection:"column",gap:"5"},n.map(a=>{const l=s[a.id];return l.length===0?null:P.createElement(W,{key:a.id,flexDirection:"column",gap:"3"},P.createElement(i,{label:a.label}),P.createElement(o,{transactions:l}))}),t.length===0&&P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(i,{label:"History"}),P.createElement(re,null,"No Recent Transaction History Found")),r&&P.createElement(W,{margin:"4",alignItems:"center",justifyContent:"center"},P.createElement(I$,null)))},EUe=()=>{const{selectedNetworks:t}=Yn(),{address:e}=Tn(),{data:r=[],isLoading:n}=iUe({accountAddress:e||"",chainIds:t});return P.createElement(W,null,P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(rP,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},b2=({balance:t})=>{var e,r;const{chains:n=[]}=dn(),{setNavigation:s}=Ki(),i=cr(t.contractAddress,Ar),o=Mr(t.chainId,n),a=i?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,l=i?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",c=()=>{var u,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=i?o.decimals:t==null||(u=t.contractInfo)==null?void 0:u.decimals,v=_r(t.balance,h||0),y=Aa(v),g=i?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${y} ${g}`},f=()=>{const u=t.contractType==="ERC721"||t.contractType==="ERC1155";s(u?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return P.createElement(W,{key:t.contractAddress,onClick:f,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(W,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(Mf,{imageUrl:a,size:30}),P.createElement(W,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},l),P.createElement(fr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},P.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},c()),P.createElement(Co,{color:"text50"})))},sN=({toLocation:t,label:e})=>{const{setNavigation:r}=Ki(),n=()=>{r(t)};return P.createElement(W,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),P.createElement(Co,{color:"text50",size:"sm"})))},SUe=()=>{const{chains:t=[]}=dn(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Yn(),[s,i]=m.useState(""),{address:o}=Tn(),{data:a,isLoading:l}=J_({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),c=(a==null?void 0:a.filter(L=>L.contractType==="ERC20"||cr(L.contractAddress,Ar)))||[],{data:f=[],isLoading:u}=su({tokens:c.map(L=>({chainId:L.chainId,contractAddress:L.contractAddress}))}),{data:d=1,isLoading:h}=yc({toCurrency:e.symbol}),v=c.sort((L,U)=>Number(Lo(U,f,d))-Number(Lo(L,f,d))),g=((a==null?void 0:a.filter(L=>L.contractType==="ERC721"||L.contractType==="ERC1155"))||[]).sort((L,U)=>Number(U.balance)-Number(L.balance)),b=l||u||h,p=g.map((L,U)=>{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}),w=v.map((L,U)=>{if(cr(L.contractAddress,Ar)){const N=Mr(L.chainId,t);return{index:U,name:N.name}}else{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}}),E=v.length,k=g.length,A=new Ea(w,{keys:["name"]}),x=new Ea(p,{keys:["name"]}),T=(s===""?w:A.search(s).map(L=>L.item)).slice(0,5),B=(s===""?p:x.search(s).map(L=>L.item)).slice(0,5);return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:s,onChange:L=>i(L.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${k})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):B.length===0?P.createElement(re,null,"No collections found"):B.map(L=>{const U=g[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${E})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):T.length===0?P.createElement(re,null,"No coins found"):T.map(L=>{const U=v[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})))},kUe=({defaultTab:t})=>{const{chains:e=[]}=dn(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:s}=Yn(),[i,o]=m.useState(""),[a,l]=m.useState(t);m.useEffect(()=>{o("")},[a]);const{address:c}=Tn(),{data:f,isLoading:u}=J_({accountAddress:c||"",chainIds:s},{hideUnlistedTokens:n}),d=(f==null?void 0:f.filter(S=>S.contractType==="ERC20"||cr(S.contractAddress,Ar)))||[],{data:h=[],isLoading:v}=su({tokens:d.map(S=>({chainId:S.chainId,contractAddress:S.contractAddress}))}),{data:y=1,isLoading:g}=yc({toCurrency:r.symbol}),b=d.sort((S,R)=>Number(Lo(R,h,y))-Number(Lo(S,h,y))),w=((f==null?void 0:f.filter(S=>S.contractType==="ERC721"||S.contractType==="ERC1155"))||[]).sort((S,R)=>Number(R.balance)-Number(S.balance)),E=b.length,k=w.length,A=u||v||g,x=w.map((S,R)=>{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}),T=b.map((S,R)=>{if(cr(S.contractAddress,Ar)){const _=Mr(S.chainId,e);return{index:R,name:_.name}}else{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}}),B=new Ea(T,{keys:["name"]}),L=new Ea(x,{keys:["name"]}),U=i===""?T:B.search(i).map(S=>S.item),V=i===""?x:L.search(i).map(S=>S.item),N=()=>P.createElement(wt,{width:"360px",height:"48px"}),C=()=>P.createElement(P.Fragment,null,Array(8).fill(null).map((S,R)=>P.createElement(wt,{key:R,width:"full",height:"32px"})));return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:i,onChange:S=>o(S.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full"},P.createElement(zue,{value:a,onValueChange:S=>l(S)},P.createElement(W,{marginBottom:"5"},!A&&P.createElement(Uue,{value:a,tabs:[{label:`Collections (${k})`,value:"collections"},{label:`Coins (${E})`,value:"coins"}]}),A&&P.createElement(N,null)),P.createElement(sR,{value:"collections"},P.createElement(W,{flexDirection:"column",gap:"3"},A&&P.createElement(C,null),!A&&V.length===0&&P.createElement(re,null,"No Collectibles Found"),!A&&V.length>0&&V.map(S=>{const R=w[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))),P.createElement(sR,{value:"coins"},P.createElement(W,{flexDirection:"column",gap:"3"},A&&P.createElement(C,null),!A&&b.length==0&&P.createElement(re,null,"No Coins Found"),!A&&U.length>0&&U.map(S=>{const R=b[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))))))},$Ue=()=>{const{setNavigation:t}=Ki(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(it,{onClick:e,leftIcon:nB,rightIcon:Co,width:"full",label:"General",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(it,{onClick:r,leftIcon:Doe,rightIcon:Co,width:"full",label:"Currency",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(it,{onClick:n,leftIcon:Voe,rightIcon:Co,width:"full",label:"Networks",style:{height:"52px",borderRadius:ge.radii.md}}))))},AUe=()=>{Na();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=Yn(),s=()=>{e(!t)},i=()=>{n(!r)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide unlisted tokens"),P.createElement(nR,{checked:t,onCheckedChange:s})),P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide collectibles"),P.createElement(nR,{checked:r,onCheckedChange:i}))))},_Ue=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return P.createElement(W,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ge.radii.circle,width:"20px",height:"20px"}},P.createElement(W,{as:Zv.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":ge.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&P.createElement(mh,{color:"white",style:{width:"14px",height:"14px"}})))},PUe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],$X=t=>{const{value:e,selected:r,children:n,disabled:s,onClick:i,className:o,hideIndicator:a,squareIndicator:l=!1}=t,c=Hx(t,PUe);return P.createElement(To,En({as:"button",clickable:!0,className:gje(o),disabled:s,onClick:()=>i(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},c),n,!a&&P.createElement(_Ue,{selected:r,squareIndicator:l}))},TUe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Yn();return P.createElement(W,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2"},SX.map(r=>P.createElement($X,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},P.createElement(W,{gap:"2",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),P.createElement(re,{color:"text50"},r.name.message))))))},RUe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Yn(),{chains:r=[]}=dn(),n=s=>{if(t.includes(s)){if(t.length===1)return;e(t.filter(i=>i!==s))}else e([...t,s])};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(re,{variant:"small",color:"text50"},"Networks"),P.createElement(W,{flexDirection:"column",gap:"2"},r.map(s=>{const i=Mr(s.id,r);return P.createElement($X,{disabled:t.length===1&&t.includes(s.id),key:s.id,selected:t.includes(s.id),onClick:()=>n(s.id),value:s.id,squareIndicator:!0},P.createElement(W,{gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{width:"3",height:"3",src:i.logoURI,alt:"network"}),P.createElement(re,{color:"text100",variant:"small"},i.name)))}))))},q0=({chainId:t})=>{const{chains:e=[]}=dn(),{network:r}=ja(t),n=Mr(t,e),s=BIe(t),i=UIe(t);return P.createElement(W,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:i},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},P.createElement(fr,{style:{width:"14px"},src:n.logoURI}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:s}},HBe(r.name)))},IUe=({chainId:t})=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{height:"24px",width:"70px"}),P.createElement(q0,{chainId:t})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"150px",height:"36px"}),P.createElement(wt,{width:"33px",height:"17px"}))),P.createElement(it,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:X2,label:"Send",disabled:!0,onClick:()=>{}}),P.createElement(W,null,P.createElement(tP,null)))),OUe=(t,e)=>{var r;const[n,s]=m.useState(null),i=m.useMemo(()=>new IntersectionObserver(([o])=>s(o),e),[]);return m.useEffect(()=>(t.current&&i.observe(t.current),()=>{t.current&&i.disconnect()}),[t.current,i]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},AX=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[s,i]=m.useState(0),[o,a]=m.useState(!1),l=m.useRef(null),c=OUe(l);m.useEffect(()=>{c&&r&&!o&&f()},[c]);const f=async()=>{a(!0),await e(s),i(u=>u+1),a(!1)};return P.createElement(P.Fragment,null,n,P.createElement("div",{ref:l}))},MUe=({contractAddress:t,chainId:e})=>{var r,n,s,i;const{chains:o=[]}=dn(),{setNavigation:a}=Ki(),{fiatCurrency:l,hideUnlistedTokens:c}=Yn(),{address:f}=Tn(),{data:u,isLoading:d,fetchNextPage:h,hasNextPage:v,isFetchingNextPage:y}=EX({chainId:e,accountAddress:f||"",contractAddress:t}),g=gX(u),{data:b,isLoading:p}=sUe({accountAddress:f||"",contractAddress:t,chainId:e},{hideUnlistedTokens:c}),{data:w,isLoading:E}=su({tokens:[{chainId:e,contractAddress:t}]}),{data:k=1,isLoading:A}=yc({toCurrency:l.symbol});if(p||E||A)return P.createElement(IUe,{chainId:e});const T=cr(t,Ar),B=T?Mr(e,o).logoURI:b==null||(r=b.contractInfo)==null?void 0:r.logoURI,L=T?Mr(e,o).symbol:b==null||(n=b.contractInfo)==null?void 0:n.symbol,U=T?Mr(e,o).name:b==null||(s=b.contractInfo)==null?void 0:s.name,V=T?Mr(e,o).decimals:b==null||(i=b.contractInfo)==null?void 0:i.decimals,N=_r((b==null?void 0:b.balance)||"0",V),C=Aa(N),S=b?Lo(b,w||[],k):"0",R=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(fr,{width:"8",src:B,alt:"logo"}),P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},U),P.createElement(q0,{chainId:e})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${C} ${L}`),P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${l.sign}${S}`))),P.createElement(it,{width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:R}),P.createElement(W,null,P.createElement(AX,{onLoad:()=>h(),hasMore:v},P.createElement(rP,{transactions:g,isLoading:d,isFetchingNextPage:y})))))},DUe=({chainId:t})=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{width:"100px",height:"24px"}),P.createElement(q0,{chainId:t}),P.createElement(wt,{width:"142px",height:"17px"})),P.createElement(W,{width:"full"},P.createElement(wt,{width:"168px",height:"20px"}),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>P.createElement(wt,{width:"full",aspectRatio:"1/1"}))))),NUe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Ki(),{address:s}=Tn(),{data:i,isLoading:o}=rUe({chainId:t,accountAddress:s||"",collectionAddress:e}),a=i==null||(r=i[0])==null?void 0:r.contractInfo,l=a==null?void 0:a.logoURI;if(o)return P.createElement(DUe,{chainId:t});const c=f=>{n&&n({location:"collectible-details",params:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenID}})};return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(Mf,{imageUrl:l,size:32}),P.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),P.createElement(q0,{chainId:t}),P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(i==null?void 0:i.length)||0} Unique Collectibles`)),P.createElement(W,{width:"full"},P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(i==null?void 0:i.length)||0})`),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},i==null?void 0:i.map(f=>{var u,d,h;const v=f.balance,y=(f==null||(u=f.tokenMetadata)==null?void 0:u.decimals)||0,g=Aa(_r(v,y));return P.createElement(W,{key:`${f.contractAddress}-${f.tokenID}`,onClick:()=>c(f),className:_o},P.createElement(W,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},P.createElement(fr,{style:{height:"100%"},src:(d=f.tokenMetadata)==null?void 0:d.image})),P.createElement(W,null,P.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=f.tokenMetadata)==null?void 0:h.name}`)),P.createElement(W,null,P.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},g," Owned")))}))))},LUe=()=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"120px",height:"30px"}),P.createElement(wt,{width:"140px",height:"40px"})),P.createElement(W,null,P.createElement(wt,{width:"347px",height:"347px"})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"44px",height:"36px"}),P.createElement(wt,{width:"34px",height:"17px"}))),P.createElement(it,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:()=>{}})),P.createElement(W,null,P.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),P.createElement(tP,null)))),jUe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,s,i,o,a,l;const{chains:c=[]}=dn(),{address:f}=Tn(),{fiatCurrency:u}=Yn(),{setNavigation:d}=Ki(),{data:h,isLoading:v,fetchNextPage:y,hasNextPage:g,isFetchingNextPage:b}=EX({chainId:e,accountAddress:f||"",contractAddress:t,tokenId:r}),p=gX(h),{data:w,isLoading:E}=xX({accountAddress:f||"",collectionAddress:t,chainId:e,tokenId:r}),{data:k,isLoading:A}=CX({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:x=1,isLoading:T}=yc({toCurrency:u.symbol});if(E||A||T)return P.createElement(LUe,null);const L=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},U=Mr(e,c),V=w==null||(n=w.contractInfo)==null?void 0:n.logoURI,N=(w==null||(s=w.contractInfo)==null?void 0:s.name)||"Unknown Collection",C=(w==null||(i=w.tokenMetadata)==null?void 0:i.decimals)||0,S=(w==null?void 0:w.balance)||"0",R=_r(S,C),M=Aa(Number(R)),_=w?Lo(w,k||[],x):"0";return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{borderRadius:"circle",width:"8",src:V,alt:"collection logo",style:{objectFit:"cover"}}),P.createElement(W,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"small"},N),P.createElement(fr,{width:"3",src:U.logoURI,alt:"collection logo"}))),P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(w==null||(o=w.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),P.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),P.createElement(W,null,P.createElement(X_,{imageUrl:w==null||(a=w.tokenMetadata)==null?void 0:a.image})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},M),k&&((l=k[0].price)==null?void 0:l.value)&&P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${u.symbol} ${_}`))),P.createElement(it,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:L})),P.createElement(W,null,P.createElement(AX,{onLoad:()=>y(),hasMore:g},P.createElement(rP,{transactions:p,isLoading:v,isFetchingNextPage:b})))))},FUe=["buttonVariant","text","size"],_X=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,s=Hx(t,FUe),[i,o]=m.useState(!1);m.useEffect(()=>{i&&setTimeout(()=>{o(!1)},4e3)},[i]);const a=()=>{o(!0)},l=i?"Copied!":"Copy",c=e==="icon"?"rgba(0,0,0,0)":ge.colors.buttonGlass;return P.createElement(hJ.CopyToClipboard,{text:r,onCopy:a},P.createElement(va,En({size:n,icon:i?mh:Y2},s,{style:En({background:c},t==null?void 0:t.style),label:e==="with-label"?l:void 0})))},BUe=({transaction:t})=>{var e,r;const{chains:n=[]}=dn(),{fiatCurrency:s}=Yn(),i=[],o=[];(e=t.transfers)==null||e.forEach(p=>{var w,E;if(((w=p.contractInfo)==null?void 0:w.type)==="ERC721"||((E=p.contractInfo)==null?void 0:E.type)==="ERC1155"){var k;(k=p.tokenIds)==null||k.forEach(x=>{if(!o.find(L=>{var U;return L.chainId===t.chainId&&cr(L.contractAddress,((U=p.contractInfo)==null?void 0:U.address)||"")&&L.tokenId===x})){var B;o.push({chainId:t.chainId,contractAddress:((B=p.contractInfo)==null?void 0:B.address)||"",tokenId:x})}})}else{var A;const x=(p==null||(A=p.contractInfo)==null?void 0:A.address)||Ar;i.find(B=>B.chainId===t.chainId&&cr(B.contractAddress,x))||i.push({chainId:t.chainId,contractAddress:x})}});const{data:a,isLoading:l}=su({tokens:i}),{data:c,isLoading:f}=CX({tokens:o}),{data:u=1,isLoading:d}=yc({toCurrency:s.symbol}),h=i.length>0&&l||o.length>0&&f||d,v=Mr(t.chainId,n),y=kJ(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),g=()=>{window.open(`${v.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},b=({transfer:p})=>{var w,E,k,A;const x=p.to,T=x.substring(0,10)+"..."+x.substring(p.to.length-4,p.to.length),B=cr((p==null||(w=p.contractInfo)==null?void 0:w.address)||"",Ar),L=B?v.logoURI:p==null||(E=p.contractInfo)==null?void 0:E.logoURI,U=B?v.symbol:(p==null||(k=p.contractInfo)==null?void 0:k.symbol)||"";return P.createElement(P.Fragment,null,(A=p.amounts)==null?void 0:A.map((V,N)=>{var C,S,R,M,_,I,F,D;const $=p.contractType==="ERC721"||p.contractType==="ERC1155",j=((C=p.tokenIds)==null?void 0:C[N])||"0",G=(p==null||(S=p.tokenMetadata)==null||(R=S[j])==null?void 0:R.decimals)||0,O=B?v.decimals:(p==null||(M=p.contractInfo)==null?void 0:M.decimals)||0,z=_r(V,$?G:O),H=Aa(z),J=$?c==null||(_=c.find(K=>{var Q,ae;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||"")&&K.token.tokenId===((ae=p.tokenIds)==null?void 0:ae[N])&&K.token.chainId===t.chainId}))==null||(I=_.price)==null?void 0:I.value:a==null||(F=a.find(K=>{var Q;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||Ar)&&K.token.chainId===t.chainId}))==null||(D=F.price)==null?void 0:D.value,X=(parseFloat(z)*(u*(J||0))).toFixed(2);return P.createElement(W,{key:N,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(Mf,{imageUrl:L,size:20}),P.createElement(W,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${H} ${U}`),h?P.createElement(wt,{width:"44px",height:"12px"}):P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},J?`${s.sign}${X}`:""))),P.createElement(X6,{color:"text50",style:{width:"16px"}}),P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(u0,{address:x,style:{width:"20px"}}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},T)))}))};return P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},P.createElement(W,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),P.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},y),P.createElement(q0,{chainId:t.chainId})),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},P.createElement(W,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},P.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),P.createElement(fr,{width:"3",src:v.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((p,w)=>P.createElement(W,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${w}`},P.createElement(b,{transfer:p})))),P.createElement(it,{onClick:g,width:"full",borderRadius:"md",rightIcon:Foe,label:`View on ${v.blockExplorerName}`}),P.createElement(W,null,P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Complete")),P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),P.createElement(re,{fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),P.createElement(_X,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},UUe=m.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Tn();return P.createElement(W,{gap:"2",alignItems:"center"},P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(W,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:_o,position:"relative",ref:e},P.createElement(u0,{size:"sm",address:r||""}),P.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},yX(r||"")),P.createElement(rB,null))))}),zUe=m.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Ki(),{setOpenWalletModal:n}=V0(),{address:s}=Tn(),{disconnect:i}=rV(),{theme:o}=Na(),a=()=>{t(!1),r({location:"receive"})},l=()=>{t(!1),r({location:"history"})},c=()=>{t(!1),r({location:"settings"})},f=()=>{n(!1),t(!1),i()};return P.createElement(W,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:o==="dark"?"rgba(38, 38, 38, 0.85)":"rgba(217, 217, 217, 0.85)"}},P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2"},P.createElement(u0,{style:{width:"28px"},size:"md",address:s||""}),P.createElement(re,{fontSize:"large",color:"text100",style:{fontWeight:"700"}},yX(s||"")),P.createElement(_X,{buttonVariant:"icon",size:"md",text:s||"",style:{marginLeft:"-16px"}})),P.createElement(va,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:Bf})),P.createElement(W,{gap:"2",marginTop:"3",flexDirection:"column"},P.createElement(it,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:Woe,label:"Receive",onClick:a}),P.createElement(it,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:iB,label:"History",onClick:l}),P.createElement(it,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:nB,label:"Settings",onClick:c}),P.createElement(it,{label:"Sign Out",style:{borderRadius:ge.radii.md},width:"full",leftIcon:sB,onClick:f})))});Xf("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const VUe=Fs({":focus-visible":{boxShadow:"none"}},"searchButton");Zf();const M5=({})=>{const{openWalletModalState:t}=V0(),[e,r]=m.useState(!1),{goBack:n,history:s,setNavigation:i}=Ki(),o=m.useRef(!1);m.useEffect(()=>{t||r(!1)},[t]),m.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[s.length,e]);const a=()=>{r(!0)},l=()=>{n()},c=()=>{i({location:"search"})};return P.createElement(W,{as:Zv.div},P.createElement(FBe,{open:e},P.createElement(BBe,null),P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Bs,paddingTop:"6px"}},s.length>0?P.createElement(va,{onClick:l,icon:Q2,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}):P.createElement(va,{onClick:c,icon:J2,className:VUe,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}),P.createElement(UBe,{asChild:!0},P.createElement(UUe,{onClickAccount:a})),P.createElement(W,{style:{width:"44px"}})),P.createElement(H2,null,e&&P.createElement(zBe,null,P.createElement(VBe,{asChild:!0,side:"bottom",align:"start"},P.createElement(zUe,{setOpenWalletDropdown:r}))))))},Zi=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Ki(),s=()=>{r()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Bs,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},n.length>0?P.createElement(va,{onClick:s,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))},iN=t=>{const{location:e}=t;switch(e){case"send-coin":return P.createElement(wUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return P.createElement(xUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return P.createElement(bUe,null);case"history":return P.createElement(EUe,null);case"search":return P.createElement(SUe,null);case"search-view-all":return P.createElement(kUe,{defaultTab:t.params.defaultTab});case"settings":return P.createElement($Ue,null);case"settings-general":return P.createElement(AUe,null);case"settings-currency":return P.createElement(TUe,null);case"settings-networks":return P.createElement(RUe,null);case"coin-details":return P.createElement(MUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return P.createElement(jUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return P.createElement(NUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return P.createElement(BUe,{transaction:t.params.transaction});case"home":default:return P.createElement(gUe,null)}},qUe=t=>{const{location:e}=t;switch(e){case"search":return P.createElement(Zi,{primaryText:"Search wallet"});case"search-view-all":return P.createElement(Zi,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return P.createElement(M5,null);case"collectible-details":return P.createElement(M5,null);case"transaction-details":return P.createElement(Zi,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return P.createElement(Zi,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return P.createElement(M5,null)}},WUe={location:"home"},HUe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(GUe,t))},GUe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState([]),a=i.length>0?i[i.length-1]:WUe,l=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return m.useEffect(()=>{n&&o([])},[n]),P.createElement(WBe,{value:{setOpenWalletModal:s,openWalletModalState:n}},P.createElement(aUe,{value:{setHistory:o,history:i}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:En({maxWidth:"400px",height:"fit-content"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{className:eP,id:"sequence-kit-wallet-content"},qUe(a),l?P.createElement(sU,{className:Z_,style:{paddingTop:Bs,height:"min(800px, 80vh)"}},iN(a)):iN(a))))),t))};var KUe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",QUe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),PX=()=>{var t;return KUe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":QUe()?window.location.origin:"https://withpaper.com"},TX={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},YUe=Object.defineProperty,JUe=Object.defineProperties,XUe=Object.getOwnPropertyDescriptors,oN=Object.getOwnPropertySymbols,ZUe=Object.prototype.hasOwnProperty,eze=Object.prototype.propertyIsEnumerable,aN=(t,e,r)=>e in t?YUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xn=(t,e)=>{for(var r in e||(e={}))ZUe.call(e,r)&&aN(t,r,e[r]);if(oN)for(var r of oN(e))eze.call(e,r)&&aN(t,r,e[r]);return t},lN=(t,e)=>JUe(t,XUe(e)),tze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),RX=tze((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.5",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),IX=PX(),rze="/sdk/2022-08-12/checkout-with-card",nze=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(nze||{}),sze=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))(sze||{}),ize=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},oze=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,s=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${s}`)};function cN(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Xn({eventType:e},r),"*")}var aze=RX(),lze=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let s=document.createElement("iframe");if(s.src=r.href,s.id=n,s.allow="payment",s.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),s.onload=a=>{this.onLoad&&this.onLoad(a)},s.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${aze.version}`),!this.elementOrId)return window.addEventListener("message",e(s)),s;let i=this.elementOrId;if(typeof i=="string"){let a=document.getElementById(i);if(!a)throw new Error("Invalid id given");i=a}let o=i.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(s)),i.appendChild(s))}},fN={top:"0px",left:"0px",right:"0px",bottom:"0px"},cze=()=>({main:lN(Xn({},fN),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:lN(Xn({},fN),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),fze=` @keyframes pew-modal-slideIn { from {opacity: 0; transform: translate3d(0, 20px, 0);} to {opacity: 1; transform: translate3d(0, 0, 0);} @@ -364,54 +364,54 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val @keyframes spin { to { transform: rotate(360deg); } } -`,_1="paper-js-sdk-modal",hze=class{constructor(t,e){this.styles=uze(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=_1,this.overlay=document.createElement("div"),this.overlay.id=`${_1}-overlay`,this.body=document.createElement("div"),this.body.id=`${_1}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${_1}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${_1}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=dze,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=Xn(Xn({},this.styles.body),t.body||{}),this.styles.spinner=Xn(Xn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Xn(Xn({},this.styles.overlay),t.overlay||{}),this.styles.main=Xn(Xn({},this.styles.main),t.main||{}),this.styles.iframe=Xn(Xn({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function vze({sdkClientSecret:t,appName:e,options:r=Xn({},TX),locale:n,configs:s}){let i=new URL(sze,IX),o=t;if(!o&&s&&(o=btoa(JSON.stringify(s))),!o){let l="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",c=PX();return new URL(l,c)}let a=new aze(i);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function yze({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:s,onPriceUpdate:i}){let o;return a=>{if(!a.origin.startsWith(IX))return;let{data:l}=a;switch(l.eventType){case"checkoutWithCardError":e&&e({code:l.code,error:l.error});break;case"paymentSuccess":n&&n({transactionId:l.id,id:l.id}),l.postToIframe&&cN(t,l.eventType,l);break;case"reviewComplete":r&&r({id:l.id,cardholderName:l.cardholderName});break;case"openModalWithUrl":s&&l.url&&l.url.includes("promptKYCModal")?s({url:l.url}):(o=new hze(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:l.url}));break;case"completedSDKModal":o.close(),l.postToIframe&&cN(t,l.eventType,l);break;case"requestedPopup":{lze({url:l.url,width:l.width,height:l.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=l.height+"px",t.style.maxHeight=l.height+"px";break;case"onPriceUpdate":{i==null||i(l);break}}}}function mze({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:s,onLoad:i,onError:o,locale:a,options:l,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h=!0,configs:v}){let y="checkout-with-card-iframe",g=p=>yze({iframe:p,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h}),b=vze({sdkClientSecret:r,appName:n,locale:a,options:l,useAltDomain:h,configs:v});return new fze({onLoad:i,elementOrId:s}).createPaymentElement({handler:g,iframeId:y,link:b})}RX();function pze(t){if(t.sheet)return t.sheet;for(var e=0;e0?cn(Xh,--hs):0,uh--,Ir===10&&(uh=1,Kx--),Ir}function Ts(){return Ir=hs2||e0(Ir)>3?"":" "}function Tze(t,e){for(;--e&&Ts()&&!(Ir<48||Ir>102||Ir>57&&Ir<65||Ir>70&&Ir<97););return W0(t,ng()+(e<6&&Po()==32&&Ts()==32))}function Gk(t){for(;Ts();)switch(Ir){case t:return hs;case 34:case 39:t!==34&&t!==39&&Gk(Ir);break;case 40:t===41&&Gk(t);break;case 92:Ts();break}return hs}function Rze(t,e){for(;Ts()&&t+Ir!==47+10;)if(t+Ir===42+42&&Po()===47)break;return"/*"+W0(e,hs-1)+"*"+Gx(t===47?t:Ts())}function Ize(t){for(;!e0(Po());)Ts();return W0(t,hs)}function Oze(t){return jX(ig("",null,null,null,[""],t=LX(t),0,[0],t))}function ig(t,e,r,n,s,i,o,a,l){for(var c=0,f=0,u=o,d=0,h=0,v=0,y=1,g=1,b=1,p=0,w="",E=s,k=i,$=n,x=w;g;)switch(v=p,p=Ts()){case 40:if(v!=108&&cn(x,u-1)==58){Hk(x+=ct(sg(p),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:x+=sg(p);break;case 9:case 10:case 13:case 32:x+=Pze(v);break;case 92:x+=Tze(ng()-1,7);continue;case 47:switch(Po()){case 42:case 47:lp(Mze(Rze(Ts(),ng()),e,r),l);break;default:x+="/"}break;case 123*y:a[c++]=co(x)*b;case 125*y:case 59:case 0:switch(p){case 0:case 125:g=0;case 59+f:b==-1&&(x=ct(x,/\f/g,"")),h>0&&co(x)-u&&lp(h>32?dN(x+";",n,r,u-1):dN(ct(x," ","")+";",n,r,u-2),l);break;case 59:x+=";";default:if(lp($=uN(x,e,r,c,f,s,a,w,E=[],k=[],u),i),p===123)if(f===0)ig(x,e,$,$,E,i,u,a,k);else switch(d===99&&cn(x,3)===110?100:d){case 100:case 108:case 109:case 115:ig(t,$,$,n&&lp(uN(t,$,$,0,0,s,a,w,s,E=[],u),k),s,k,u,a,n?E:k);break;default:ig(x,$,$,$,[""],k,0,a,k)}}c=f=h=0,y=b=1,w=x="",u=o;break;case 58:u=1+co(x),h=v;default:if(y<1){if(p==123)--y;else if(p==125&&y++==0&&_ze()==125)continue}switch(x+=Gx(p),p*y){case 38:b=f>0?1:(x+="\f",-1);break;case 44:a[c++]=(co(x)-1)*b,b=1;break;case 64:Po()===45&&(x+=sg(Ts())),d=Po(),f=u=co(w=x+=Ize(ng())),p++;break;case 45:v===45&&co(x)==2&&(y=0)}}return i}function uN(t,e,r,n,s,i,o,a,l,c,f){for(var u=s-1,d=s===0?i:[""],h=iP(d),v=0,y=0,g=0;v0?d[b]+" "+p:ct(p,/&\f/g,d[b])))&&(l[g++]=w);return Qx(t,e,r,s===0?nP:a,l,c,f)}function Mze(t,e,r){return Qx(t,e,r,OX,Gx(Aze()),Zy(t,2,-2),0)}function dN(t,e,r,n){return Qx(t,e,r,sP,Zy(t,0,n),Zy(t,n+1,-1),n)}function Sd(t,e){for(var r="",n=iP(t),s=0;s6)switch(cn(t,e+1)){case 109:if(cn(t,e+4)!==45)break;case 102:return ct(t,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+w2+(cn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Hk(t,"stretch")?FX(ct(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(cn(t,e+1)!==115)break;case 6444:switch(cn(t,co(t)-3-(~Hk(t,"!important")&&10))){case 107:return ct(t,":",":"+lt)+t;case 101:return ct(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(cn(t,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+bn+"$2box$3")+t}break;case 5936:switch(cn(t,e+11)){case 114:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return lt+t+bn+t+t}return t}var qze=function(e,r,n,s){if(e.length>-1&&!e.return)switch(e.type){case sP:e.return=FX(e.value,e.length);break;case MX:return Sd([P1(e,{value:ct(e.value,"@","@"+lt)})],s);case nP:if(e.length)return $ze(e.props,function(i){switch(kze(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Sd([P1(e,{props:[ct(i,/:(read-\w+)/,":"+w2+"$1")]})],s);case"::placeholder":return Sd([P1(e,{props:[ct(i,/:(plac\w+)/,":"+lt+"input-$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,":"+w2+"$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,bn+"input-$1")]})],s)}return""})}},Wze=[qze],Hze=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=e.stylisPlugins||Wze,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),b=1;be in t?sVe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,aVe=(t,e)=>{for(var r in e||(e={}))iVe.call(e,r)&&wN(t,r,e[r]);if(bN)for(var r of bN(e))oVe.call(e,r)&&wN(t,r,e[r]);return t},lVe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),aP=lVe((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.3",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),cVe=m.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),fVe=()=>m.useContext(cVe);Ji` +`,_1="paper-js-sdk-modal",uze=class{constructor(t,e){this.styles=cze(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=_1,this.overlay=document.createElement("div"),this.overlay.id=`${_1}-overlay`,this.body=document.createElement("div"),this.body.id=`${_1}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${_1}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${_1}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=fze,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=Xn(Xn({},this.styles.body),t.body||{}),this.styles.spinner=Xn(Xn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Xn(Xn({},this.styles.overlay),t.overlay||{}),this.styles.main=Xn(Xn({},this.styles.main),t.main||{}),this.styles.iframe=Xn(Xn({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function dze({sdkClientSecret:t,appName:e,options:r=Xn({},TX),locale:n,configs:s}){let i=new URL(rze,IX),o=t;if(!o&&s&&(o=btoa(JSON.stringify(s))),!o){let l="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",c=PX();return new URL(l,c)}let a=new ize(i);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function hze({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:s,onPriceUpdate:i}){let o;return a=>{if(!a.origin.startsWith(IX))return;let{data:l}=a;switch(l.eventType){case"checkoutWithCardError":e&&e({code:l.code,error:l.error});break;case"paymentSuccess":n&&n({transactionId:l.id,id:l.id}),l.postToIframe&&cN(t,l.eventType,l);break;case"reviewComplete":r&&r({id:l.id,cardholderName:l.cardholderName});break;case"openModalWithUrl":s&&l.url&&l.url.includes("promptKYCModal")?s({url:l.url}):(o=new uze(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:l.url}));break;case"completedSDKModal":o.close(),l.postToIframe&&cN(t,l.eventType,l);break;case"requestedPopup":{oze({url:l.url,width:l.width,height:l.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=l.height+"px",t.style.maxHeight=l.height+"px";break;case"onPriceUpdate":{i==null||i(l);break}}}}function vze({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:s,onLoad:i,onError:o,locale:a,options:l,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h=!0,configs:v}){let y="checkout-with-card-iframe",g=p=>hze({iframe:p,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h}),b=dze({sdkClientSecret:r,appName:n,locale:a,options:l,useAltDomain:h,configs:v});return new lze({onLoad:i,elementOrId:s}).createPaymentElement({handler:g,iframeId:y,link:b})}RX();function yze(t){if(t.sheet)return t.sheet;for(var e=0;e0?cn(Xh,--hs):0,uh--,Ir===10&&(uh=1,Kx--),Ir}function Ts(){return Ir=hs2||e0(Ir)>3?"":" "}function _ze(t,e){for(;--e&&Ts()&&!(Ir<48||Ir>102||Ir>57&&Ir<65||Ir>70&&Ir<97););return W0(t,ng()+(e<6&&Po()==32&&Ts()==32))}function Gk(t){for(;Ts();)switch(Ir){case t:return hs;case 34:case 39:t!==34&&t!==39&&Gk(Ir);break;case 40:t===41&&Gk(t);break;case 92:Ts();break}return hs}function Pze(t,e){for(;Ts()&&t+Ir!==47+10;)if(t+Ir===42+42&&Po()===47)break;return"/*"+W0(e,hs-1)+"*"+Gx(t===47?t:Ts())}function Tze(t){for(;!e0(Po());)Ts();return W0(t,hs)}function Rze(t){return jX(ig("",null,null,null,[""],t=LX(t),0,[0],t))}function ig(t,e,r,n,s,i,o,a,l){for(var c=0,f=0,u=o,d=0,h=0,v=0,y=1,g=1,b=1,p=0,w="",E=s,k=i,A=n,x=w;g;)switch(v=p,p=Ts()){case 40:if(v!=108&&cn(x,u-1)==58){Hk(x+=ct(sg(p),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:x+=sg(p);break;case 9:case 10:case 13:case 32:x+=Aze(v);break;case 92:x+=_ze(ng()-1,7);continue;case 47:switch(Po()){case 42:case 47:lp(Ize(Pze(Ts(),ng()),e,r),l);break;default:x+="/"}break;case 123*y:a[c++]=lo(x)*b;case 125*y:case 59:case 0:switch(p){case 0:case 125:g=0;case 59+f:b==-1&&(x=ct(x,/\f/g,"")),h>0&&lo(x)-u&&lp(h>32?dN(x+";",n,r,u-1):dN(ct(x," ","")+";",n,r,u-2),l);break;case 59:x+=";";default:if(lp(A=uN(x,e,r,c,f,s,a,w,E=[],k=[],u),i),p===123)if(f===0)ig(x,e,A,A,E,i,u,a,k);else switch(d===99&&cn(x,3)===110?100:d){case 100:case 108:case 109:case 115:ig(t,A,A,n&&lp(uN(t,A,A,0,0,s,a,w,s,E=[],u),k),s,k,u,a,n?E:k);break;default:ig(x,A,A,A,[""],k,0,a,k)}}c=f=h=0,y=b=1,w=x="",u=o;break;case 58:u=1+lo(x),h=v;default:if(y<1){if(p==123)--y;else if(p==125&&y++==0&&$ze()==125)continue}switch(x+=Gx(p),p*y){case 38:b=f>0?1:(x+="\f",-1);break;case 44:a[c++]=(lo(x)-1)*b,b=1;break;case 64:Po()===45&&(x+=sg(Ts())),d=Po(),f=u=lo(w=x+=Tze(ng())),p++;break;case 45:v===45&&lo(x)==2&&(y=0)}}return i}function uN(t,e,r,n,s,i,o,a,l,c,f){for(var u=s-1,d=s===0?i:[""],h=iP(d),v=0,y=0,g=0;v0?d[b]+" "+p:ct(p,/&\f/g,d[b])))&&(l[g++]=w);return Qx(t,e,r,s===0?nP:a,l,c,f)}function Ize(t,e,r){return Qx(t,e,r,OX,Gx(kze()),Zy(t,2,-2),0)}function dN(t,e,r,n){return Qx(t,e,r,sP,Zy(t,0,n),Zy(t,n+1,-1),n)}function Sd(t,e){for(var r="",n=iP(t),s=0;s6)switch(cn(t,e+1)){case 109:if(cn(t,e+4)!==45)break;case 102:return ct(t,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+w2+(cn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Hk(t,"stretch")?FX(ct(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(cn(t,e+1)!==115)break;case 6444:switch(cn(t,lo(t)-3-(~Hk(t,"!important")&&10))){case 107:return ct(t,":",":"+lt)+t;case 101:return ct(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(cn(t,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+bn+"$2box$3")+t}break;case 5936:switch(cn(t,e+11)){case 114:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return lt+t+bn+t+t}return t}var zze=function(e,r,n,s){if(e.length>-1&&!e.return)switch(e.type){case sP:e.return=FX(e.value,e.length);break;case MX:return Sd([P1(e,{value:ct(e.value,"@","@"+lt)})],s);case nP:if(e.length)return Sze(e.props,function(i){switch(Eze(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Sd([P1(e,{props:[ct(i,/:(read-\w+)/,":"+w2+"$1")]})],s);case"::placeholder":return Sd([P1(e,{props:[ct(i,/:(plac\w+)/,":"+lt+"input-$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,":"+w2+"$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,bn+"input-$1")]})],s)}return""})}},Vze=[zze],qze=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=e.stylisPlugins||Vze,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),b=1;be in t?rVe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,iVe=(t,e)=>{for(var r in e||(e={}))nVe.call(e,r)&&wN(t,r,e[r]);if(bN)for(var r of bN(e))sVe.call(e,r)&&wN(t,r,e[r]);return t},oVe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),aP=oVe((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.3",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),aVe=m.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),lVe=()=>m.useContext(aVe);Yi` opacity: 0; -`;Ji` +`;Yi` opacity: 1; -`;var uVe=Ji` +`;var cVe=Yi` position: relative; width: 100%; height: 100%; -`;Ji` +`;Yi` display: grid; position: relative; width: 100%; -`;Ji` +`;Yi` transition-delay: 150ms; transition-property: opacity; transition-duration: 75ms; -`;Ji` +`;Yi` transition-property: opacity; transition-duration: 150ms; -`;Ji` +`;Yi` background-color: transparent; grid-column-start: 1; grid-row-start: 1; -`;var dVe=({className:t})=>pe("div",{id:"loader",className:rVe(vVe,t)}),hVe=nVe` +`;var fVe=({className:t})=>pe("div",{id:"loader",className:eVe(dVe,t)}),uVe=tVe` from { transform: rotate(0deg); } to { transform: rotate(360deg); } -`,vVe=Ji` +`,dVe=Yi` border: 0.15rem solid #f3f3f300; border-top: 0.15rem solid #000000; border-left: 0.15rem solid #000000; border-radius: 50%; width: 4rem; height: 4rem; - animation: ${hVe} 1s linear infinite; -`,yVe=()=>pe("div",{className:mVe,children:pe(dVe,{className:pVe})}),mVe=Ji` + animation: ${uVe} 1s linear infinite; +`,hVe=()=>pe("div",{className:vVe,children:pe(fVe,{className:yVe})}),vVe=Yi` position: absolute; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); -`,pVe=Ji` +`,yVe=Yi` color: #000000; width: 2rem; height: 2rem; -`,gVe=aP(),bVe=({sdkClientSecret:t,appName:e,options:r=aVe({},TX),onPaymentSuccess:n,onReview:s,onError:i,onBeforeModalOpen:o,onPriceUpdate:a,locale:l,configs:c})=>{let{appName:f}=fVe(),[u,d]=m.useState(!0),h=m.useCallback(()=>{d(!1)},[]),v=m.useRef(null),y=e||f;return m.useEffect(()=>{let g=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(g)}},[]),m.useEffect(()=>{v.current&&mze({sdkClientSecret:t,appName:y,elementOrId:v.current,locale:l,onError:i,onLoad:h,onPaymentSuccess:n,onReview:s,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:c})},[v.current]),pe(kZ,{children:pe("div",{className:uVe,ref:v,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${gVe.version}`,children:u&&pe(yVe,{})})})};Ji` +`,mVe=aP(),pVe=({sdkClientSecret:t,appName:e,options:r=iVe({},TX),onPaymentSuccess:n,onReview:s,onError:i,onBeforeModalOpen:o,onPriceUpdate:a,locale:l,configs:c})=>{let{appName:f}=lVe(),[u,d]=m.useState(!0),h=m.useCallback(()=>{d(!1)},[]),v=m.useRef(null),y=e||f;return m.useEffect(()=>{let g=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(g)}},[]),m.useEffect(()=>{v.current&&vze({sdkClientSecret:t,appName:y,elementOrId:v.current,locale:l,onError:i,onLoad:h,onPaymentSuccess:n,onReview:s,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:c})},[v.current]),pe(kZ,{children:pe("div",{className:cVe,ref:v,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${mVe.version}`,children:u&&pe(hVe,{})})})};Yi` padding-top: 0.625rem; padding-bottom: 0.625rem; padding-left: 1.25rem; @@ -426,7 +426,7 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val border-radius: 0.5rem; border: none; cursor: pointer; -`;aP();aP();var wVe=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(wVe||{}),xVe=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(xVe||{});const[CVe,EVe]=tu(),H0=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=CVe();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Df(){return Df=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://dev-api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},xN=(t,e)=>t.toLowerCase()===e.toLowerCase();var Za=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Za||{});const Kk=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Za.VERY_LARGE:e<1e-10?r=Za.VERY_TINY:e<1?r=Za.FRACTION:r=Za.MIXED;let n,s;switch(r){case Za.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Za.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Za.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Df({notation:n},s)).format(e)},SVe=t=>t.charAt(0).toUpperCase()+t.slice(1),kVe=t=>t.chainId===1?"Ethereum":SVe(t.name),$Ve=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},AVe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},_Ve=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([$Ve({accountAddress:t,chainId:e}),AVe({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},PVe=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await G0(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},TVe=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await G0(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},RVe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:s,collectionContractAddress:i,methodArguments:o,currency:a,currencyAmount:l,methodName:c,recipientAddress:f})=>{const{network:u,apiClient:d}=await G0(t),h=kVe(u),v=JSON.stringify(Df({title:s,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${l} * $QUANTITY`},name:c},walletAddress:f},i?{contractArgs:{collectionContractAddress:i}}:{})),{secret:y}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:v});return y},lP={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},IVe=t=>hi({queryKey:["balances",t],queryFn:()=>_Ve(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),OVe=t=>hi({queryKey:["useTokenMetadata",t],queryFn:()=>PVe(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),zX=t=>hi({queryKey:["useContractInfo",t],queryFn:()=>TVe(t),retry:!0,staleTime:60*lP.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[MVe,DVe]=tu(),NVe=({settings:t})=>{var e,r;const[n,s]=m.useState(!0),[i,o]=m.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,l]=m.useState(i),[c,f]=m.useState(null),[u,d]=m.useState(!1),{setNavigation:h}=Zh(),v=()=>{n&&o(a||""),n||l(i),s(!n)},y=async()=>{d(!0);try{if(!i)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const k=await RVe(Df({email:i},t.creditCardCheckout));f(k)}catch(k){console.error("Failed to fetch paper secret",k),h({location:"transaction-error",params:{error:k}})}d(!1)};m.useEffect(()=>{const k=setInterval(()=>{const $=document.getElementById("paper-js-sdk-modal");$&&($.style.pointerEvents="visible")},100);return()=>{clearInterval(k)}},[]),m.useEffect(()=>{i!==""&&y()},[i]);const g=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),b=k=>{l(k.target.value)},p=k=>{h({location:"transaction-pending",params:{transactionId:k}})},w=k=>{h({location:"transaction-error",params:{error:k}})},E=()=>n?P.createElement(W,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:v},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(ac,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:b,"data-1p-ignore":!0})),P.createElement(nt,{size:"xs",label:"Save",leftIcon:mh,disabled:!g(),type:"submit"})):P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},i)),P.createElement(nt,{size:"xs",label:"Edit",leftIcon:Loe,onClick:v}));return P.createElement(W,null,E(),u&&P.createElement(W,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}})),c&&!u&&P.createElement(To,{marginY:"4",flexDirection:"column"},P.createElement(bVe,{sdkClientSecret:c,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:k=>{p(k.id)},onError:k=>{console.error("Payment error:",k),w(k.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},cP="54px",LVe=()=>{const{settings:t}=H0();return P.createElement(W,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:cP}},t&&P.createElement(NVe,{settings:t}))},jVe=10*1e3,FVe=()=>{const t=Zh(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,s=async()=>{try{console.log("Polling for transaction status");const i=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(l=>l.json()),o=i.result.status,a=i.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(i){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:i}})}};return m.useEffect(()=>{const i=setInterval(()=>{s()},jVe);return()=>{clearInterval(i)}},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}}),P.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",P.createElement("br",null),"This may take a few minutes.")))},BVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onSuccess&&(e==null||(i=e.creditCardCheckout)==null||i.onSuccess(n.params.transactionHash))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(UVe,null),P.createElement(re,{fontSize:"xlarge"},"Success!"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},UVe=()=>P.createElement(W,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},P.createElement(mh,{size:"xl"})),zVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onError&&(e==null||(i=e.creditCardCheckout)==null||i.onError(n.params.error))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(VVe,null),P.createElement(re,{fontSize:"xlarge"},"Error"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},VVe=()=>P.createElement(W,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},P.createElement(Bf,{size:"xl"})),qVe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),Tv=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(qVe,{size:e});Xf("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const WVe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),HVe=Fs({height:"76px",backgroundColor:"#909090",animation:`${WVe} 2s ease-in-out infinite`},"skeleton");Zf();const ed=({width:t="100%",height:e="100%",borderRadius:r="md"})=>P.createElement(W,{className:HVe,borderRadius:r,style:{width:t,height:e}}),GVe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:s=[]}=dn(),{data:i,isLoading:o}=OVe({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:l}=zX({chainID:String(n),contractAddress:t});if(o||l)return P.createElement(KVe,null);const f=Mr(n,s),{name:u="unknown",image:d,decimals:h=0}=i||{},{logoURI:v,name:y="Unknown Collection"}=a||{},g=_r(r,h);return P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(W,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},P.createElement(fr,{src:d,borderRadius:"md",style:{height:"80px"}})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(W,{gap:"1",alignItems:"center"},P.createElement(Tv,{size:12,imageUrl:v}),P.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},y),P.createElement(Tv,{size:12,imageUrl:f.logoURI})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},P.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},u),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),P.createElement(W,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${Kk(g)}`))},KVe=()=>P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(ed,{height:"80px",width:"80px"}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(ed,{width:"100px",height:"14px"}),P.createElement(ed,{width:"180px",height:"34px"}))),P.createElement(ed,{height:"14px",width:"14px"}));Xf("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const VX=Fs({},"insufficientBalanceButton");Ki(`${VX} > div`,{justifyContent:"center"});Zf();const QVe=()=>{var t,e,r,n,s;const{chains:i=[]}=dn(),{setNavigation:o}=Zh(),{closeCheckout:a,settings:l}=H0(),{address:c}=Tn(),f=l==null?void 0:l.cryptoCheckout,u=l==null?void 0:l.creditCardCheckout,d=!!f,h=!!u,{data:v,isLoading:y}=zX({contractAddress:(f==null||(t=f.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((f==null?void 0:f.chainId)||1)}),{data:g,isLoading:b}=IVe({accountAddress:c||"",chainId:(f==null?void 0:f.chainId)||1}),p=(y||b)&&f,w=xN((f==null||(e=f.coinQuantity)==null?void 0:e.contractAddress)||"",Ar),E=Mr((f==null?void 0:f.chainId)||1,i),k=w?E.decimals:(v==null?void 0:v.decimals)||0,$=w?E.symbol:(v==null?void 0:v.symbol)||"COIN",x=w?E.logoURI:(v==null?void 0:v.logoURI)||"",T=g==null?void 0:g.find(_=>{var I;return xN(_.contractAddress,(f==null||(I=f.coinQuantity)==null?void 0:I.contractAddress)||"")}),B=T?T.balance:"0",L=(f==null||(r=f.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",U=_r(B,k),V=_r(L,k),N=Z.from(B).lt(Z.from(L)),C=(l==null?void 0:l.orderSummaryItems)||[],S=(l==null||(n=l.cryptoCheckout)==null?void 0:n.chainId)||(l==null||(s=l.creditCardCheckout)==null?void 0:s.chainId)||1,R=()=>{o({location:"transaction-form"})},M=()=>{var _;console.log("trigger transaction");const I=l==null||(_=l.cryptoCheckout)==null?void 0:_.triggerTransaction;I&&I(),a()};return P.createElement(W,{paddingX:"5",paddingBottom:"5",style:{marginTop:cP},flexDirection:"column",gap:"3"},C.length>0&&P.createElement(P.Fragment,null,P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),P.createElement(W,{flexDirection:"column",gap:"2"},C.map((_,I)=>P.createElement(GVe,Df({key:I},_,{chainId:S})))),P.createElement(W,{marginTop:"2"},P.createElement(ey,{color:"backgroundSecondary",style:{margin:"0px"}}))),d&&P.createElement(W,{justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?P.createElement(ed,{width:"100px",height:"17px"}):P.createElement(W,{flexDirection:"row",gap:"1",alignItems:"center"},P.createElement(Tv,{imageUrl:x,size:12}),P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${Kk(V)} ${$}`))),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},h&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",borderRadius:"md",leftIcon:Woe,variant:"primary",label:"Pay with credit card",rightIcon:Di,onClick:R}),d&&!N&&!p&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:x}),variant:"primary",label:`Pay with ${$}`,rightIcon:Di,onClick:M}),d&&(N||p)&&P.createElement(nt,{className:VX,style:{borderRadius:ge.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:x}),variant:"glass",label:`Insufficient ${$}`,onClick:M,disabled:!0})),d&&P.createElement(W,{width:"full",justifyContent:"flex-end"},p?P.createElement(ed,{width:"102px",height:"14px"}):P.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${Kk(U)} ${$}`)))},L5=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:s}=Zh(),i=()=>{n()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:cP,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},s.length>0&&!r?P.createElement(va,{onClick:i,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))};Xf("packages/checkout/src/shared/styles.css.ts","kit");const fP=Fs({},"walletContent");Ki(`${fP} + button`,{backgroundColor:"transparent"});Ki(`${fP} + button > svg`,{width:"20px",height:"20px"});Zf();const qX={location:"select-method-checkout"},YVe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(JVe,t))},JVe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState(),[a,l]=m.useState([]),c=a.length>0?a[a.length-1]:qX,f=v=>{o(v),s(!0)},u=()=>{s(!1)},d=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(QVe,null);case"transaction-pending":return P.createElement(FVe,null);case"transaction-success":return P.createElement(BVe,null);case"transaction-error":return P.createElement(zVe,null);case"transaction-form":default:return P.createElement(LVe,null)}},h=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(L5,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return P.createElement(L5,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return P.createElement(L5,{primaryText:"Pay with credit or debit card"})}};return m.useEffect(()=>{n&&l([])},[n]),P.createElement(EVe,{value:{triggerCheckout:f,closeCheckout:u,settings:i,theme:e}},P.createElement(DVe,{value:{history:a,setHistory:l}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:Df({maxWidth:"400px",height:"auto"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{id:"sequence-kit-checkout-content",className:fP},h(),d())))),t))},Zh=()=>{const{setHistory:t,history:e}=MVe(),r=i=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const l=[...e,i];t(l)},n=()=>{const i=[...e];i.pop(),t(i)},s=e.length>0?e[e.length-1]:qX;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:s}},WX="%[a-f0-9]{2}",CN=new RegExp("("+WX+")|([^%]+?)","gi"),EN=new RegExp("("+WX+")+","gi");function Qk(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],Qk(r),Qk(n))}function XVe(t){try{return decodeURIComponent(t)}catch{let e=t.match(CN)||[];for(let r=1;rt==null,nqe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Yk=Symbol("encodeFragmentIdentifier");function sqe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const s=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[",s,"]"].join("")]:[...r,[Pr(e,t),"[",Pr(s,t),"]=",Pr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[]"].join("")]:[...r,[Pr(e,t),"[]=",Pr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),":list="].join("")]:[...r,[Pr(e,t),":list=",Pr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?n:(s=s===null?"":s,n.length===0?[[Pr(r,t),e,Pr(s,t)].join("")]:[[n,Pr(s,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Pr(e,t)]:[...r,[Pr(e,t),"=",Pr(n,t)].join("")]}}function iqe(t){let e;switch(t.arrayFormat){case"index":return(r,n,s)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){s[r]=n;return}s[r]===void 0&&(s[r]={}),s[r][e[1]]=n};case"bracket":return(r,n,s)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"colon-list-separator":return(r,n,s)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"comma":case"separator":return(r,n,s)=>{const i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!i&&Jo(n,t).includes(t.arrayFormatSeparator);n=o?Jo(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map(l=>Jo(l,t)):n===null?n:Jo(n,t);s[r]=a};case"bracket-separator":return(r,n,s)=>{const i=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!i){s[r]=n&&Jo(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Jo(a,t));if(s[r]===void 0){s[r]=o;return}s[r]=[...s[r],...o]};default:return(r,n,s)=>{if(s[r]===void 0){s[r]=n;return}s[r]=[...[s[r]].flat(),n]}}}function GX(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Pr(t,e){return e.encode?e.strict?nqe(t):encodeURIComponent(t):t}function Jo(t,e){return e.decode?eqe(t):t}function KX(t){return Array.isArray(t)?t.sort():typeof t=="object"?KX(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function QX(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function oqe(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function SN(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function uP(t){t=QX(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function dP(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},GX(e.arrayFormatSeparator);const r=iqe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const s of t.split("&")){if(s==="")continue;const i=e.decode?s.replace(/\+/g," "):s;let[o,a]=HX(i,"=");o===void 0&&(o=i),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Jo(a,e),r(Jo(o,e),a,n)}for(const[s,i]of Object.entries(n))if(typeof i=="object"&&i!==null)for(const[o,a]of Object.entries(i))i[o]=SN(a,e);else n[s]=SN(i,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((s,i)=>{const o=n[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?s[i]=KX(o):s[i]=o,s},Object.create(null))}function YX(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},GX(e.arrayFormatSeparator);const r=o=>e.skipNull&&rqe(t[o])||e.skipEmptyString&&t[o]==="",n=sqe(e),s={};for(const[o,a]of Object.entries(t))r(o)||(s[o]=a);const i=Object.keys(s);return e.sort!==!1&&i.sort(e.sort),i.map(o=>{const a=t[o];return a===void 0?"":a===null?Pr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Pr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Pr(o,e)+"="+Pr(a,e)}).filter(o=>o.length>0).join("&")}function JX(t,e){var s;e={decode:!0,...e};let[r,n]=HX(t,"#");return r===void 0&&(r=t),{url:((s=r==null?void 0:r.split("?"))==null?void 0:s[0])??"",query:dP(uP(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Jo(n,e)}:{}}}function XX(t,e){e={encode:!0,strict:!0,[Yk]:!0,...e};const r=QX(t.url).split("?")[0]||"",n=uP(t.url),s={...dP(n,{sort:!1}),...t.query};let i=YX(s,e);i&&(i=`?${i}`);let o=oqe(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Yk]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${i}${o}`}function ZX(t,e,r){r={parseFragmentIdentifier:!0,[Yk]:!1,...r};const{url:n,query:s,fragmentIdentifier:i}=JX(t,r);return XX({url:n,query:tqe(s,e),fragmentIdentifier:i},r)}function aqe(t,e,r){const n=Array.isArray(e)?s=>!e.includes(s):(s,i)=>!e(s,i);return ZX(t,n,r)}const lqe=Object.freeze(Object.defineProperty({__proto__:null,exclude:aqe,extract:uP,parse:dP,parseUrl:JX,pick:ZX,stringify:YX,stringifyUrl:XX},Symbol.toStringTag,{value:"Module"})),cqe=[{inputs:[{internalType:"uint256[]",name:"_tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"_tokensBoughtAmounts",type:"uint256[]"},{internalType:"uint256",name:"_maxCurrency",type:"uint256"},{internalType:"uint256",name:"_deadline",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"address[]",name:"_extraFeeRecipients",type:"address[]"},{internalType:"uint256[]",name:"_extraFeeAmounts",type:"uint256[]"}],name:"buyTokens",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"}],fqe=`Two roads diverged in a yellow wood, +`;aP();aP();var gVe=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(gVe||{}),bVe=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(bVe||{});const[wVe,xVe]=tu(),H0=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=wVe();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Df(){return Df=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://dev-api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},xN=(t,e)=>t.toLowerCase()===e.toLowerCase();var Za=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Za||{});const Kk=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Za.VERY_LARGE:e<1e-10?r=Za.VERY_TINY:e<1?r=Za.FRACTION:r=Za.MIXED;let n,s;switch(r){case Za.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Za.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Za.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Df({notation:n},s)).format(e)},CVe=t=>t.charAt(0).toUpperCase()+t.slice(1),EVe=t=>t.chainId===1?"Ethereum":CVe(t.name),SVe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},kVe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},$Ve=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([SVe({accountAddress:t,chainId:e}),kVe({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},AVe=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await G0(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},_Ve=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await G0(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},PVe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:s,collectionContractAddress:i,methodArguments:o,currency:a,currencyAmount:l,methodName:c,recipientAddress:f})=>{const{network:u,apiClient:d}=await G0(t),h=EVe(u),v=JSON.stringify(Df({title:s,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${l} * $QUANTITY`},name:c},walletAddress:f},i?{contractArgs:{collectionContractAddress:i}}:{})),{secret:y}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:v});return y},lP={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},TVe=t=>hi({queryKey:["balances",t],queryFn:()=>$Ve(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),RVe=t=>hi({queryKey:["useTokenMetadata",t],queryFn:()=>AVe(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),zX=t=>hi({queryKey:["useContractInfo",t],queryFn:()=>_Ve(t),retry:!0,staleTime:60*lP.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[IVe,OVe]=tu(),MVe=({settings:t})=>{var e,r;const[n,s]=m.useState(!0),[i,o]=m.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,l]=m.useState(i),[c,f]=m.useState(null),[u,d]=m.useState(!1),{setNavigation:h}=Zh(),v=()=>{n&&o(a||""),n||l(i),s(!n)},y=async()=>{d(!0);try{if(!i)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const k=await PVe(Df({email:i},t.creditCardCheckout));f(k)}catch(k){console.error("Failed to fetch paper secret",k),h({location:"transaction-error",params:{error:k}})}d(!1)};m.useEffect(()=>{const k=setInterval(()=>{const A=document.getElementById("paper-js-sdk-modal");A&&(A.style.pointerEvents="visible")},100);return()=>{clearInterval(k)}},[]),m.useEffect(()=>{i!==""&&y()},[i]);const g=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),b=k=>{l(k.target.value)},p=k=>{h({location:"transaction-pending",params:{transactionId:k}})},w=k=>{h({location:"transaction-error",params:{error:k}})},E=()=>n?P.createElement(W,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:v},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(ac,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:b,"data-1p-ignore":!0})),P.createElement(it,{size:"xs",label:"Save",leftIcon:mh,disabled:!g(),type:"submit"})):P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},i)),P.createElement(it,{size:"xs",label:"Edit",leftIcon:Loe,onClick:v}));return P.createElement(W,null,E(),u&&P.createElement(W,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}})),c&&!u&&P.createElement(To,{marginY:"4",flexDirection:"column"},P.createElement(pVe,{sdkClientSecret:c,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:k=>{p(k.id)},onError:k=>{console.error("Payment error:",k),w(k.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},cP="54px",DVe=()=>{const{settings:t}=H0();return P.createElement(W,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:cP}},t&&P.createElement(MVe,{settings:t}))},NVe=10*1e3,LVe=()=>{const t=Zh(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,s=async()=>{try{console.log("Polling for transaction status");const i=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(l=>l.json()),o=i.result.status,a=i.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(i){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:i}})}};return m.useEffect(()=>{const i=setInterval(()=>{s()},NVe);return()=>{clearInterval(i)}},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}}),P.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",P.createElement("br",null),"This may take a few minutes.")))},jVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onSuccess&&(e==null||(i=e.creditCardCheckout)==null||i.onSuccess(n.params.transactionHash))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(FVe,null),P.createElement(re,{fontSize:"xlarge"},"Success!"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},FVe=()=>P.createElement(W,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},P.createElement(mh,{size:"xl"})),BVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onError&&(e==null||(i=e.creditCardCheckout)==null||i.onError(n.params.error))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(UVe,null),P.createElement(re,{fontSize:"xlarge"},"Error"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},UVe=()=>P.createElement(W,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},P.createElement(Bf,{size:"xl"})),zVe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),Tv=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(zVe,{size:e});Xf("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const VVe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),qVe=Fs({height:"76px",backgroundColor:"#909090",animation:`${VVe} 2s ease-in-out infinite`},"skeleton");Zf();const ed=({width:t="100%",height:e="100%",borderRadius:r="md"})=>P.createElement(W,{className:qVe,borderRadius:r,style:{width:t,height:e}}),WVe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:s=[]}=dn(),{data:i,isLoading:o}=RVe({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:l}=zX({chainID:String(n),contractAddress:t});if(o||l)return P.createElement(HVe,null);const f=Mr(n,s),{name:u="unknown",image:d,decimals:h=0}=i||{},{logoURI:v,name:y="Unknown Collection"}=a||{},g=_r(r,h);return P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(W,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},P.createElement(fr,{src:d,borderRadius:"md",style:{height:"80px"}})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(W,{gap:"1",alignItems:"center"},P.createElement(Tv,{size:12,imageUrl:v}),P.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},y),P.createElement(Tv,{size:12,imageUrl:f.logoURI})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},P.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},u),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),P.createElement(W,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${Kk(g)}`))},HVe=()=>P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(ed,{height:"80px",width:"80px"}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(ed,{width:"100px",height:"14px"}),P.createElement(ed,{width:"180px",height:"34px"}))),P.createElement(ed,{height:"14px",width:"14px"}));Xf("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const VX=Fs({},"insufficientBalanceButton");Gi(`${VX} > div`,{justifyContent:"center"});Zf();const GVe=()=>{var t,e,r,n;const{chains:s=[]}=dn();Zh();const{closeCheckout:i,settings:o}=H0(),{address:a}=Tn(),l=o==null?void 0:o.cryptoCheckout,c=!!l,{data:f,isLoading:u}=zX({contractAddress:(l==null||(t=l.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((l==null?void 0:l.chainId)||1)}),{data:d,isLoading:h}=TVe({accountAddress:a||"",chainId:(l==null?void 0:l.chainId)||1}),v=(u||h)&&l,y=xN((l==null||(e=l.coinQuantity)==null?void 0:e.contractAddress)||"",Ar),g=Mr((l==null?void 0:l.chainId)||1,s),b=y?g.decimals:(f==null?void 0:f.decimals)||0,p=y?g.symbol:(f==null?void 0:f.symbol)||"COIN",w=y?g.logoURI:(f==null?void 0:f.logoURI)||"",E=d==null?void 0:d.find(N=>{var C;return xN(N.contractAddress,(l==null||(C=l.coinQuantity)==null?void 0:C.contractAddress)||"")}),k=E?E.balance:"0",A=(l==null||(r=l.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",x=_r(k,b),T=_r(A,b),B=Z.from(k).lt(Z.from(A)),L=(o==null?void 0:o.orderSummaryItems)||[],U=(o==null||(n=o.cryptoCheckout)==null?void 0:n.chainId)||1,V=()=>{var N;console.log("trigger transaction");const C=o==null||(N=o.cryptoCheckout)==null?void 0:N.triggerTransaction;C&&C(),i()};return P.createElement(W,{paddingX:"5",paddingBottom:"5",style:{marginTop:cP},flexDirection:"column",gap:"3"},L.length>0&&P.createElement(P.Fragment,null,P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),P.createElement(W,{flexDirection:"column",gap:"2"},L.map((N,C)=>P.createElement(WVe,Df({key:C},N,{chainId:U})))),P.createElement(W,{marginTop:"2"},P.createElement(ey,{color:"backgroundSecondary",style:{margin:"0px"}}))),c&&P.createElement(W,{justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),v?P.createElement(ed,{width:"100px",height:"17px"}):P.createElement(W,{flexDirection:"row",gap:"1",alignItems:"center"},P.createElement(Tv,{imageUrl:w,size:12}),P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${Kk(T)} ${p}`))),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},c&&!B&&!v&&P.createElement(it,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:w}),variant:"primary",label:`Pay with ${p}`,rightIcon:Co,onClick:V}),c&&(B||v)&&P.createElement(it,{className:VX,style:{borderRadius:ge.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:w}),variant:"glass",label:`Insufficient ${p}`,onClick:V,disabled:!0})),c&&P.createElement(W,{width:"full",justifyContent:"flex-end"},v?P.createElement(ed,{width:"102px",height:"14px"}):P.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${Kk(x)} ${p}`)))},L5=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:s}=Zh(),i=()=>{n()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:cP,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},s.length>0&&!r?P.createElement(va,{onClick:i,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))};Xf("packages/checkout/src/shared/styles.css.ts","kit");const fP=Fs({},"walletContent");Gi(`${fP} + button`,{backgroundColor:"transparent"});Gi(`${fP} + button > svg`,{width:"20px",height:"20px"});Zf();const qX={location:"select-method-checkout"},KVe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(QVe,t))},QVe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState(),[a,l]=m.useState([]),c=a.length>0?a[a.length-1]:qX,f=v=>{o(v),s(!0)},u=()=>{s(!1)},d=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(GVe,null);case"transaction-pending":return P.createElement(LVe,null);case"transaction-success":return P.createElement(jVe,null);case"transaction-error":return P.createElement(BVe,null);case"transaction-form":default:return P.createElement(DVe,null)}},h=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(L5,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return P.createElement(L5,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return P.createElement(L5,{primaryText:"Pay with credit or debit card"})}};return m.useEffect(()=>{n&&l([])},[n]),P.createElement(xVe,{value:{triggerCheckout:f,closeCheckout:u,settings:i,theme:e}},P.createElement(OVe,{value:{history:a,setHistory:l}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:Df({maxWidth:"400px",height:"auto"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{id:"sequence-kit-checkout-content",className:fP},h(),d())))),t))},Zh=()=>{const{setHistory:t,history:e}=IVe(),r=i=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const l=[...e,i];t(l)},n=()=>{const i=[...e];i.pop(),t(i)},s=e.length>0?e[e.length-1]:qX;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:s}},WX="%[a-f0-9]{2}",CN=new RegExp("("+WX+")|([^%]+?)","gi"),EN=new RegExp("("+WX+")+","gi");function Qk(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],Qk(r),Qk(n))}function YVe(t){try{return decodeURIComponent(t)}catch{let e=t.match(CN)||[];for(let r=1;rt==null,tqe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Yk=Symbol("encodeFragmentIdentifier");function rqe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const s=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[",s,"]"].join("")]:[...r,[Pr(e,t),"[",Pr(s,t),"]=",Pr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[]"].join("")]:[...r,[Pr(e,t),"[]=",Pr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),":list="].join("")]:[...r,[Pr(e,t),":list=",Pr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?n:(s=s===null?"":s,n.length===0?[[Pr(r,t),e,Pr(s,t)].join("")]:[[n,Pr(s,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Pr(e,t)]:[...r,[Pr(e,t),"=",Pr(n,t)].join("")]}}function nqe(t){let e;switch(t.arrayFormat){case"index":return(r,n,s)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){s[r]=n;return}s[r]===void 0&&(s[r]={}),s[r][e[1]]=n};case"bracket":return(r,n,s)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"colon-list-separator":return(r,n,s)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"comma":case"separator":return(r,n,s)=>{const i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!i&&Jo(n,t).includes(t.arrayFormatSeparator);n=o?Jo(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map(l=>Jo(l,t)):n===null?n:Jo(n,t);s[r]=a};case"bracket-separator":return(r,n,s)=>{const i=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!i){s[r]=n&&Jo(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Jo(a,t));if(s[r]===void 0){s[r]=o;return}s[r]=[...s[r],...o]};default:return(r,n,s)=>{if(s[r]===void 0){s[r]=n;return}s[r]=[...[s[r]].flat(),n]}}}function GX(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Pr(t,e){return e.encode?e.strict?tqe(t):encodeURIComponent(t):t}function Jo(t,e){return e.decode?XVe(t):t}function KX(t){return Array.isArray(t)?t.sort():typeof t=="object"?KX(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function QX(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function sqe(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function SN(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function uP(t){t=QX(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function dP(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},GX(e.arrayFormatSeparator);const r=nqe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const s of t.split("&")){if(s==="")continue;const i=e.decode?s.replace(/\+/g," "):s;let[o,a]=HX(i,"=");o===void 0&&(o=i),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Jo(a,e),r(Jo(o,e),a,n)}for(const[s,i]of Object.entries(n))if(typeof i=="object"&&i!==null)for(const[o,a]of Object.entries(i))i[o]=SN(a,e);else n[s]=SN(i,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((s,i)=>{const o=n[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?s[i]=KX(o):s[i]=o,s},Object.create(null))}function YX(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},GX(e.arrayFormatSeparator);const r=o=>e.skipNull&&eqe(t[o])||e.skipEmptyString&&t[o]==="",n=rqe(e),s={};for(const[o,a]of Object.entries(t))r(o)||(s[o]=a);const i=Object.keys(s);return e.sort!==!1&&i.sort(e.sort),i.map(o=>{const a=t[o];return a===void 0?"":a===null?Pr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Pr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Pr(o,e)+"="+Pr(a,e)}).filter(o=>o.length>0).join("&")}function JX(t,e){var s;e={decode:!0,...e};let[r,n]=HX(t,"#");return r===void 0&&(r=t),{url:((s=r==null?void 0:r.split("?"))==null?void 0:s[0])??"",query:dP(uP(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Jo(n,e)}:{}}}function XX(t,e){e={encode:!0,strict:!0,[Yk]:!0,...e};const r=QX(t.url).split("?")[0]||"",n=uP(t.url),s={...dP(n,{sort:!1}),...t.query};let i=YX(s,e);i&&(i=`?${i}`);let o=sqe(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Yk]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${i}${o}`}function ZX(t,e,r){r={parseFragmentIdentifier:!0,[Yk]:!1,...r};const{url:n,query:s,fragmentIdentifier:i}=JX(t,r);return XX({url:n,query:ZVe(s,e),fragmentIdentifier:i},r)}function iqe(t,e,r){const n=Array.isArray(e)?s=>!e.includes(s):(s,i)=>!e(s,i);return ZX(t,n,r)}const oqe=Object.freeze(Object.defineProperty({__proto__:null,exclude:iqe,extract:uP,parse:dP,parseUrl:JX,pick:ZX,stringify:YX,stringifyUrl:XX},Symbol.toStringTag,{value:"Module"})),aqe=`Two roads diverged in a yellow wood, Robert Frost poet And sorry I could not travel both @@ -450,4 +450,4 @@ I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I— I took the one less traveled by, -And that has made all the difference.`,uqe=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz"}],dqe=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var kN="u3q5o00";const hqe=()=>{const{theme:t}=Na(),e=wde("isMobile"),r=i=>{window.open(i)},n=()=>pe(W,{flexDirection:"row",gap:"4",children:uqe.map((i,o)=>pe(W,{onClick:()=>r(i.url),className:kN,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:i.label})},o))}),s=()=>pe(W,{gap:"4",justifyContent:"center",alignItems:"center",children:dqe.map((i,o)=>pe(W,{className:kN,onClick:()=>window.open(i.url),children:pe(fr,{height:"3",src:i.icon,alt:i.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?Vs(W,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(s,{})]}):Vs(W,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(s,{})]})},vqe=t=>{const e=String(Math.round(new Date().getTime()/1e3)+3600),r="1";return{creditCardCheckout:{chainId:137,receiptTitle:"Custom Sequence Kit Checkout Demo",abi:JSON.stringify(cqe),methodName:"buyTokens",methodArguments:{_recipient:"$WALLET",_deadline:e,_maxCurrency:`${Number(r)*10**6}`,_tokenIds:["65570"],_tokensBoughtAmounts:["100"],_extraFeeRecipients:[],_extraFeeAmounts:[]},recipientAddress:t||"",contractAddress:"0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334",currency:"USDC",currencyAmount:`${r}`,collectionContractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",onSuccess:()=>{console.log("success")},onError:()=>{console.log("error")}},cryptoCheckout:{chainId:137,triggerTransaction:async()=>{console.log("triggered transaction")},coinQuantity:{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",amountRequiredRaw:"10000000000"}},orderSummaryItems:[{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",tokenId:"66597",quantityRaw:"100"},{contractAddress:"0x624e4fa6980afcf8ea27bfe08e2fb5979b64df1c",tokenId:"1741",quantityRaw:"100"}]}},yqe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},mqe=t=>`0x${yqe((t==null?void 0:t.substring(2))||"",8)}`;function pqe(){const{theme:t,setTheme:e}=Na(),{address:r,connector:n,isConnected:s}=Tn(),{setOpenConnectModal:i}=YIe(),{setOpenWalletModal:o}=V0(),{triggerCheckout:a}=H0(),{disconnect:l}=rV(),{data:c}=p4(),f=Zz(),{debug:u}=lqe.parse(location.search),d=u==="true",h=async()=>{if(!(!c||!f))try{const k=await HIe(c);console.log("proof:",k);const $=await GIe(c,f,k);console.log("isValid?:",$)}catch(k){console.error(k)}},v=async()=>{if(c)try{const k=fqe,$=await c.signMessage({account:r||"",message:k});console.log("signature:",$);const[x]=await c.getAddresses(),T=await f.verifyMessage({address:x,message:k,signature:$});console.log("isValid?",T)}catch(k){console.error(k)}},y=()=>{e(t==="dark"?"light":"dark")},g=()=>s?Vs(W,{padding:"5",justifyContent:"space-between",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{children:Vs(W,{flexDirection:"column",children:[Vs(W,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(W,{style:{marginRight:"-12px"},children:pe(E,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:mqe(r||"")})]}),pe(W,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:n==null?void 0:n.name})})]})})]}):pe(W,{padding:"5",justifyContent:"flex-end",children:pe(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(E,{})})}),b=({title:k,description:$,onClick:x})=>Vs(To,{style:{width:"332px"},clickable:!0,onClick:x,children:[pe(re,{lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:k}),pe(W,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:$})})]}),p=()=>{i(!0)},w=()=>{a(vqe(r))},E=()=>pe(nt,{variant:"base",onClick:y,leftIcon:t==="dark"?nae:Uoe});return Vs(W,{background:"backgroundPrimary",children:[d&&pe(W,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(W,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(g,{})}),pe(W,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?Vs(W,{flexDirection:"column",gap:"4",children:[Vs(W,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(b,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>o(!0)}),pe(b,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:w}),pe(b,{title:"Sign message",description:"Sign a message with your wallet",onClick:v}),d&&pe(b,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:h})]}),pe(W,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(nt,{onClick:()=>l(),leftIcon:sB,label:"Sign out"})})]}):pe(W,{children:Vs(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(nt,{onClick:p,variant:"feature",label:"Connect"})})]})})}),pe(hqe,{})]})}function gqe(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function bqe(){const{chains:t,publicClient:e,webSocketPublicClient:r}=s0e([w0e,b0e],[gqe()]),n=j9e({chains:t,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),s=T0e({autoConnect:!0,publicClient:e,webSocketPublicClient:r,connectors:n}),i={defaultTheme:LY.dark,signIn:{projectName:"Skyweaver"}};return pe(fw,{theme:"dark",children:pe(R0e,{config:s,children:pe(oOe,{config:i,children:pe(KUe,{children:pe(YVe,{children:pe(pqe,{})})})})})})}const wqe=j5.createRoot(document.getElementById("root"));wqe.render(pe(P.StrictMode,{children:pe(bqe,{})}));export{cx as $,HWe as A,WWe as B,EWe as C,SWe as D,di as E,MWe as F,IWe as G,OWe as H,ff as I,PSe as J,TSe as K,AG as L,_We as M,xWe as N,FWe as O,ESe as P,BWe as Q,fx as R,$We as S,RA as T,GWe as U,kWe as V,VWe as W,TWe as X,PWe as Y,$G as Z,wWe as _,cf as a,jWe as a0,qWe as a1,YWe as a2,QWe as a3,lke as a4,oHe as a5,ZWe as a6,cke as a7,KWe as a8,nHe as a9,eHe as aa,sHe as ab,aHe as ac,tHe as ad,rHe as ae,iHe as af,JWe as ag,$N as ah,ZSe as ai,PG as aj,WE as ak,mWe as al,xz as am,fe as an,hw as ao,qn as ap,Bd as aq,oy as ar,rve as as,Sw as at,ya as au,v0 as av,nv as aw,Ro as ax,qe as b,Wr as c,Wi as d,vI as e,Ii as f,tZ as g,cl as h,pWe as i,gWe as j,bWe as k,CWe as l,cs as m,RWe as n,D0 as o,DWe as p,AWe as q,nx as r,UWe as s,Zd as t,LWe as u,eh as v,Gi as w,NWe as x,zWe as y,XWe as z}; +And that has made all the difference.`,lqe=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz"}],cqe=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var kN="u3q5o00";const fqe=()=>{const{theme:t}=Na(),e=gde("isMobile"),r=i=>{window.open(i)},n=()=>pe(W,{flexDirection:"row",gap:"4",children:lqe.map((i,o)=>pe(W,{onClick:()=>r(i.url),className:kN,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:i.label})},o))}),s=()=>pe(W,{gap:"4",justifyContent:"center",alignItems:"center",children:cqe.map((i,o)=>pe(W,{className:kN,onClick:()=>window.open(i.url),children:pe(fr,{height:"3",src:i.icon,alt:i.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?Vs(W,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(s,{})]}):Vs(W,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(s,{})]})},uqe=t=>({cryptoCheckout:{chainId:137,triggerTransaction:async()=>{console.log("triggered transaction")},coinQuantity:{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",amountRequiredRaw:"10000000000"}},orderSummaryItems:[{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",tokenId:"66597",quantityRaw:"100"},{contractAddress:"0x624e4fa6980afcf8ea27bfe08e2fb5979b64df1c",tokenId:"1741",quantityRaw:"100"}]}),dqe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},hqe=t=>`0x${dqe((t==null?void 0:t.substring(2))||"",8)}`;function vqe(){const{theme:t,setTheme:e}=Na(),{address:r,connector:n,isConnected:s}=Tn(),{setOpenConnectModal:i}=KIe(),{setOpenWalletModal:o}=V0(),{triggerCheckout:a}=H0(),{disconnect:l}=rV(),{data:c}=p4(),f=Zz(),{debug:u}=oqe.parse(location.search),d=u==="true",h=async()=>{if(!(!c||!f))try{const k=await qIe(c);console.log("proof:",k);const A=await WIe(c,f,k);console.log("isValid?:",A)}catch(k){console.error(k)}},v=async()=>{if(c)try{const k=aqe,A=await c.signMessage({account:r||"",message:k});console.log("signature:",A);const[x]=await c.getAddresses(),T=await f.verifyMessage({address:x,message:k,signature:A});console.log("isValid?",T)}catch(k){console.error(k)}},y=()=>{e(t==="dark"?"light":"dark")},g=()=>s?Vs(W,{padding:"5",justifyContent:"space-between",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{children:Vs(W,{flexDirection:"column",children:[Vs(W,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(W,{style:{marginRight:"-12px"},children:pe(E,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:hqe(r||"")})]}),pe(W,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:n==null?void 0:n.name})})]})})]}):pe(W,{padding:"5",justifyContent:"flex-end",children:pe(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(E,{})})}),b=({title:k,description:A,onClick:x})=>Vs(To,{style:{width:"332px"},clickable:!0,onClick:x,children:[pe(re,{lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:k}),pe(W,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:A})})]}),p=()=>{i(!0)},w=()=>{a(uqe())},E=()=>pe(it,{variant:"base",onClick:y,leftIcon:t==="dark"?tae:Uoe});return Vs(W,{background:"backgroundPrimary",children:[d&&pe(W,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(W,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(g,{})}),pe(W,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?Vs(W,{flexDirection:"column",gap:"4",children:[Vs(W,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(b,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>o(!0)}),pe(b,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:w}),pe(b,{title:"Sign message",description:"Sign a message with your wallet",onClick:v}),d&&pe(b,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:h})]}),pe(W,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(it,{onClick:()=>l(),leftIcon:sB,label:"Sign out"})})]}):pe(W,{children:Vs(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(it,{onClick:p,variant:"feature",label:"Connect"})})]})})}),pe(fqe,{})]})}function yqe(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function mqe(){const{chains:t,publicClient:e,webSocketPublicClient:r}=r0e([g0e,p0e],[yqe()]),n=NRe({chains:t,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),s=_0e({autoConnect:!0,publicClient:e,webSocketPublicClient:r,connectors:n}),i={defaultTheme:LY.dark,signIn:{projectName:"Skyweaver"}};return pe(fw,{theme:"dark",children:pe(P0e,{config:s,children:pe(sOe,{config:i,children:pe(HUe,{children:pe(KVe,{children:pe(vqe,{})})})})})})}const pqe=j5.createRoot(document.getElementById("root"));pqe.render(pe(P.StrictMode,{children:pe(mqe,{})}));export{cx as $,VWe as A,zWe as B,wWe as C,xWe as D,di as E,RWe as F,PWe as G,TWe as H,ff as I,ASe as J,_Se as K,AG as L,kWe as M,gWe as N,NWe as O,xSe as P,LWe as Q,fx as R,EWe as S,RA as T,qWe as U,CWe as V,BWe as W,AWe as X,$We as Y,$G as Z,pWe as _,cf as a,DWe as a0,UWe as a1,GWe as a2,HWe as a3,oke as a4,nHe as a5,YWe as a6,ake as a7,WWe as a8,eHe as a9,JWe as aa,tHe as ab,sHe as ac,XWe as ad,ZWe as ae,rHe as af,KWe as ag,$N as ah,JSe as ai,PG as aj,WE as ak,hWe as al,xz as am,fe as an,hw as ao,qn as ap,Bd as aq,oy as ar,eve as as,Sw as at,ya as au,v0 as av,nv as aw,Ro as ax,qe as b,Wr as c,qi as d,vI as e,Ii as f,tZ as g,cl as h,vWe as i,yWe as j,mWe as k,bWe as l,cs as m,_We as n,D0 as o,IWe as p,SWe as q,nx as r,jWe as s,Zd as t,MWe as u,eh as v,Hi as w,OWe as x,FWe as y,QWe as z}; diff --git a/assets/index.es-d71ec09d.js b/assets/index.es-2d618dfa.js similarity index 99% rename from assets/index.es-d71ec09d.js rename to assets/index.es-2d618dfa.js index fe2d94d3..2bba314c 100644 --- a/assets/index.es-d71ec09d.js +++ b/assets/index.es-2d618dfa.js @@ -1,4 +1,4 @@ -import{c as hr,t as bi,g as f1,a as ne,b as p1,w as $l,r as jl,f as vc,d as fo,e as d1,I as _i,A as g1,U as v1,h as Q,i as y1,j as cc,k as m1,_ as _1,P as w1,V as Ah,l as b1,D as E1,C as x1,Z as Ch,$ as I1,m as S1,n as oo,q as P1,o as Ml,p as Fr,y as A1,s as C1,X as cs,u as Ft,v as rr,x as mi,z as ur,B as O1,E as us,F as Ul,G as R1,H as T1,J as N1,K as ql,L as L1,M as zl,Y as kl,N as ls,O as uc,Q as ro,R as ps,S as D1,T as io,W as F1,a0 as $1,a1 as j1,a2 as M1,a3 as U1,a4 as Va,a5 as Oh,a6 as q1,a7 as z1,a8 as k1,a9 as Rh,aa as H1,ab as B1,ac as V1,ad as K1,ae as G1,af as W1,ag as J1,ah as Y1,ai as so,aj as Hl,ak as Ka,al as X1,am as Z1}from"./index-aa62d2a2.js";var kt={},Q1={get exports(){return kt},set exports(c){kt=c}},fs=typeof Reflect=="object"?Reflect:null,Th=fs&&typeof fs.apply=="function"?fs.apply:function(r,i,n){return Function.prototype.apply.call(r,i,n)},no;fs&&typeof fs.ownKeys=="function"?no=fs.ownKeys:Object.getOwnPropertySymbols?no=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:no=function(r){return Object.getOwnPropertyNames(r)};function em(c){console&&console.warn&&console.warn(c)}var Bl=Number.isNaN||function(r){return r!==r};function He(){He.init.call(this)}Q1.exports=He;kt.once=sm;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var Nh=10;function po(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}Object.defineProperty(He,"defaultMaxListeners",{enumerable:!0,get:function(){return Nh},set:function(c){if(typeof c!="number"||c<0||Bl(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");Nh=c}});He.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};He.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Bl(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Vl(c){return c._maxListeners===void 0?He.defaultMaxListeners:c._maxListeners}He.prototype.getMaxListeners=function(){return Vl(this)};He.prototype.emit=function(r){for(var i=[],n=1;n0&&(d=i[0]),d instanceof Error)throw d;var y=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw y.context=d,y}var w=h[r];if(w===void 0)return!1;if(typeof w=="function")Th(w,this,i);else for(var A=w.length,F=Yl(w,A),n=0;n0&&d.length>o&&!d.warned){d.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=c,y.type=r,y.count=d.length,em(y)}return c}He.prototype.addListener=function(r,i){return Kl(this,r,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(r,i){return Kl(this,r,i,!0)};function tm(){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 Gl(c,r,i){var n={fired:!1,wrapFn:void 0,target:c,type:r,listener:i},o=tm.bind(n);return o.listener=i,n.wrapFn=o,o}He.prototype.once=function(r,i){return po(i),this.on(r,Gl(this,r,i)),this};He.prototype.prependOnceListener=function(r,i){return po(i),this.prependListener(r,Gl(this,r,i)),this};He.prototype.removeListener=function(r,i){var n,o,h,d,y;if(po(i),o=this._events,o===void 0)return this;if(n=o[r],n===void 0)return this;if(n===i||n.listener===i)--this._eventsCount===0?this._events=Object.create(null):(delete o[r],o.removeListener&&this.emit("removeListener",r,n.listener||i));else if(typeof n!="function"){for(h=-1,d=n.length-1;d>=0;d--)if(n[d]===i||n[d].listener===i){y=n[d].listener,h=d;break}if(h<0)return this;h===0?n.shift():rm(n,h),n.length===1&&(o[r]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",r,y||i)}return this};He.prototype.off=He.prototype.removeListener;He.prototype.removeAllListeners=function(r){var i,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var h=Object.keys(n),d;for(o=0;o=0;o--)this.removeListener(r,i[o]);return this};function Wl(c,r,i){var n=c._events;if(n===void 0)return[];var o=n[r];return o===void 0?[]:typeof o=="function"?i?[o.listener||o]:[o]:i?im(o):Yl(o,o.length)}He.prototype.listeners=function(r){return Wl(this,r,!0)};He.prototype.rawListeners=function(r){return Wl(this,r,!1)};He.listenerCount=function(c,r){return typeof c.listenerCount=="function"?c.listenerCount(r):Jl.call(c,r)};He.prototype.listenerCount=Jl;function Jl(c){var r=this._events;if(r!==void 0){var i=r[c];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}He.prototype.eventNames=function(){return this._eventsCount>0?no(this._events):[]};function Yl(c,r){for(var i=new Array(r),n=0;ntypeof i>"u"?null:i)}Ks.safeJsonStringify=am;var ao={},Ga={get exports(){return ao},set exports(c){ao=c}},Lh;function cm(){return Lh||(Lh=1,function(){let c;function r(){}c=r,c.prototype.getItem=function(i){return this.hasOwnProperty(i)?String(this[i]):null},c.prototype.setItem=function(i,n){this[i]=String(n)},c.prototype.removeItem=function(i){delete this[i]},c.prototype.clear=function(){const i=this;Object.keys(i).forEach(function(n){i[n]=void 0,delete i[n]})},c.prototype.key=function(i){return i=i||0,Object.keys(this)[i]},c.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof hr<"u"&&hr.localStorage?Ga.exports=hr.localStorage:typeof window<"u"&&window.localStorage?Ga.exports=window.localStorage:Ga.exports=new r}()),ao}var Wa={},Ds={},Dh;function um(){if(Dh)return Ds;Dh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.IKeyValueStorage=void 0;class c{}return Ds.IKeyValueStorage=c,Ds}var Fs={},Fh;function hm(){if(Fh)return Fs;Fh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.parseEntry=void 0;const c=Ks;function r(i){var n;return[i[0],c.safeJsonParse((n=i[1])!==null&&n!==void 0?n:"")]}return Fs.parseEntry=r,Fs}var $h;function lm(){return $h||($h=1,function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(um(),c),r.__exportStar(hm(),c)}(Wa)),Wa}Object.defineProperty(go,"__esModule",{value:!0});go.KeyValueStorage=void 0;const hs=bi,jh=Ks,fm=hs.__importDefault(cm()),pm=lm();class Zl{constructor(){this.localStorage=fm.default}getKeys(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(pm.parseEntry)})}getItem(r){return hs.__awaiter(this,void 0,void 0,function*(){const i=this.localStorage.getItem(r);if(i!==null)return jh.safeJsonParse(i)})}setItem(r,i){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(r,jh.safeJsonStringify(i))})}removeItem(r){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(r)})}}go.KeyValueStorage=Zl;var dm=go.default=Zl,ds={},$s={},Ja={},js={};let qi=class{};const gm=Object.freeze(Object.defineProperty({__proto__:null,IEvents:qi},Symbol.toStringTag,{value:"Module"})),vm=f1(gm);var Mh;function ym(){if(Mh)return js;Mh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.IHeartBeat=void 0;const c=vm;class r extends c.IEvents{constructor(n){super()}}return js.IHeartBeat=r,js}var Uh;function Ql(){return Uh||(Uh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(ym(),c)}(Ja)),Ja}var Ya={},Mi={},qh;function mm(){if(qh)return Mi;qh=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.HEARTBEAT_EVENTS=Mi.HEARTBEAT_INTERVAL=void 0;const c=ne;return Mi.HEARTBEAT_INTERVAL=c.FIVE_SECONDS,Mi.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Mi}var zh;function ef(){return zh||(zh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(mm(),c)}(Ya)),Ya}var kh;function _m(){if(kh)return $s;kh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.HeartBeat=void 0;const c=bi,r=kt,i=ne,n=Ql(),o=ef();class h extends n.IHeartBeat{constructor(y){super(y),this.events=new r.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(y==null?void 0:y.interval)||o.HEARTBEAT_INTERVAL}static init(y){return c.__awaiter(this,void 0,void 0,function*(){const w=new h(y);return yield w.init(),w})}init(){return c.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(y,w){this.events.on(y,w)}once(y,w){this.events.once(y,w)}off(y,w){this.events.off(y,w)}removeListener(y,w){this.events.removeListener(y,w)}initialize(){return c.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),i.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return $s.HeartBeat=h,$s}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(_m(),c),r.__exportStar(Ql(),c),r.__exportStar(ef(),c)})(ds);var Re={},Xa,Hh;function wm(){if(Hh)return Xa;Hh=1;function c(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Xa=r;function r(i,n,o){var h=o&&o.stringify||c,d=1;if(typeof i=="object"&&i!==null){var y=n.length+d;if(y===1)return i;var w=new Array(y);w[0]=h(i);for(var A=1;A-1?G:0,i.charCodeAt(V+1)){case 100:case 102:if(J>=F||n[J]==null)break;G=F||n[J]==null)break;G=F||n[J]===void 0)break;G",G=V+2,V++;break}K+=h(n[J]),G=V+2,V++;break;case 115:if(J>=F)break;G-1&&(ue=!1);const Te=["error","fatal","warn","info","debug","trace"];typeof B=="function"&&(B.error=B.fatal=B.warn=B.info=B.debug=B.trace=B),T.enabled===!1&&(T.level="silent");const qe=T.level||"info",v=Object.create(B);v.log||(v.log=ie),Object.defineProperty(v,"levelVal",{get:X}),Object.defineProperty(v,"level",{get:ce,set:k});const E={transmit:M,serialize:re,asObject:T.browser.asObject,levels:Te,timestamp:G(T)};v.levels=o.levels,v.level=qe,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=ie,v.serializers=ve,v._serialize=re,v._stdErrSerialize=ue,v.child=U,M&&(v._logEvent=K());function X(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ce(){return this._level}function k(z){if(z!=="silent"&&!this.levels.values[z])throw Error("unknown level "+z);this._level=z,h(E,v,"error","log"),h(E,v,"fatal","error"),h(E,v,"warn","error"),h(E,v,"info","log"),h(E,v,"debug","log"),h(E,v,"trace","log")}function U(z,H){if(!z)throw new Error("missing bindings for child Pino");H=H||{},re&&z.serializers&&(H.serializers=z.serializers);const Ye=H.serializers;if(re&&Ye){var Be=Object.assign({},ve,Ye),jr=T.browser.serialize===!0?Object.keys(Be):re;delete z.serializers,w([z],jr,Be,this._stdErrSerialize)}function xe(St){this._childLevel=(St._childLevel|0)+1,this.error=A(St,z,"error"),this.fatal=A(St,z,"fatal"),this.warn=A(St,z,"warn"),this.info=A(St,z,"info"),this.debug=A(St,z,"debug"),this.trace=A(St,z,"trace"),Be&&(this.serializers=Be,this._serialize=jr),M&&(this._logEvent=K([].concat(St._logEvent.bindings,z)))}return xe.prototype=this,new xe(this)}return v}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=i,o.stdTimeFunctions=Object.assign({},{nullTime:Ee,epochTime:ge,unixTime:pe,isoTime:he});function h(T,M,B,ve){const re=Object.getPrototypeOf(M);M[B]=M.levelVal>M.levels.values[B]?ie:re[B]?re[B]:r[B]||r[ve]||ie,d(T,M,B)}function d(T,M,B){!T.transmit&&M[B]===ie||(M[B]=function(ve){return function(){const ue=T.timestamp(),Te=new Array(arguments.length),qe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===r?r:this;for(var v=0;v-1&&ue in B&&(T[re][ue]=B[ue](T[re][ue]))}function A(T,M,B){return function(){const ve=new Array(1+arguments.length);ve[0]=M;for(var re=1;re"u"?A=i(y,w):A=y.bindings().context||"",A}tr.getLoggerContext=o;function h(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=o(y,A);return F.trim()?`${F}/${w}`:w}tr.formatChildLoggerContext=h;function d(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=h(y,w,A),K=y.child({context:F});return n(K,F,A)}return tr.generateChildLogger=d,tr}(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.pino=void 0;const r=bi,i=r.__importDefault(bm());Object.defineProperty(c,"pino",{enumerable:!0,get:function(){return i.default}}),r.__exportStar(tf(),c),r.__exportStar(Em(),c)})(Re);class xm extends qi{constructor(r){super(),this.opts=r,this.protocol="wc",this.version=2}}class Im extends qi{constructor(r,i){super(),this.core=r,this.logger=i,this.records=new Map}}class Sm{constructor(r,i){this.logger=r,this.core=i}}let Pm=class extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}},Am=class extends qi{constructor(r){super()}},Cm=class{constructor(r,i,n,o){this.core=r,this.logger=i,this.name=n}};class Om extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}}let Rm=class extends qi{constructor(r,i){super(),this.core=r,this.logger=i}},Tm=class{constructor(r,i){this.projectId=r,this.logger=i}},Nm=class{constructor(r){this.opts=r,this.protocol="wc",this.version=2}},Lm=class{constructor(r){this.client=r}};const Dm=c=>JSON.stringify(c,(r,i)=>typeof i=="bigint"?i.toString()+"n":i),Fm=c=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,i=c.replace(r,'$1"$2n"$3');return JSON.parse(i,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function yc(c){if(typeof c!="string")throw new Error(`Cannot safe json parse value of type ${typeof c}`);try{return Fm(c)}catch{return c}}function Vs(c){return typeof c=="string"?c:Dm(c)||""}var mc={},rf={};(function(c){Object.defineProperty(c,"__esModule",{value:!0});var r=p1,i=$l;c.DIGEST_LENGTH=64,c.BLOCK_SIZE=128;var n=function(){function y(){this.digestLength=c.DIGEST_LENGTH,this.blockSize=c.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},y.prototype.update=function(w,A){if(A===void 0&&(A=w.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var F=0;if(this._bytesHashed+=A,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=w[F++],A--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(A>=this.blockSize&&(F=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,w,F,A),A%=this.blockSize);A>0;)this._buffer[this._bufferLength++]=w[F++],A--;return this},y.prototype.finish=function(w){if(!this._finished){var A=this._bytesHashed,F=this._bufferLength,K=A/536870912|0,J=A<<3,G=A%128<112?128:256;this._buffer[F]=128;for(var j=F+1;j0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(w){return this._stateHi.set(w.stateHi),this._stateLo.set(w.stateLo),this._bufferLength=w.bufferLength,w.buffer&&this._buffer.set(w.buffer),this._bytesHashed=w.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(w){i.wipe(w.stateHi),i.wipe(w.stateLo),w.buffer&&i.wipe(w.buffer),w.bufferLength=0,w.bytesHashed=0},y}();c.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function h(y,w,A,F,K,J,G){for(var j=A[0],V=A[1],ie=A[2],Ee=A[3],ge=A[4],pe=A[5],he=A[6],le=A[7],T=F[0],M=F[1],B=F[2],ve=F[3],re=F[4],ue=F[5],Te=F[6],qe=F[7],v,E,X,ce,k,U,z,H;G>=128;){for(var Ye=0;Ye<16;Ye++){var Be=8*Ye+J;y[Ye]=r.readUint32BE(K,Be),w[Ye]=r.readUint32BE(K,Be+4)}for(var Ye=0;Ye<80;Ye++){var jr=j,xe=V,St=ie,R=Ee,O=ge,P=pe,u=he,b=le,ee=T,fe=M,we=B,Ne=ve,De=re,Pe=ue,Pt=Te,_t=qe;if(v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(ge>>>14|re<<32-14)^(ge>>>18|re<<32-18)^(re>>>41-32|ge<<32-(41-32)),E=(re>>>14|ge<<32-14)^(re>>>18|ge<<32-18)^(ge>>>41-32|re<<32-(41-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=ge&pe^~ge&he,E=re&ue^~re&Te,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=o[Ye*2],E=o[Ye*2+1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=y[Ye%16],E=w[Ye%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,X=z&65535|H<<16,ce=k&65535|U<<16,v=X,E=ce,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(j>>>28|T<<32-28)^(T>>>34-32|j<<32-(34-32))^(T>>>39-32|j<<32-(39-32)),E=(T>>>28|j<<32-28)^(j>>>34-32|T<<32-(34-32))^(j>>>39-32|T<<32-(39-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=j&V^j&ie^V&ie,E=T&M^T&B^M&B,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,b=z&65535|H<<16,_t=k&65535|U<<16,v=R,E=Ne,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=X,E=ce,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,R=z&65535|H<<16,Ne=k&65535|U<<16,V=jr,ie=xe,Ee=St,ge=R,pe=O,he=P,le=u,j=b,M=ee,B=fe,ve=we,re=Ne,ue=De,Te=Pe,qe=Pt,T=_t,Ye%16===15)for(var Be=0;Be<16;Be++)v=y[Be],E=w[Be],k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=y[(Be+9)%16],E=w[(Be+9)%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+1)%16],ce=w[(Be+1)%16],v=(X>>>1|ce<<32-1)^(X>>>8|ce<<32-8)^X>>>7,E=(ce>>>1|X<<32-1)^(ce>>>8|X<<32-8)^(ce>>>7|X<<32-7),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+14)%16],ce=w[(Be+14)%16],v=(X>>>19|ce<<32-19)^(ce>>>61-32|X<<32-(61-32))^X>>>6,E=(ce>>>19|X<<32-19)^(X>>>61-32|ce<<32-(61-32))^(ce>>>6|X<<32-6),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,y[Be]=z&65535|H<<16,w[Be]=k&65535|U<<16}v=j,E=T,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[0],E=F[0],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[0]=j=z&65535|H<<16,F[0]=T=k&65535|U<<16,v=V,E=M,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[1],E=F[1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[1]=V=z&65535|H<<16,F[1]=M=k&65535|U<<16,v=ie,E=B,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[2],E=F[2],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[2]=ie=z&65535|H<<16,F[2]=B=k&65535|U<<16,v=Ee,E=ve,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[3],E=F[3],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[3]=Ee=z&65535|H<<16,F[3]=ve=k&65535|U<<16,v=ge,E=re,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[4],E=F[4],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[4]=ge=z&65535|H<<16,F[4]=re=k&65535|U<<16,v=pe,E=ue,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[5],E=F[5],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[5]=pe=z&65535|H<<16,F[5]=ue=k&65535|U<<16,v=he,E=Te,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[6],E=F[6],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[6]=he=z&65535|H<<16,F[6]=Te=k&65535|U<<16,v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[7],E=F[7],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[7]=le=z&65535|H<<16,F[7]=qe=k&65535|U<<16,J+=128,G-=128}return J}function d(y){var w=new n;w.update(y);var A=w.digest();return w.clean(),A}c.hash=d})(rf);(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.convertSecretKeyToX25519=c.convertPublicKeyToX25519=c.verify=c.sign=c.extractPublicKeyFromSecretKey=c.generateKeyPair=c.generateKeyPairFromSeed=c.SEED_LENGTH=c.SECRET_KEY_LENGTH=c.PUBLIC_KEY_LENGTH=c.SIGNATURE_LENGTH=void 0;const r=jl,i=rf,n=$l;c.SIGNATURE_LENGTH=64,c.PUBLIC_KEY_LENGTH=32,c.SECRET_KEY_LENGTH=64,c.SEED_LENGTH=32;function o(R){const O=new Float64Array(16);if(R)for(let P=0;P>16&1),P[fe-1]&=65535;P[15]=u[15]-32767-(P[14]>>16&1);const ee=P[15]>>16&1;P[14]&=65535,V(u,P,1-ee)}for(let b=0;b<16;b++)R[2*b]=u[b]&255,R[2*b+1]=u[b]>>8}function Ee(R,O){let P=0;for(let u=0;u<32;u++)P|=R[u]^O[u];return(1&P-1>>>8)-1}function ge(R,O){const P=new Uint8Array(32),u=new Uint8Array(32);return ie(P,R),ie(u,O),Ee(P,u)}function pe(R){const O=new Uint8Array(32);return ie(O,R),O[0]&1}function he(R,O){for(let P=0;P<16;P++)R[P]=O[2*P]+(O[2*P+1]<<8);R[15]&=32767}function le(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]+P[u]}function T(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]-P[u]}function M(R,O,P){let u,b,ee=0,fe=0,we=0,Ne=0,De=0,Pe=0,Pt=0,_t=0,ot=0,$e=0,Ze=0,Qe=0,at=0,ze=0,et=0,Le=0,Ve=0,ht=0,Me=0,At=0,$t=0,Ht=0,Bt=0,Ut=0,Jt=0,ir=0,Mr=0,Yt=0,Kr=0,ai=0,Ii=0,lt=P[0],it=P[1],ft=P[2],pt=P[3],ct=P[4],st=P[5],Ct=P[6],Ot=P[7],dt=P[8],Rt=P[9],gt=P[10],wt=P[11],vt=P[12],Xe=P[13],Tt=P[14],Nt=P[15];u=O[0],ee+=u*lt,fe+=u*it,we+=u*ft,Ne+=u*pt,De+=u*ct,Pe+=u*st,Pt+=u*Ct,_t+=u*Ot,ot+=u*dt,$e+=u*Rt,Ze+=u*gt,Qe+=u*wt,at+=u*vt,ze+=u*Xe,et+=u*Tt,Le+=u*Nt,u=O[1],fe+=u*lt,we+=u*it,Ne+=u*ft,De+=u*pt,Pe+=u*ct,Pt+=u*st,_t+=u*Ct,ot+=u*Ot,$e+=u*dt,Ze+=u*Rt,Qe+=u*gt,at+=u*wt,ze+=u*vt,et+=u*Xe,Le+=u*Tt,Ve+=u*Nt,u=O[2],we+=u*lt,Ne+=u*it,De+=u*ft,Pe+=u*pt,Pt+=u*ct,_t+=u*st,ot+=u*Ct,$e+=u*Ot,Ze+=u*dt,Qe+=u*Rt,at+=u*gt,ze+=u*wt,et+=u*vt,Le+=u*Xe,Ve+=u*Tt,ht+=u*Nt,u=O[3],Ne+=u*lt,De+=u*it,Pe+=u*ft,Pt+=u*pt,_t+=u*ct,ot+=u*st,$e+=u*Ct,Ze+=u*Ot,Qe+=u*dt,at+=u*Rt,ze+=u*gt,et+=u*wt,Le+=u*vt,Ve+=u*Xe,ht+=u*Tt,Me+=u*Nt,u=O[4],De+=u*lt,Pe+=u*it,Pt+=u*ft,_t+=u*pt,ot+=u*ct,$e+=u*st,Ze+=u*Ct,Qe+=u*Ot,at+=u*dt,ze+=u*Rt,et+=u*gt,Le+=u*wt,Ve+=u*vt,ht+=u*Xe,Me+=u*Tt,At+=u*Nt,u=O[5],Pe+=u*lt,Pt+=u*it,_t+=u*ft,ot+=u*pt,$e+=u*ct,Ze+=u*st,Qe+=u*Ct,at+=u*Ot,ze+=u*dt,et+=u*Rt,Le+=u*gt,Ve+=u*wt,ht+=u*vt,Me+=u*Xe,At+=u*Tt,$t+=u*Nt,u=O[6],Pt+=u*lt,_t+=u*it,ot+=u*ft,$e+=u*pt,Ze+=u*ct,Qe+=u*st,at+=u*Ct,ze+=u*Ot,et+=u*dt,Le+=u*Rt,Ve+=u*gt,ht+=u*wt,Me+=u*vt,At+=u*Xe,$t+=u*Tt,Ht+=u*Nt,u=O[7],_t+=u*lt,ot+=u*it,$e+=u*ft,Ze+=u*pt,Qe+=u*ct,at+=u*st,ze+=u*Ct,et+=u*Ot,Le+=u*dt,Ve+=u*Rt,ht+=u*gt,Me+=u*wt,At+=u*vt,$t+=u*Xe,Ht+=u*Tt,Bt+=u*Nt,u=O[8],ot+=u*lt,$e+=u*it,Ze+=u*ft,Qe+=u*pt,at+=u*ct,ze+=u*st,et+=u*Ct,Le+=u*Ot,Ve+=u*dt,ht+=u*Rt,Me+=u*gt,At+=u*wt,$t+=u*vt,Ht+=u*Xe,Bt+=u*Tt,Ut+=u*Nt,u=O[9],$e+=u*lt,Ze+=u*it,Qe+=u*ft,at+=u*pt,ze+=u*ct,et+=u*st,Le+=u*Ct,Ve+=u*Ot,ht+=u*dt,Me+=u*Rt,At+=u*gt,$t+=u*wt,Ht+=u*vt,Bt+=u*Xe,Ut+=u*Tt,Jt+=u*Nt,u=O[10],Ze+=u*lt,Qe+=u*it,at+=u*ft,ze+=u*pt,et+=u*ct,Le+=u*st,Ve+=u*Ct,ht+=u*Ot,Me+=u*dt,At+=u*Rt,$t+=u*gt,Ht+=u*wt,Bt+=u*vt,Ut+=u*Xe,Jt+=u*Tt,ir+=u*Nt,u=O[11],Qe+=u*lt,at+=u*it,ze+=u*ft,et+=u*pt,Le+=u*ct,Ve+=u*st,ht+=u*Ct,Me+=u*Ot,At+=u*dt,$t+=u*Rt,Ht+=u*gt,Bt+=u*wt,Ut+=u*vt,Jt+=u*Xe,ir+=u*Tt,Mr+=u*Nt,u=O[12],at+=u*lt,ze+=u*it,et+=u*ft,Le+=u*pt,Ve+=u*ct,ht+=u*st,Me+=u*Ct,At+=u*Ot,$t+=u*dt,Ht+=u*Rt,Bt+=u*gt,Ut+=u*wt,Jt+=u*vt,ir+=u*Xe,Mr+=u*Tt,Yt+=u*Nt,u=O[13],ze+=u*lt,et+=u*it,Le+=u*ft,Ve+=u*pt,ht+=u*ct,Me+=u*st,At+=u*Ct,$t+=u*Ot,Ht+=u*dt,Bt+=u*Rt,Ut+=u*gt,Jt+=u*wt,ir+=u*vt,Mr+=u*Xe,Yt+=u*Tt,Kr+=u*Nt,u=O[14],et+=u*lt,Le+=u*it,Ve+=u*ft,ht+=u*pt,Me+=u*ct,At+=u*st,$t+=u*Ct,Ht+=u*Ot,Bt+=u*dt,Ut+=u*Rt,Jt+=u*gt,ir+=u*wt,Mr+=u*vt,Yt+=u*Xe,Kr+=u*Tt,ai+=u*Nt,u=O[15],Le+=u*lt,Ve+=u*it,ht+=u*ft,Me+=u*pt,At+=u*ct,$t+=u*st,Ht+=u*Ct,Bt+=u*Ot,Ut+=u*dt,Jt+=u*Rt,ir+=u*gt,Mr+=u*wt,Yt+=u*vt,Kr+=u*Xe,ai+=u*Tt,Ii+=u*Nt,ee+=38*Ve,fe+=38*ht,we+=38*Me,Ne+=38*At,De+=38*$t,Pe+=38*Ht,Pt+=38*Bt,_t+=38*Ut,ot+=38*Jt,$e+=38*ir,Ze+=38*Mr,Qe+=38*Yt,at+=38*Kr,ze+=38*ai,et+=38*Ii,b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),R[0]=ee,R[1]=fe,R[2]=we,R[3]=Ne,R[4]=De,R[5]=Pe,R[6]=Pt,R[7]=_t,R[8]=ot,R[9]=$e,R[10]=Ze,R[11]=Qe,R[12]=at,R[13]=ze,R[14]=et,R[15]=Le}function B(R,O){M(R,O,O)}function ve(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=253;u>=0;u--)B(P,P),u!==2&&u!==4&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function re(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=250;u>=0;u--)B(P,P),u!==1&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function ue(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o(),De=o(),Pe=o();T(P,R[1],R[0]),T(Pe,O[1],O[0]),M(P,P,Pe),le(u,R[0],R[1]),le(Pe,O[0],O[1]),M(u,u,Pe),M(b,R[3],O[3]),M(b,b,A),M(ee,R[2],O[2]),le(ee,ee,ee),T(fe,u,P),T(we,ee,b),le(Ne,ee,b),le(De,u,P),M(R[0],fe,we),M(R[1],De,Ne),M(R[2],Ne,we),M(R[3],fe,De)}function Te(R,O,P){for(let u=0;u<4;u++)V(R[u],O[u],P)}function qe(R,O){const P=o(),u=o(),b=o();ve(b,O[2]),M(P,O[0],b),M(u,O[1],b),ie(R,u),R[31]^=pe(P)<<7}function v(R,O,P){G(R[0],d),G(R[1],y),G(R[2],y),G(R[3],d);for(let u=255;u>=0;--u){const b=P[u/8|0]>>(u&7)&1;Te(R,O,b),ue(O,R),ue(R,R),Te(R,O,b)}}function E(R,O){const P=[o(),o(),o(),o()];G(P[0],F),G(P[1],K),G(P[2],y),M(P[3],F,K),v(R,P,O)}function X(R){if(R.length!==c.SEED_LENGTH)throw new Error(`ed25519: seed must be ${c.SEED_LENGTH} bytes`);const O=(0,i.hash)(R);O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(32),u=[o(),o(),o(),o()];E(u,O),qe(P,u);const b=new Uint8Array(64);return b.set(R),b.set(P,32),{publicKey:P,secretKey:b}}c.generateKeyPairFromSeed=X;function ce(R){const O=(0,r.randomBytes)(32,R),P=X(O);return(0,n.wipe)(O),P}c.generateKeyPair=ce;function k(R){if(R.length!==c.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${c.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(R.subarray(32))}c.extractPublicKeyFromSecretKey=k;const U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function z(R,O){let P,u,b,ee;for(u=63;u>=32;--u){for(P=0,b=u-32,ee=u-12;b>4)*U[b],P=O[b]>>8,O[b]&=255;for(b=0;b<32;b++)O[b]-=P*U[b];for(u=0;u<32;u++)O[u+1]+=O[u]>>8,R[u]=O[u]&255}function H(R){const O=new Float64Array(64);for(let P=0;P<64;P++)O[P]=R[P];for(let P=0;P<64;P++)R[P]=0;z(R,O)}function Ye(R,O){const P=new Float64Array(64),u=[o(),o(),o(),o()],b=(0,i.hash)(R.subarray(0,32));b[0]&=248,b[31]&=127,b[31]|=64;const ee=new Uint8Array(64);ee.set(b.subarray(32),32);const fe=new i.SHA512;fe.update(ee.subarray(32)),fe.update(O);const we=fe.digest();fe.clean(),H(we),E(u,we),qe(ee,u),fe.reset(),fe.update(ee.subarray(0,32)),fe.update(R.subarray(32)),fe.update(O);const Ne=fe.digest();H(Ne);for(let De=0;De<32;De++)P[De]=we[De];for(let De=0;De<32;De++)for(let Pe=0;Pe<32;Pe++)P[De+Pe]+=Ne[De]*b[Pe];return z(ee.subarray(32),P),ee}c.sign=Ye;function Be(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o();return G(R[2],y),he(R[1],O),B(b,R[1]),M(ee,b,w),T(b,b,R[2]),le(ee,R[2],ee),B(fe,ee),B(we,fe),M(Ne,we,fe),M(P,Ne,b),M(P,P,ee),re(P,P),M(P,P,b),M(P,P,ee),M(P,P,ee),M(R[0],P,ee),B(u,R[0]),M(u,u,ee),ge(u,b)&&M(R[0],R[0],J),B(u,R[0]),M(u,u,ee),ge(u,b)?-1:(pe(R[0])===O[31]>>7&&T(R[0],d,R[0]),M(R[3],R[0],R[1]),0)}function jr(R,O,P){const u=new Uint8Array(32),b=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(P.length!==c.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${c.SIGNATURE_LENGTH} bytes`);if(Be(ee,R))return!1;const fe=new i.SHA512;fe.update(P.subarray(0,32)),fe.update(R),fe.update(O);const we=fe.digest();return H(we),v(b,ee,we),E(ee,P.subarray(32)),ue(b,ee),qe(u,b),!Ee(P,u)}c.verify=jr;function xe(R){let O=[o(),o(),o(),o()];if(Be(O,R))throw new Error("Ed25519: invalid public key");let P=o(),u=o(),b=O[1];le(P,y,b),T(u,y,b),ve(u,u),M(P,P,u);let ee=new Uint8Array(32);return ie(ee,P),ee}c.convertPublicKeyToX25519=xe;function St(R){const O=(0,i.hash)(R.subarray(0,32));O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(O.subarray(0,32));return(0,n.wipe)(O),P}c.convertSecretKeyToX25519=St})(mc);const $m="EdDSA",jm="JWT",sf=".",nf="base64url",Mm="utf8",Um="utf8",qm=":",zm="did",km="key",Gh="base58btc",Hm="z",Bm="K36",Vm=32;function co(c){return fo(vc(Vs(c),Mm),nf)}function of(c){const r=vc(Bm,Gh),i=Hm+fo(d1([r,c]),Gh);return[zm,km,i].join(qm)}function Km(c){return fo(c,nf)}function Gm(c){return vc([co(c.header),co(c.payload)].join(sf),Um)}function Wm(c){return[co(c.header),co(c.payload),Km(c.signature)].join(sf)}function Wh(c=jl.randomBytes(Vm)){return mc.generateKeyPairFromSeed(c)}async function Jm(c,r,i,n,o=ne.fromMiliseconds(Date.now())){const h={alg:$m,typ:jm},d=of(n.publicKey),y=o+i,w={iss:d,sub:c,aud:r,iat:o,exp:y},A=Gm({header:h,payload:w}),F=mc.sign(n.secretKey,A);return Wm({header:h,payload:w,signature:F})}const Ym="PARSE_ERROR",Xm="INVALID_REQUEST",Zm="METHOD_NOT_FOUND",Qm="INVALID_PARAMS",af="INTERNAL_ERROR",_c="SERVER_ERROR",e_=[-32700,-32600,-32601,-32602,-32603],Bs={[Ym]:{code:-32700,message:"Parse error"},[Xm]:{code:-32600,message:"Invalid Request"},[Zm]:{code:-32601,message:"Method not found"},[Qm]:{code:-32602,message:"Invalid params"},[af]:{code:-32603,message:"Internal error"},[_c]:{code:-32e3,message:"Server error"}},cf=_c;function t_(c){return e_.includes(c)}function Jh(c){return Object.keys(Bs).includes(c)?Bs[c]:Bs[cf]}function r_(c){const r=Object.values(Bs).find(i=>i.code===c);return r||Bs[cf]}function uf(c,r,i){return c.message.includes("getaddrinfo ENOTFOUND")||c.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${r}`):c}var hf={},si={},Yh;function i_(){if(Yh)return si;Yh=1,Object.defineProperty(si,"__esModule",{value:!0}),si.isBrowserCryptoAvailable=si.getSubtleCrypto=si.getBrowerCrypto=void 0;function c(){return(hr===null||hr===void 0?void 0:hr.crypto)||(hr===null||hr===void 0?void 0:hr.msCrypto)||{}}si.getBrowerCrypto=c;function r(){const n=c();return n.subtle||n.webkitSubtle}si.getSubtleCrypto=r;function i(){return!!c()&&!!r()}return si.isBrowserCryptoAvailable=i,si}var ni={},Xh;function s_(){if(Xh)return ni;Xh=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.isBrowser=ni.isNode=ni.isReactNative=void 0;function c(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ni.isReactNative=c;function r(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ni.isNode=r;function i(){return!c()&&!r()}return ni.isBrowser=i,ni}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(i_(),c),r.__exportStar(s_(),c)})(hf);function lf(c=3){const r=Date.now()*Math.pow(10,c),i=Math.floor(Math.random()*Math.pow(10,c));return r+i}function wc(c=6){return BigInt(lf(c))}function vo(c,r,i){return{id:i||lf(),jsonrpc:"2.0",method:c,params:r}}function bc(c,r){return{id:c,jsonrpc:"2.0",result:r}}function yo(c,r,i){return{id:c,jsonrpc:"2.0",error:n_(r,i)}}function n_(c,r){return typeof c>"u"?Jh(af):(typeof c=="string"&&(c=Object.assign(Object.assign({},Jh(_c)),{message:c})),typeof r<"u"&&(c.data=r),t_(c.code)&&(c=r_(c.code)),c)}class o_{}class a_ extends o_{constructor(){super()}}class c_ extends a_{constructor(r){super()}}const u_="^https?:",h_="^wss?:";function l_(c){const r=c.match(new RegExp(/^\w+:/,"gi"));if(!(!r||!r.length))return r[0]}function ff(c,r){const i=l_(c);return typeof i>"u"?!1:new RegExp(r).test(i)}function Zh(c){return ff(c,u_)}function Qh(c){return ff(c,h_)}function f_(c){return new RegExp("wss?://localhost(:d{2,5})?").test(c)}function pf(c){return typeof c=="object"&&"id"in c&&"jsonrpc"in c&&c.jsonrpc==="2.0"}function Ec(c){return pf(c)&&"method"in c}function mo(c){return pf(c)&&(oi(c)||$r(c))}function oi(c){return"result"in c}function $r(c){return"error"in c}class Ei extends c_{constructor(r){super(r),this.events=new kt.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(r),this.connection.connected&&this.registerEventListeners()}async connect(r=this.connection){await this.open(r)}async disconnect(){await this.close()}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async request(r,i){return this.requestStrict(vo(r.method,r.params||[],r.id||wc().toString()),i)}async requestStrict(r,i){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(h){o(h)}this.events.on(`${r.id}`,h=>{$r(h)?o(h.error):n(h.result)});try{await this.connection.send(r,i)}catch(h){o(h)}})}setConnection(r=this.connection){return r}onPayload(r){this.events.emit("payload",r),mo(r)?this.events.emit(`${r.id}`,r):this.events.emit("message",{type:r.method,data:r.params})}onClose(r){r&&r.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${r.code} ${r.reason?`(${r.reason})`:""}`)),this.events.emit("disconnect")}async open(r=this.connection){this.connection===r&&this.connection.connected||(this.connection.connected&&this.close(),typeof r=="string"&&(await this.connection.open(r),r=this.connection),this.connection=this.setConnection(r),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",r=>this.onPayload(r)),this.connection.on("close",r=>this.onClose(r)),this.connection.on("error",r=>this.events.emit("error",r)),this.connection.on("register_error",r=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const p_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),d_=()=>typeof window<"u",el=c=>c.split("?")[0],tl=10,g_=p_();class v_{constructor(r){if(this.url=r,this.events=new kt.EventEmitter,this.registering=!1,!Qh(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);this.url=r}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){return new Promise((r,i)=>{if(typeof this.socket>"u"){i(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),r()},this.socket.close()})}async send(r,i){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Vs(r))}catch(n){this.onError(r.id,n)}}register(r=this.url){if(!Qh(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=r,this.registering=!0,new Promise((i,n)=>{const o=hf.isReactNative()?void 0:{rejectUnauthorized:!f_(r)},h=new g_(r,[],o);d_()?h.onerror=d=>{const y=d;n(this.emitError(y.error))}:h.on("error",d=>{n(this.emitError(d))}),h.onopen=()=>{this.onOpen(h),i(h)}})}onOpen(r){r.onmessage=i=>this.onPayload(i),r.onclose=i=>this.onClose(i),this.socket=r,this.registering=!1,this.events.emit("open")}onClose(r){this.socket=void 0,this.registering=!1,this.events.emit("close",r)}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,el(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>tl&&this.events.setMaxListeners(tl)}emitError(r){const i=this.parseError(new Error((r==null?void 0:r.message)||`WebSocket connection failed for host: ${el(this.url)}`));return this.events.emit("register_error",i),i}}var uo={},y_={get exports(){return uo},set exports(c){uo=c}};(function(c,r){var i=200,n="__lodash_hash_undefined__",o=1,h=2,d=9007199254740991,y="[object Arguments]",w="[object Array]",A="[object AsyncFunction]",F="[object Boolean]",K="[object Date]",J="[object Error]",G="[object Function]",j="[object GeneratorFunction]",V="[object Map]",ie="[object Number]",Ee="[object Null]",ge="[object Object]",pe="[object Promise]",he="[object Proxy]",le="[object RegExp]",T="[object Set]",M="[object String]",B="[object Symbol]",ve="[object Undefined]",re="[object WeakMap]",ue="[object ArrayBuffer]",Te="[object DataView]",qe="[object Float32Array]",v="[object Float64Array]",E="[object Int8Array]",X="[object Int16Array]",ce="[object Int32Array]",k="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",H="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,jr=/^(?:0|[1-9]\d*)$/,xe={};xe[qe]=xe[v]=xe[E]=xe[X]=xe[ce]=xe[k]=xe[U]=xe[z]=xe[H]=!0,xe[y]=xe[w]=xe[ue]=xe[F]=xe[Te]=xe[K]=xe[J]=xe[G]=xe[V]=xe[ie]=xe[ge]=xe[le]=xe[T]=xe[M]=xe[re]=!1;var St=typeof hr=="object"&&hr&&hr.Object===Object&&hr,R=typeof self=="object"&&self&&self.Object===Object&&self,O=St||R||Function("return this")(),P=r&&!r.nodeType&&r,u=P&&!0&&c&&!c.nodeType&&c,b=u&&u.exports===P,ee=b&&St.process,fe=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),we=fe&&fe.isTypedArray;function Ne(g,x){for(var $=-1,Y=g==null?0:g.length,Ge=0,ye=[];++$-1}function Co(g,x){var $=this.__data__,Y=Si($,g);return Y<0?(++this.size,$.push([g,x])):$[Y][1]=x,this}yr.prototype.clear=Io,yr.prototype.delete=So,yr.prototype.get=Po,yr.prototype.has=Ao,yr.prototype.set=Co;function Gr(g){var x=-1,$=g==null?0:g.length;for(this.clear();++x<$;){var Y=g[x];this.set(Y[0],Y[1])}}function ki(){this.size=0,this.__data__={hash:new Xe,map:new(it||yr),string:new Xe}}function Oo(g){var x=ci(this,g).delete(g);return this.size-=x?1:0,x}function Hi(g){return ci(this,g).get(g)}function Ro(g){return ci(this,g).has(g)}function To(g,x){var $=ci(this,g),Y=$.size;return $.set(g,x),this.size+=$.size==Y?0:1,this}Gr.prototype.clear=ki,Gr.prototype.delete=Oo,Gr.prototype.get=Hi,Gr.prototype.has=Ro,Gr.prototype.set=To;function Bi(g){var x=-1,$=g==null?0:g.length;for(this.__data__=new Gr;++x<$;)this.add(g[x])}function Ws(g){return this.__data__.set(g,n),this}function Js(g){return this.__data__.has(g)}Bi.prototype.add=Bi.prototype.push=Ws,Bi.prototype.has=Js;function Or(g){var x=this.__data__=new yr(g);this.size=x.size}function No(){this.__data__=new yr,this.size=0}function Lo(g){var x=this.__data__,$=x.delete(g);return this.size=x.size,$}function Do(g){return this.__data__.get(g)}function Fo(g){return this.__data__.has(g)}function Ys(g,x){var $=this.__data__;if($ instanceof yr){var Y=$.__data__;if(!it||Y.lengthLt))return!1;var We=ye.get(g);if(We&&ye.get(x))return We==x;var bt=-1,sr=!0,Dt=$&h?new Bi:void 0;for(ye.set(g,x),ye.set(x,g);++bt-1&&g%1==0&&g-1&&g%1==0&&g<=d}function fn(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Ci(g){return g!=null&&typeof g=="object"}var pn=we?_t(we):Qs;function zo(g){return Uo(g)?Xs(g):en(g)}function Ke(){return[]}function ke(){return!1}c.exports=qo})(y_,uo);function m_(c,r){if(c.length>=255)throw new TypeError("Alphabet too long");for(var i=new Uint8Array(256),n=0;n>>0,he=new Uint8Array(pe);Ee!==ge;){for(var le=j[Ee],T=0,M=pe-1;(le!==0||T>>0,he[M]=le%y>>>0,le=le/y>>>0;if(le!==0)throw new Error("Non-zero carry");ie=T,Ee++}for(var B=pe-ie;B!==pe&&he[B]===0;)B++;for(var ve=w.repeat(V);B>>0,pe=new Uint8Array(ge);j[V];){var he=i[j.charCodeAt(V)];if(he===255)return;for(var le=0,T=ge-1;(he!==0||le>>0,pe[T]=he%256>>>0,he=he/256>>>0;if(he!==0)throw new Error("Non-zero carry");Ee=le,V++}if(j[V]!==" "){for(var M=ge-Ee;M!==ge&&pe[M]===0;)M++;for(var B=new Uint8Array(ie+(ge-M)),ve=ie;M!==ge;)B[ve++]=pe[M++];return B}}}function G(j){var V=J(j);if(V)return V;throw new Error(`Non-${r} character`)}return{encode:K,decodeUnsafe:J,decode:G}}var __=m_,w_=__;const df=c=>{if(c instanceof Uint8Array&&c.constructor.name==="Uint8Array")return c;if(c instanceof ArrayBuffer)return new Uint8Array(c);if(ArrayBuffer.isView(c))return new Uint8Array(c.buffer,c.byteOffset,c.byteLength);throw new Error("Unknown type, must be binary type")},b_=c=>new TextEncoder().encode(c),E_=c=>new TextDecoder().decode(c);class x_{constructor(r,i,n){this.name=r,this.prefix=i,this.baseEncode=n}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}}class I_{constructor(r,i,n){if(this.name=r,this.prefix=i,i.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i.codePointAt(0),this.baseDecode=n}decode(r){if(typeof r=="string"){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(r){return gf(this,r)}}class S_{constructor(r){this.decoders=r}or(r){return gf(this,r)}decode(r){const i=r[0],n=this.decoders[i];if(n)return n.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const gf=(c,r)=>new S_({...c.decoders||{[c.prefix]:c},...r.decoders||{[r.prefix]:r}});class P_{constructor(r,i,n,o){this.name=r,this.prefix=i,this.baseEncode=n,this.baseDecode=o,this.encoder=new x_(r,i,n),this.decoder=new I_(r,i,o)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const _o=({name:c,prefix:r,encode:i,decode:n})=>new P_(c,r,i,n),Gs=({prefix:c,name:r,alphabet:i})=>{const{encode:n,decode:o}=w_(i,r);return _o({prefix:c,name:r,encode:n,decode:h=>df(o(h))})},A_=(c,r,i,n)=>{const o={};for(let F=0;F=8&&(y-=8,d[A++]=255&w>>y)}if(y>=i||255&w<<8-y)throw new SyntaxError("Unexpected end of data");return d},C_=(c,r,i)=>{const n=r[r.length-1]==="=",o=(1<i;)d-=i,h+=r[o&y>>d];if(d&&(h+=r[o&y<_o({prefix:r,name:c,encode(o){return C_(o,n,i)},decode(o){return A_(o,n,i,c)}}),O_=_o({prefix:"\0",name:"identity",encode:c=>E_(c),decode:c=>b_(c)});var R_=Object.freeze({__proto__:null,identity:O_});const T_=Kt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var N_=Object.freeze({__proto__:null,base2:T_});const L_=Kt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var D_=Object.freeze({__proto__:null,base8:L_});const F_=Gs({prefix:"9",name:"base10",alphabet:"0123456789"});var $_=Object.freeze({__proto__:null,base10:F_});const j_=Kt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),M_=Kt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var U_=Object.freeze({__proto__:null,base16:j_,base16upper:M_});const q_=Kt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),z_=Kt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),k_=Kt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),H_=Kt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),B_=Kt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),V_=Kt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),K_=Kt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),G_=Kt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),W_=Kt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var J_=Object.freeze({__proto__:null,base32:q_,base32upper:z_,base32pad:k_,base32padupper:H_,base32hex:B_,base32hexupper:V_,base32hexpad:K_,base32hexpadupper:G_,base32z:W_});const Y_=Gs({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X_=Gs({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Z_=Object.freeze({__proto__:null,base36:Y_,base36upper:X_});const Q_=Gs({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ew=Gs({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var tw=Object.freeze({__proto__:null,base58btc:Q_,base58flickr:ew});const rw=Kt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iw=Kt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sw=Kt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),nw=Kt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ow=Object.freeze({__proto__:null,base64:rw,base64pad:iw,base64url:sw,base64urlpad:nw});const vf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),aw=vf.reduce((c,r,i)=>(c[i]=r,c),[]),cw=vf.reduce((c,r,i)=>(c[r.codePointAt(0)]=i,c),[]);function uw(c){return c.reduce((r,i)=>(r+=aw[i],r),"")}function hw(c){const r=[];for(const i of c){const n=cw[i.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${i}`);r.push(n)}return new Uint8Array(r)}const lw=_o({prefix:"🚀",name:"base256emoji",encode:uw,decode:hw});var fw=Object.freeze({__proto__:null,base256emoji:lw}),pw=yf,rl=128,dw=127,gw=~dw,vw=Math.pow(2,31);function yf(c,r,i){r=r||[],i=i||0;for(var n=i;c>=vw;)r[i++]=c&255|rl,c/=128;for(;c&gw;)r[i++]=c&255|rl,c>>>=7;return r[i]=c|0,yf.bytes=i-n+1,r}var yw=hc,mw=128,il=127;function hc(c,n){var i=0,n=n||0,o=0,h=n,d,y=c.length;do{if(h>=y)throw hc.bytes=0,new RangeError("Could not decode varint");d=c[h++],i+=o<28?(d&il)<=mw);return hc.bytes=h-n,i}var _w=Math.pow(2,7),ww=Math.pow(2,14),bw=Math.pow(2,21),Ew=Math.pow(2,28),xw=Math.pow(2,35),Iw=Math.pow(2,42),Sw=Math.pow(2,49),Pw=Math.pow(2,56),Aw=Math.pow(2,63),Cw=function(c){return c<_w?1:c(mf.encode(c,r,i),r),nl=c=>mf.encodingLength(c),lc=(c,r)=>{const i=r.byteLength,n=nl(c),o=n+nl(i),h=new Uint8Array(o+i);return sl(c,h,0),sl(i,h,n),h.set(r,o),new Rw(c,i,r,h)};class Rw{constructor(r,i,n,o){this.code=r,this.size=i,this.digest=n,this.bytes=o}}const _f=({name:c,code:r,encode:i})=>new Tw(c,r,i);class Tw{constructor(r,i,n){this.name=r,this.code=i,this.encode=n}digest(r){if(r instanceof Uint8Array){const i=this.encode(r);return i instanceof Uint8Array?lc(this.code,i):i.then(n=>lc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const wf=c=>async r=>new Uint8Array(await crypto.subtle.digest(c,r)),Nw=_f({name:"sha2-256",code:18,encode:wf("SHA-256")}),Lw=_f({name:"sha2-512",code:19,encode:wf("SHA-512")});var Dw=Object.freeze({__proto__:null,sha256:Nw,sha512:Lw});const bf=0,Fw="identity",Ef=df,$w=c=>lc(bf,Ef(c)),jw={code:bf,name:Fw,encode:Ef,digest:$w};var Mw=Object.freeze({__proto__:null,identity:jw});new TextEncoder,new TextDecoder;const ol={...R_,...N_,...D_,...$_,...U_,...J_,...Z_,...tw,...ow,...fw};({...Dw,...Mw});function xf(c){return globalThis.Buffer!=null?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):c}function Uw(c=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xf(globalThis.Buffer.allocUnsafe(c)):new Uint8Array(c)}function If(c,r,i,n){return{name:c,prefix:r,encoder:{name:c,prefix:r,encode:i},decoder:{decode:n}}}const al=If("utf8","u",c=>"u"+new TextDecoder("utf8").decode(c),c=>new TextEncoder().encode(c.substring(1))),Qa=If("ascii","a",c=>{let r="a";for(let i=0;i{c=c.substring(1);const r=Uw(c.length);for(let i=0;i{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:h}=Q("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(h)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=r,this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(r){await this.core.storage.setItem(this.storageKey,zl(r))}async getKeyChain(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(r):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class yb{constructor(r,i,n){this.core=r,this.logger=i,this.name=Vw,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),h=Wh(o);return of(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=y1();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),d=Wh(h),y=cc();return await Jm(y,o,Kw,d)},this.generateSharedKey=(o,h,d)=>{this.isInitialized();const y=this.getPrivateKey(o),w=m1(y,h);return this.setSymKey(w,d)},this.setSymKey=async(o,h)=>{this.isInitialized();const d=h||_1(o);return await this.keychain.set(d,o),d},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,h,d)=>{this.isInitialized();const y=w1(d),w=Vs(h);if(Ah(y)){const J=y.senderPublicKey,G=y.receiverPublicKey;o=await this.generateSharedKey(J,G)}const A=this.getSymKey(o),{type:F,senderPublicKey:K}=y;return b1({type:F,symKey:A,message:w,senderPublicKey:K})},this.decode=async(o,h,d)=>{this.isInitialized();const y=E1(h,d);if(Ah(y)){const F=y.receiverPublicKey,K=y.senderPublicKey;o=await this.generateSharedKey(F,K)}const w=this.getSymKey(o),A=x1({symKey:w,encoded:h});return yc(A)},this.getPayloadType=o=>{const h=Ch(o);return I1(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Ch(o);return h.senderPublicKey?fo(h.senderPublicKey,S1):void 0},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.keychain=n||new vb(this.core,this.logger)}get context(){return Re.getLoggerContext(this.logger)}async setPrivateKey(r,i){return await this.keychain.set(r,i),r}getPrivateKey(r){return this.keychain.get(r)}async getClientSeed(){let r="";try{r=this.keychain.get(cl)}catch{r=cc(),await this.keychain.set(cl,r)}return zw(r,"base16")}getSymKey(r){return this.keychain.get(r)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class mb extends Sm{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name=Jw,this.version=Yw,this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const h=ls(o);let d=this.messages.get(n);return typeof d>"u"&&(d={}),typeof d[h]<"u"||(d[h]=o,this.messages.set(n,d),await this.persist()),h},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const h=this.get(n),d=ls(o);return typeof h[d]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Re.generateChildLogger(r,this.name),this.core=i}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(r){await this.core.storage.setItem(this.storageKey,zl(r))}async getRelayerMessages(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(r):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class _b extends Pm{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new kt.EventEmitter,this.name=Zw,this.queue=new Map,this.publishTimeout=ne.toMiliseconds(ne.TEN_SECONDS),this.queueTimeout=ne.toMiliseconds(ne.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,o,h)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}});try{const d=(h==null?void 0:h.ttl)||Xw,y=uc(h),w=(h==null?void 0:h.prompt)||!1,A=(h==null?void 0:h.tag)||0,F=(h==null?void 0:h.id)||wc().toString(),K={topic:n,message:o,opts:{ttl:d,relay:y,prompt:w,tag:A,id:F}},J=setTimeout(()=>this.queue.set(F,K),this.queueTimeout);try{await await oo(this.rpcPublish(n,o,d,y,w,A,F),this.publishTimeout),clearTimeout(J),this.relayer.events.emit(mt.publish,K)}catch{this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0;return}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}})}catch(d){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(d),d}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.registerEventListeners()}get context(){return Re.getLoggerContext(this.logger)}rpcPublish(r,i,n,o,h,d,y){var w,A,F,K;const J={method:ro(o.protocol).publish,params:{topic:r,message:i,ttl:n,prompt:h,tag:d},id:y};return _i((w=J.params)==null?void 0:w.prompt)&&((A=J.params)==null||delete A.prompt),_i((F=J.params)==null?void 0:F.tag)&&((K=J.params)==null||delete K.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:J}),this.relayer.request(J)}onPublish(r){this.queue.delete(r)}checkQueue(){this.queue.forEach(async r=>{const{topic:i,message:n,opts:o}=r;await this.publish(i,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(mt.connection_stalled);return}this.checkQueue()}),this.relayer.on(mt.message_ack,r=>{this.onPublish(r.id.toString())})}}class wb{constructor(){this.map=new Map,this.set=(r,i)=>{const n=this.get(r);this.exists(r,i)||this.map.set(r,[...n,i])},this.get=r=>this.map.get(r)||[],this.exists=(r,i)=>this.get(r).includes(i),this.delete=(r,i)=>{if(typeof i>"u"){this.map.delete(r);return}if(!this.map.has(r))return;const n=this.get(r);if(!this.exists(r,i))return;const o=n.filter(h=>h!==i);if(!o.length){this.map.delete(r);return}this.map.set(r,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var bb=Object.defineProperty,Eb=Object.defineProperties,xb=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ib=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,fl=(c,r,i)=>r in c?bb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,qs=(c,r)=>{for(var i in r||(r={}))Ib.call(r,i)&&fl(c,i,r[i]);if(ll)for(var i of ll(r))Sb.call(r,i)&&fl(c,i,r[i]);return c},tc=(c,r)=>Eb(c,xb(r));class Pb extends Om{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new wb,this.events=new kt.EventEmitter,this.name=ab,this.version=cb,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=wi,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const h=uc(o),d={topic:n,relay:h};this.pending.set(n,d);const y=await this.rpcSubscribe(n,h);return this.onSubscribe(y,d),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),y}catch(h){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(h),h}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,h)=>{const d=new ne.Watch;d.start(this.pendingSubscriptionWatchLabel);const y=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),o(!0)),d.elapsed(this.pendingSubscriptionWatchLabel)>=ub&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),h(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.clientId=""}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(r,i){let n=!1;try{n=this.getSubscription(r).topic===i}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(r,i){const n=this.topicMap.get(r);await Promise.all(n.map(async o=>await this.unsubscribeById(r,o,i)))}async unsubscribeById(r,i,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}});try{const o=uc(n);await this.rpcUnsubscribe(r,i,o);const h=rr("USER_DISCONNECTED",`${this.name}, ${r}`);await this.onUnsubscribe(r,i,h),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(r,i){const n={method:ro(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await oo(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}return ls(r+this.clientId)}async rpcBatchSubscribe(r){if(!r.length)return;const i=r[0].relay,n={method:ro(i.protocol).batchSubscribe,params:{topics:r.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await oo(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}}rpcUnsubscribe(r,i,n){const o={method:ro(n.protocol).unsubscribe,params:{topic:r,id:i}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(r,i){this.setSubscription(r,tc(qs({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(i=>{this.setSubscription(i.id,qs({},i)),this.pending.delete(i.topic)})}async onUnsubscribe(r,i,n){this.events.removeAllListeners(i),this.hasSubscription(i,r)&&this.deleteSubscription(i,n),await this.relayer.messages.del(r)}async setRelayerSubscriptions(r){await this.relayer.core.storage.setItem(this.storageKey,r)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(r,i){this.subscriptions.has(r)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:r,subscription:i}),this.addSubscription(r,i))}addSubscription(r,i){this.subscriptions.set(r,qs({},i)),this.topicMap.set(i.topic,r),this.events.emit(Vr.created,i)}getSubscription(r){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:r});const i=this.subscriptions.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}deleteSubscription(r,i){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:r,reason:i});const n=this.getSubscription(r);this.subscriptions.delete(r),this.topicMap.delete(n.topic,r),this.events.emit(Vr.deleted,tc(qs({},n),{reason:i}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Vr.sync)}async reset(){if(this.cached.length){const r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i"u"||!r.length)return;if(this.subscriptions.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(r){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(r)}}async batchSubscribe(r){if(!r.length)return;const i=await this.rpcBatchSubscribe(r);ps(i)&&this.onBatchSubscribe(i.map((n,o)=>tc(qs({},r[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mt.connect,async()=>{await this.onConnect()}),this.relayer.on(mt.disconnect,()=>{this.onDisconnect()}),this.events.on(Vr.created,async r=>{const i=Vr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(Vr.deleted,async r=>{const i=Vr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async restartToComplete(){this.restartInProgress&&await new Promise(r=>{const i=setInterval(()=>{this.restartInProgress||(clearInterval(i),r())},this.pollingInterval)})}}var Ab=Object.defineProperty,pl=Object.getOwnPropertySymbols,Cb=Object.prototype.hasOwnProperty,Ob=Object.prototype.propertyIsEnumerable,dl=(c,r,i)=>r in c?Ab(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Rb=(c,r)=>{for(var i in r||(r={}))Cb.call(r,i)&&dl(c,i,r[i]);if(pl)for(var i of pl(r))Ob.call(r,i)&&dl(c,i,r[i]);return c};class Tb extends Am{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new kt.EventEmitter,this.name=eb,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async i=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(i)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=r.core,this.logger=typeof r.logger<"u"&&typeof r.logger!="string"?Re.generateChildLogger(r.logger,this.name):Re.pino(Re.getDefaultLoggerOptions({level:r.logger||Qw})),this.messages=new mb(this.logger,r.core),this.subscriber=new Pb(this,this.logger),this.publisher=new _b(this,this.logger),this.relayUrl=(r==null?void 0:r.relayUrl)||Af,this.projectId=r.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${ul}...`),await this.restartTransport(ul)}this.registerEventListeners(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},sb)}get context(){return Re.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(r,i,n){this.isInitialized(),await this.publisher.publish(r,i,n),await this.recordMessageEvent({topic:r,message:i,publishedAt:Date.now()})}async subscribe(r,i){var n;this.isInitialized();let o=((n=this.subscriber.topicMap.get(r))==null?void 0:n[0])||"";return o||(await Promise.all([new Promise(h=>{this.subscriber.once(Vr.created,d=>{d.topic===r&&h()})}),new Promise(async h=>{o=await this.subscriber.subscribe(r,i),h()})]),o)}async unsubscribe(r,i){this.isInitialized(),await this.subscriber.unsubscribe(r,i)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mt.transport_closed))}async transportOpen(r){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=r||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(i=>{this.initialized||i(),this.subscriber.once(Vr.resubscribed,()=>{i()})}),await Promise.race([new Promise(async(i,n)=>{await oo(this.provider.connect(),5e3,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>n(o)).then(()=>i()).finally(()=>this.removeListener(mt.transport_closed,this.rejectTransportOpen))}),new Promise(i=>this.once(mt.transport_closed,this.rejectTransportOpen))])])}catch(i){this.logger.error(i);const n=i;if(!this.isConnectionStalled(n.message))throw i;this.events.emit(mt.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(r){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=r||this.relayUrl,this.connected&&await Promise.all([new Promise(i=>{this.provider.once(Ms.disconnect,()=>{i()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(r){return this.staleConnectionErrors.some(i=>r.includes(i))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const r=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ei(new v_(P1({sdkVersion:ib,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:r,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(r){const{topic:i,message:n}=r;await this.messages.set(i,n)}async shouldIgnoreMessageEvent(r){const{topic:i,message:n}=r;return await this.subscriber.isSubscribed(i)?this.messages.has(i,n):!0}async onProviderPayload(r){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:r}),Ec(r)){if(!r.method.endsWith(tb))return;const i=r.params,{topic:n,message:o,publishedAt:h}=i.data,d={topic:n,message:o,publishedAt:h};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Rb({type:"event",event:i.id},d)),this.events.emit(i.id,d),await this.acknowledgePayload(r),await this.onMessageEvent(d)}else mo(r)&&this.events.emit(mt.message_ack,r)}async onMessageEvent(r){await this.shouldIgnoreMessageEvent(r)||(this.events.emit(mt.message,r),await this.recordMessageEvent(r))}async acknowledgePayload(r){const i=bc(r.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Ms.payload,r=>this.onProviderPayload(r)),this.provider.on(Ms.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Ms.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ms.error,r=>{this.logger.error(r),this.events.emit(mt.error,r)})}registerEventListeners(){this.events.on(mt.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mt.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},ne.toMiliseconds(rb))}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(r=>{const i=setInterval(()=>{this.connected&&(clearInterval(i),r())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var Nb=Object.defineProperty,gl=Object.getOwnPropertySymbols,Lb=Object.prototype.hasOwnProperty,Db=Object.prototype.propertyIsEnumerable,vl=(c,r,i)=>r in c?Nb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,yl=(c,r)=>{for(var i in r||(r={}))Lb.call(r,i)&&vl(c,i,r[i]);if(gl)for(var i of gl(r))Db.call(r,i)&&vl(c,i,r[i]);return c};class wo extends Cm{constructor(r,i,n,o=wi,h=void 0){super(r,i,n,o),this.core=r,this.logger=i,this.name=n,this.map=new Map,this.version=nb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(d=>{this.getKey&&d!==null&&!_i(d)?this.map.set(this.getKey(d),d):g1(d)?this.map.set(d.id,d):v1(d)&&this.map.set(d.topic,d)}),this.cached=[],this.initialized=!0)},this.set=async(d,y)=>{this.isInitialized(),this.map.has(d)?await this.update(d,y):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:d,value:y}),this.map.set(d,y),await this.persist())},this.get=d=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:d}),this.getData(d)),this.getAll=d=>(this.isInitialized(),d?this.values.filter(y=>Object.keys(d).every(w=>uo(y[w],d[w]))):this.values),this.update=async(d,y)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:d,update:y});const w=yl(yl({},this.getData(d)),y);this.map.set(d,w),await this.persist()},this.delete=async(d,y)=>{this.isInitialized(),this.map.has(d)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:d,reason:y}),this.map.delete(d),await this.persist())},this.logger=Re.generateChildLogger(i,this.name),this.storagePrefix=o,this.getKey=h}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(r){await this.core.storage.setItem(this.storageKey,r)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(r){const i=this.map.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}async persist(){await this.setDataStore(this.values)}async restore(){try{const r=await this.getDataStore();if(typeof r>"u"||!r.length)return;if(this.map.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(r){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Fb{constructor(r,i){this.core=r,this.logger=i,this.name=hb,this.version=lb,this.events=new kt,this.initialized=!1,this.storagePrefix=wi,this.ignoredPayloadTypes=[Ml],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=cc(),o=await this.core.crypto.setSymKey(n),h=Fr(ne.FIVE_MINUTES),d={protocol:Pf},y={topic:o,expiry:h,relay:d,active:!1},w=A1({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:d});return await this.pairings.set(o,y),await this.core.relayer.subscribe(o),this.core.expirer.set(o,h),{topic:o,uri:w}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:h,relay:d}=C1(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const y=Fr(ne.FIVE_MINUTES),w={topic:o,relay:d,expiry:y,active:!1};return await this.pairings.set(o,w),await this.core.crypto.setSymKey(h,o),await this.core.relayer.subscribe(o,{relay:d}),this.core.expirer.set(o,y),n.activatePairing&&await this.activate({topic:o}),w},this.activate=async({topic:n})=>{this.isInitialized();const o=Fr(ne.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const h=await this.sendRequest(o,"wc_pairingPing",{}),{done:d,resolve:y,reject:w}=cs();this.events.once(Ft("pairing_ping",h),({error:A})=>{A?w(A):y()}),await d()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",rr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,h)=>{const d=vo(o,h),y=await this.core.crypto.encode(n,d),w=Us[o].req;return this.core.history.set(n,d),this.core.relayer.publish(n,y,w),d.id},this.sendResult=async(n,o,h)=>{const d=bc(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method].res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.sendError=async(n,o,h)=>{const d=yo(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method]?Us[w.request.method].res:Us.unregistered_method.res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,rr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>mi(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:h}=n,d=h.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingRequest(o,h);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,h);default:return this.onUnknownRpcMethodRequest(o,h)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:h}=n,d=(await this.core.history.get(o,h.id)).request.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingResponse(o,h);default:return this.onUnknownRpcMethodResponse(d)}},this.onPairingPingRequest=async(n,o)=>{const{id:h}=o;try{this.isValidPing({topic:n}),await this.sendResult(h,n,!0),this.events.emit("pairing_ping",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onPairingPingResponse=(n,o)=>{const{id:h}=o;setTimeout(()=>{oi(o)?this.events.emit(Ft("pairing_ping",h),{}):$r(o)&&this.events.emit(Ft("pairing_ping",h),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:h}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:h,method:d}=o;try{if(this.registeredMethods.includes(d))return;const y=rr("WC_METHOD_UNSUPPORTED",d);await this.sendError(h,n,y),this.logger.error(y)}catch(y){await this.sendError(h,n,y),this.logger.error(y)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(rr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!ur(n)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!O1(n.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!ur(n)){const{message:h}=Q("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!ur(n)){const{message:h}=Q("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!us(n,!1)){const{message:o}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(mi(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Q("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.pairings=new wo(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Re.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(i,n);Ec(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.core.history.delete(i,o.id))})}registerExpirerEvents(){this.core.expirer.on(Ar.expired,async r=>{const{topic:i}=Ul(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class $b extends Im{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new kt.EventEmitter,this.name=fb,this.version=pb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,h)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:h}),this.records.has(o.id))return;const d={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:h,expiry:Fr(ne.THIRTY_DAYS)};this.records.set(d.id,d),this.events.emit(Br.created,d)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=$r(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(Br.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(h=>{if(h.topic===n){if(typeof o<"u"&&h.id!==o)return;this.records.delete(h.id),this.events.emit(Br.deleted,h)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const r=[];return this.values.forEach(i=>{if(typeof i.response<"u")return;const n={topic:i.topic,request:vo(i.request.method,i.request.params,i.id),chainId:i.chainId};return r.push(n)}),r}async setJsonRpcRecords(r){await this.core.storage.setItem(this.storageKey,r)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(r){this.isInitialized();const i=this.records.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Br.sync)}async restore(){try{const r=await this.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(this.records.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}}registerEventListeners(){this.events.on(Br.created,r=>{const i=Br.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.updated,r=>{const i=Br.updated;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.deleted,r=>{const i=Br.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(r=>{ne.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.delete(r.topic,r.id))})}catch(r){this.logger.warn(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class jb extends Rm{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new kt.EventEmitter,this.name=db,this.version=gb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const h=this.formatTarget(n),d={target:h,expiry:o};this.expirations.set(h,d),this.checkExpiry(h,d),this.events.emit(Ar.created,{target:h,expiration:d})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),h=this.getExpiration(o);this.expirations.delete(o),this.events.emit(Ar.deleted,{target:o,expiration:h})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(r){if(typeof r=="string")return R1(r);if(typeof r=="number")return T1(r);const{message:i}=Q("UNKNOWN_TYPE",`Target type: ${typeof r}`);throw new Error(i)}async setExpirations(r){await this.core.storage.setItem(this.storageKey,r)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ar.sync)}async restore(){try{const r=await this.getExpirations();if(typeof r>"u"||!r.length)return;if(this.expirations.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(r){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(r)}}getExpiration(r){const i=this.expirations.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}checkExpiry(r,i){const{expiry:n}=i;ne.toMiliseconds(n)-Date.now()<=0&&this.expire(r,i)}expire(r,i){this.expirations.delete(r),this.events.emit(Ar.expired,{target:r,expiration:i})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((r,i)=>this.checkExpiry(i,r))}registerEventListeners(){this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Ar.created,r=>{const i=Ar.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.expired,r=>{const i=Ar.expired;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.deleted,r=>{const i=Ar.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Mb extends Tm{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=ec,this.initialized=!1,this.init=async n=>{N1()||!ql()||(this.verifyUrl=(n==null?void 0:n.verifyUrl)||hl,await this.createIframe())},this.register=async n=>{var o;if(this.initialized||await this.init(),!!this.iframe)try{(o=this.iframe.contentWindow)==null||o.postMessage(n.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${n.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async n=>{var o;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${n.attestationId}`);const h=this.startAbortTimer(ne.FIVE_SECONDS),d=await fetch(`${this.verifyUrl}/attestation/${n.attestationId}`,{signal:this.abortController.signal});return clearTimeout(h),d.status===200?(o=await d.json())==null?void 0:o.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((n,o)=>{if(document.getElementById(ec))return n();const h=document.createElement("iframe");h.setAttribute("id",ec),h.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),h.style.display="none",h.addEventListener("load",()=>{this.initialized=!0,n()}),h.addEventListener("error",d=>{o(d)}),document.body.append(h),this.iframe=h}),new Promise(n=>{setTimeout(()=>n("iframe load timeout"),ne.toMiliseconds(ne.ONE_SECOND/2))})])}catch(n){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(n)}},this.logger=Re.generateChildLogger(i,this.name),this.verifyUrl=hl,this.abortController=new AbortController,this.isDevEnv=L1()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(r){return setTimeout(()=>this.abortController.abort(),ne.toMiliseconds(r))}}var Ub=Object.defineProperty,ml=Object.getOwnPropertySymbols,qb=Object.prototype.hasOwnProperty,zb=Object.prototype.propertyIsEnumerable,_l=(c,r,i)=>r in c?Ub(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,wl=(c,r)=>{for(var i in r||(r={}))qb.call(r,i)&&_l(c,i,r[i]);if(ml)for(var i of ml(r))zb.call(r,i)&&_l(c,i,r[i]);return c};class Ic extends xm{constructor(r){super(r),this.protocol=Sf,this.version=kw,this.name=xc,this.events=new kt.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=r==null?void 0:r.projectId,this.relayUrl=(r==null?void 0:r.relayUrl)||Af;const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Hw.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new ds.HeartBeat,this.crypto=new yb(this,this.logger,r==null?void 0:r.keychain),this.history=new $b(this,this.logger),this.expirer=new jb(this,this.logger),this.storage=r!=null&&r.storage?r.storage:new dm(wl(wl({},Bw),r==null?void 0:r.storageOptions)),this.relayer=new Tb({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Fb(this,this.logger),this.verify=new Mb(this.projectId||"",this.logger)}static async init(r){const i=new Ic(r);await i.initialize();const n=await i.crypto.getClientId();return await i.storage.setItem(ob,n),i}get context(){return Re.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(r){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),this.logger.error(r.message),r}}}const kb=Ic,Cf="wc",Of=2,Rf="client",Sc=`${Cf}@${Of}:${Rf}:`,rc={name:Rf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Hb="WALLETCONNECT_DEEPLINK_CHOICE",Bb="proposal",Tf="Proposal expired",Vb="session",Qn=ne.SEVEN_DAYS,Kb="engine",zs={wc_sessionPropose:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1115}}},ic={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Gb="request",Wb=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Jb=Object.defineProperty,Yb=Object.defineProperties,Xb=Object.getOwnPropertyDescriptors,bl=Object.getOwnPropertySymbols,Zb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,El=(c,r,i)=>r in c?Jb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Pr=(c,r)=>{for(var i in r||(r={}))Zb.call(r,i)&&El(c,i,r[i]);if(bl)for(var i of bl(r))Qb.call(r,i)&&El(c,i,r[i]);return c},sc=(c,r)=>Yb(c,Xb(r));class eE extends Lm{constructor(r){super(r),this.name=Kb,this.events=new kt,this.initialized=!1,this.ignoredPayloadTypes=[Ml],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(zs)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const n=sc(Pr({},i),{requiredNamespaces:i.requiredNamespaces||{},optionalNamespaces:i.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:h,optionalNamespaces:d,sessionProperties:y,relays:w}=n;let A=o,F,K=!1;if(A&&(K=this.client.core.pairing.pairings.get(A).active),!A||!K){const{topic:pe,uri:he}=await this.client.core.pairing.create();A=pe,F=he}const J=await this.client.core.crypto.generateKeyPair(),G=Pr({requiredNamespaces:h,optionalNamespaces:d,relays:w??[{protocol:Pf}],proposer:{publicKey:J,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:j,resolve:V,done:ie}=cs(ne.FIVE_MINUTES,Tf);if(this.events.once(Ft("session_connect"),async({error:pe,session:he})=>{if(pe)j(pe);else if(he){he.self.publicKey=J;const le=sc(Pr({},he),{requiredNamespaces:he.requiredNamespaces,optionalNamespaces:he.optionalNamespaces});await this.client.session.set(he.topic,le),await this.setExpiry(he.topic,he.expiry),A&&await this.client.core.pairing.updateMetadata({topic:A,metadata:he.peer.metadata}),V(le)}}),!A){const{message:pe}=Q("NO_MATCHING_KEY",`connect() pairing topic: ${A}`);throw new Error(pe)}const Ee=await this.sendRequest(A,"wc_sessionPropose",G),ge=Fr(ne.FIVE_MINUTES);return await this.setProposal(Ee,Pr({id:Ee,expiry:ge},G)),{uri:F,approval:ie}},this.pair=async i=>(this.isInitialized(),await this.client.core.pairing.pair(i)),this.approve=async i=>{this.isInitialized(),await this.isValidApprove(i);const{id:n,relayProtocol:o,namespaces:h,sessionProperties:d}=i,y=this.client.proposal.get(n);let{pairingTopic:w,proposer:A,requiredNamespaces:F,optionalNamespaces:K}=y;w=w||"",io(F)||(F=F1(h,"approve()"));const J=await this.client.core.crypto.generateKeyPair(),G=A.publicKey,j=await this.client.core.crypto.generateSharedKey(J,G);w&&n&&(await this.client.core.pairing.updateMetadata({topic:w,metadata:A.metadata}),await this.sendResult(n,w,{relay:{protocol:o??"irn"},responderPublicKey:J}),await this.client.proposal.delete(n,rr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:w}));const V=Pr({relay:{protocol:o??"irn"},namespaces:h,requiredNamespaces:F,optionalNamespaces:K,pairingTopic:w,controller:{publicKey:J,metadata:this.client.metadata},expiry:Fr(Qn)},d&&{sessionProperties:d});await this.client.core.relayer.subscribe(j),await this.sendRequest(j,"wc_sessionSettle",V);const ie=sc(Pr({},V),{topic:j,pairingTopic:w,acknowledged:!1,self:V.controller,peer:{publicKey:A.publicKey,metadata:A.metadata},controller:J});return await this.client.session.set(j,ie),await this.setExpiry(j,Fr(Qn)),{topic:j,acknowledged:()=>new Promise(Ee=>setTimeout(()=>Ee(this.client.session.get(j)),500))}},this.reject=async i=>{this.isInitialized(),await this.isValidReject(i);const{id:n,reason:o}=i,{pairingTopic:h}=this.client.proposal.get(n);h&&(await this.sendError(n,h,o),await this.client.proposal.delete(n,rr("USER_DISCONNECTED")))},this.update=async i=>{this.isInitialized(),await this.isValidUpdate(i);const{topic:n,namespaces:o}=i,h=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:d,resolve:y,reject:w}=cs();return this.events.once(Ft("session_update",h),({error:A})=>{A?w(A):y()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:d}},this.extend=async i=>{this.isInitialized(),await this.isValidExtend(i);const{topic:n}=i,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:h,resolve:d,reject:y}=cs();return this.events.once(Ft("session_extend",o),({error:w})=>{w?y(w):d()}),await this.setExpiry(n,Fr(Qn)),{acknowledged:h}},this.request=async i=>{this.isInitialized(),await this.isValidRequest(i);const{chainId:n,request:o,topic:h,expiry:d}=i,y=await this.sendRequest(h,"wc_sessionRequest",{request:o,chainId:n},d),{done:w,resolve:A,reject:F}=cs(d);this.events.once(Ft("session_request",y),({error:J,result:G})=>{J?F(J):A(G)}),this.client.events.emit("session_request_sent",{topic:h,request:o,chainId:n,id:y});const K=await this.client.core.storage.getItem(Hb);return $1({id:y,topic:h,wcDeepLink:K}),await w()},this.respond=async i=>{this.isInitialized(),await this.isValidRespond(i);const{topic:n,response:o}=i,{id:h}=o;oi(o)?await this.sendResult(h,n,o.result):$r(o)&&await this.sendError(h,n,o.error),this.deletePendingSessionRequest(i.response.id,{message:"fulfilled",code:0})},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:h,resolve:d,reject:y}=cs();this.events.once(Ft("session_ping",o),({error:w})=>{w?y(w):d()}),await h()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async i=>{this.isInitialized(),await this.isValidEmit(i);const{topic:n,event:o,chainId:h}=i;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:h})},this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=wc().toString();let h;const d=y=>{(y==null?void 0:y.id.toString())===o&&(this.client.core.relayer.events.removeListener(mt.message_ack,d),h())};await Promise.all([new Promise(y=>{h=y,this.client.core.relayer.on(mt.message_ack,d)}),this.sendRequest(n,"wc_sessionDelete",rr("USER_DISCONNECTED"),void 0,o)]),await this.deleteSession(n)}else await this.client.core.pairing.disconnect({topic:n})},this.find=i=>(this.isInitialized(),this.client.session.getAll().filter(n=>j1(n,i))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async i=>{if(i.pairingTopic)try{const n=this.client.core.pairing.pairings.get(i.pairingTopic),o=this.client.core.pairing.pairings.getAll().filter(h=>{var d,y;return((d=h.peerMetadata)==null?void 0:d.url)&&((y=h.peerMetadata)==null?void 0:y.url)===i.peer.metadata.url&&h.topic&&h.topic!==n.topic});if(o.length===0)return;this.client.logger.info(`Cleaning up ${o.length} duplicate pairing(s)`),await Promise.all(o.map(h=>this.client.core.pairing.disconnect({topic:h.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(i,n)=>{const{self:o}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),this.client.session.delete(i,rr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),n||this.client.core.expirer.del(i)},this.deleteProposal=async(i,n)=>{await Promise.all([this.client.proposal.delete(i,rr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(i)])},this.deletePendingSessionRequest=async(i,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(i,n),o?Promise.resolve():this.client.core.expirer.del(i)])},this.setExpiry=async(i,n)=>{this.client.session.keys.includes(i)&&await this.client.session.update(i,{expiry:n}),this.client.core.expirer.set(i,n)},this.setProposal=async(i,n)=>{await this.client.proposal.set(i,n),this.client.core.expirer.set(i,n.expiry)},this.setPendingSessionRequest=async i=>{const n=zs.wc_sessionRequest.req.ttl,{id:o,topic:h,params:d}=i;await this.client.pendingRequest.set(o,{id:o,topic:h,params:d}),n&&this.client.core.expirer.set(o,Fr(n))},this.sendRequest=async(i,n,o,h,d)=>{const y=vo(n,o);if(ql()&&Wb.includes(n)){const F=ls(JSON.stringify(y));await this.client.core.verify.register({attestationId:F})}const w=await this.client.core.crypto.encode(i,y),A=zs[n].req;return h&&(A.ttl=h),d&&(A.id=d),this.client.core.history.set(i,y),this.client.core.relayer.publish(i,w,A),y.id},this.sendResult=async(i,n,o)=>{const h=bc(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.sendError=async(i,n,o)=>{const h=yo(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.cleanup=async()=>{const i=[],n=[];this.client.session.getAll().forEach(o=>{mi(o.expiry)&&i.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{mi(o.expiry)&&n.push(o.id)}),await Promise.all([...i.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=i=>{const{topic:n,payload:o}=i,h=o.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${h}`)}},this.onRelayEventResponse=async i=>{const{topic:n,payload:o}=i,h=(await this.client.core.history.get(n,o.id)).request.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${h}`)}},this.onRelayEventUnknownPayload=i=>{const{topic:n}=i,{message:o}=Q("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(o)},this.onSessionProposeRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidConnect(Pr({},n.params));const d=Fr(ne.FIVE_MINUTES),y=Pr({id:h,pairingTopic:i,expiry:d},o);await this.setProposal(h,y);const w=ls(JSON.stringify(n)),A=await this.getVerifyContext(w,y.proposer.metadata);this.client.events.emit("session_proposal",{id:h,params:y,verifyContext:A})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionProposeResponse=async(i,n)=>{const{id:o}=n;if(oi(n)){const{result:h}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:h});const d=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:d});const y=d.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:y});const w=h.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:w});const A=await this.client.core.crypto.generateSharedKey(y,w);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:A});const F=await this.client.core.relayer.subscribe(A);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:F}),await this.client.core.pairing.activate({topic:i})}else $r(n)&&(await this.client.proposal.delete(o,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidSessionSettleRequest(h);const{relay:d,controller:y,expiry:w,namespaces:A,requiredNamespaces:F,optionalNamespaces:K,sessionProperties:J,pairingTopic:G}=n.params,j=Pr({topic:i,relay:d,expiry:w,namespaces:A,acknowledged:!0,pairingTopic:G,requiredNamespaces:F,optionalNamespaces:K,controller:y.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:y.publicKey,metadata:y.metadata}},J&&{sessionProperties:J});await this.sendResult(n.id,i,!0),this.events.emit(Ft("session_connect"),{session:j}),this.cleanupDuplicatePairings(j)}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionSettleResponse=async(i,n)=>{const{id:o}=n;oi(n)?(await this.client.session.update(i,{acknowledged:!0}),this.events.emit(Ft("session_approve",o),{})):$r(n)&&(await this.client.session.delete(i,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidUpdate(Pr({topic:i},o)),await this.client.session.update(i,{namespaces:o.namespaces}),await this.sendResult(h,i,!0),this.client.events.emit("session_update",{id:h,topic:i,params:o})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionUpdateResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_update",o),{}):$r(n)&&this.events.emit(Ft("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(i,n)=>{const{id:o}=n;try{this.isValidExtend({topic:i}),await this.setExpiry(i,Fr(Qn)),await this.sendResult(o,i,!0),this.client.events.emit("session_extend",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionExtendResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_extend",o),{}):$r(n)&&this.events.emit(Ft("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(i,n)=>{const{id:o}=n;try{this.isValidPing({topic:i}),await this.sendResult(o,i,!0),this.client.events.emit("session_ping",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionPingResponse=(i,n)=>{const{id:o}=n;setTimeout(()=>{oi(n)?this.events.emit(Ft("session_ping",o),{}):$r(n)&&this.events.emit(Ft("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(i,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:i,reason:n.params}),await Promise.all([new Promise(h=>{this.client.core.relayer.once(mt.publish,async()=>{h(await this.deleteSession(i))})}),this.sendResult(o,i,!0)]),this.client.events.emit("session_delete",{id:o,topic:i})}catch(h){this.client.logger.error(h)}},this.onSessionRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidRequest(Pr({topic:i},h)),await this.setPendingSessionRequest({id:o,topic:i,params:h});const d=ls(JSON.stringify(n)),y=this.client.session.get(i),w=await this.getVerifyContext(d,y.peer.metadata);this.client.events.emit("session_request",{id:o,topic:i,params:h,verifyContext:w})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionRequestResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_request",o),{result:n.result}):$r(n)&&this.events.emit(Ft("session_request",o),{error:n.error})},this.onSessionEventRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidEmit(Pr({topic:i},h)),this.client.events.emit("session_event",{id:o,topic:i,params:h})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.isValidConnect=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(i)}`);throw new Error(w)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:h,sessionProperties:d,relays:y}=i;if(_i(n)||await this.isValidPairingTopic(n),!M1(y,!0)){const{message:w}=Q("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(o)&&io(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!_i(h)&&io(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),_i(d)||this.validateSessionProps(d,"sessionProperties")},this.validateNamespaces=(i,n)=>{const o=U1(i,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!ur(i))throw new Error(Q("MISSING_OR_INVALID",`approve() params: ${i}`).message);const{id:n,namespaces:o,relayProtocol:h,sessionProperties:d}=i;await this.isValidProposalId(n);const y=this.client.proposal.get(n),w=Va(o,"approve()");if(w)throw new Error(w.message);const A=Oh(y.requiredNamespaces,o,"approve()");if(A)throw new Error(A.message);if(!us(h,!0)){const{message:F}=Q("MISSING_OR_INVALID",`approve() relayProtocol: ${h}`);throw new Error(F)}_i(d)||this.validateSessionProps(d,"sessionProperties")},this.isValidReject=async i=>{if(!ur(i)){const{message:h}=Q("MISSING_OR_INVALID",`reject() params: ${i}`);throw new Error(h)}const{id:n,reason:o}=i;if(await this.isValidProposalId(n),!q1(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!ur(i)){const{message:A}=Q("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${i}`);throw new Error(A)}const{relay:n,controller:o,namespaces:h,expiry:d}=i;if(!z1(n)){const{message:A}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(A)}const y=k1(o,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Va(h,"onSessionSettleRequest()");if(w)throw new Error(w.message);if(mi(d)){const{message:A}=Q("EXPIRED","onSessionSettleRequest()");throw new Error(A)}},this.isValidUpdate=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`update() params: ${i}`);throw new Error(w)}const{topic:n,namespaces:o}=i;await this.isValidSessionTopic(n);const h=this.client.session.get(n),d=Va(o,"update()");if(d)throw new Error(d.message);const y=Oh(h.requiredNamespaces,o,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`extend() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionTopic(n)},this.isValidRequest=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`request() params: ${i}`);throw new Error(w)}const{topic:n,request:o,chainId:h,expiry:d}=i;await this.isValidSessionTopic(n);const{namespaces:y}=this.client.session.get(n);if(!Rh(y,h)){const{message:w}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(w)}if(!H1(o)){const{message:w}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(w)}if(!B1(y,h,o.method)){const{message:w}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(w)}if(d&&!V1(d,ic)){const{message:w}=Q("MISSING_OR_INVALID",`request() expiry: ${d}. Expiry must be a number (in seconds) between ${ic.min} and ${ic.max}`);throw new Error(w)}},this.isValidRespond=async i=>{if(!ur(i)){const{message:h}=Q("MISSING_OR_INVALID",`respond() params: ${i}`);throw new Error(h)}const{topic:n,response:o}=i;if(await this.isValidSessionTopic(n),!K1(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async i=>{if(!ur(i)){const{message:y}=Q("MISSING_OR_INVALID",`emit() params: ${i}`);throw new Error(y)}const{topic:n,event:o,chainId:h}=i;await this.isValidSessionTopic(n);const{namespaces:d}=this.client.session.get(n);if(!Rh(d,h)){const{message:y}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(y)}if(!G1(o)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}if(!W1(d,h,o.name)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}},this.isValidDisconnect=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(i,n)=>{const o={verified:{verifyUrl:n.verifyUrl||"",validation:"UNKNOWN",origin:n.url||""}};try{const h=await this.client.core.verify.resolve({attestationId:i,verifyUrl:n.verifyUrl});h&&(o.verified.origin=h,o.verified.validation=h===n.url?"VALID":"INVALID")}catch(h){this.client.logger.error(h)}return this.client.logger.info(`Verify context: ${JSON.stringify(o)}`),o},this.validateSessionProps=(i,n)=>{Object.values(i).forEach(o=>{if(!us(o,!1)){const{message:h}=Q("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(h)}})}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.client.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(i,n);Ec(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.client.core.history.delete(i,o.id)):this.onRelayEventUnknownPayload({topic:i,payload:o})})}registerExpirerEvents(){this.client.core.expirer.on(Ar.expired,async r=>{const{topic:i,id:n}=Ul(r.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Q("EXPIRED"),!0);i?this.client.session.keys.includes(i)&&(await this.deleteSession(i,!0),this.client.events.emit("session_expire",{topic:i})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.client.core.pairing.pairings.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.core.pairing.pairings.get(r).expiry)){const{message:i}=Q("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}}async isValidSessionTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`session topic should be a string: ${r}`);throw new Error(i)}if(!this.client.session.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`session topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.session.get(r).expiry)){await this.deleteSession(r);const{message:i}=Q("EXPIRED",`session topic: ${r}`);throw new Error(i)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if(us(r,!1)){const{message:i}=Q("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${r}`);throw new Error(i)}else{const{message:i}=Q("MISSING_OR_INVALID",`session or pairing topic should be a string: ${r}`);throw new Error(i)}}async isValidProposalId(r){if(!J1(r)){const{message:i}=Q("MISSING_OR_INVALID",`proposal id should be a number: ${r}`);throw new Error(i)}if(!this.client.proposal.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`proposal id doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.proposal.get(r).expiry)){await this.deleteProposal(r);const{message:i}=Q("EXPIRED",`proposal id: ${r}`);throw new Error(i)}}}class tE extends wo{constructor(r,i){super(r,i,Bb,Sc),this.core=r,this.logger=i}}class rE extends wo{constructor(r,i){super(r,i,Vb,Sc),this.core=r,this.logger=i}}class iE extends wo{constructor(r,i){super(r,i,Gb,Sc,n=>n.id),this.core=r,this.logger=i}}let sE=class Nf extends Nm{constructor(r){super(r),this.protocol=Cf,this.version=Of,this.name=rc.name,this.events=new kt.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(r==null?void 0:r.name)||rc.name,this.metadata=(r==null?void 0:r.metadata)||D1();const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||rc.logger}));this.core=(r==null?void 0:r.core)||new kb(r),this.logger=Re.generateChildLogger(i,this.name),this.session=new rE(this.core,this.logger),this.proposal=new tE(this.core,this.logger),this.pendingRequest=new iE(this.core,this.logger),this.engine=new eE(this)}static async init(r){const i=new Nf(r);return await i.initialize(),i}get context(){return Re.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(r){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(r.message),r}}};var ho={},nE={get exports(){return ho},set exports(c){ho=c}};(function(c,r){var i=typeof self<"u"?self:hr,n=function(){function h(){this.fetch=!1,this.DOMException=i.DOMException}return h.prototype=i,new h}();(function(h){(function(d){var y={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function w(v){return v&&DataView.prototype.isPrototypeOf(v)}if(y.arrayBuffer)var A=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(v){return v&&A.indexOf(Object.prototype.toString.call(v))>-1};function K(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function J(v){return typeof v!="string"&&(v=String(v)),v}function G(v){var E={next:function(){var X=v.shift();return{done:X===void 0,value:X}}};return y.iterable&&(E[Symbol.iterator]=function(){return E}),E}function j(v){this.map={},v instanceof j?v.forEach(function(E,X){this.append(X,E)},this):Array.isArray(v)?v.forEach(function(E){this.append(E[0],E[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(E){this.append(E,v[E])},this)}j.prototype.append=function(v,E){v=K(v),E=J(E);var X=this.map[v];this.map[v]=X?X+", "+E:E},j.prototype.delete=function(v){delete this.map[K(v)]},j.prototype.get=function(v){return v=K(v),this.has(v)?this.map[v]:null},j.prototype.has=function(v){return this.map.hasOwnProperty(K(v))},j.prototype.set=function(v,E){this.map[K(v)]=J(E)},j.prototype.forEach=function(v,E){for(var X in this.map)this.map.hasOwnProperty(X)&&v.call(E,this.map[X],X,this)},j.prototype.keys=function(){var v=[];return this.forEach(function(E,X){v.push(X)}),G(v)},j.prototype.values=function(){var v=[];return this.forEach(function(E){v.push(E)}),G(v)},j.prototype.entries=function(){var v=[];return this.forEach(function(E,X){v.push([X,E])}),G(v)},y.iterable&&(j.prototype[Symbol.iterator]=j.prototype.entries);function V(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function ie(v){return new Promise(function(E,X){v.onload=function(){E(v.result)},v.onerror=function(){X(v.error)}})}function Ee(v){var E=new FileReader,X=ie(E);return E.readAsArrayBuffer(v),X}function ge(v){var E=new FileReader,X=ie(E);return E.readAsText(v),X}function pe(v){for(var E=new Uint8Array(v),X=new Array(E.length),ce=0;ce-1?E:v}function B(v,E){E=E||{};var X=E.body;if(v instanceof B){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,E.headers||(this.headers=new j(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!X&&v._bodyInit!=null&&(X=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new j(E.headers)),this.method=M(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function ve(v){var E=new FormData;return v.trim().split("&").forEach(function(X){if(X){var ce=X.split("="),k=ce.shift().replace(/\+/g," "),U=ce.join("=").replace(/\+/g," ");E.append(decodeURIComponent(k),decodeURIComponent(U))}}),E}function re(v){var E=new j,X=v.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(ce){var k=ce.split(":"),U=k.shift().trim();if(U){var z=k.join(":").trim();E.append(U,z)}}),E}le.call(B.prototype);function ue(v,E){E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in E?E.statusText:"OK",this.headers=new j(E.headers),this.url=E.url||"",this._initBody(v)}le.call(ue.prototype),ue.prototype.clone=function(){return new ue(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new j(this.headers),url:this.url})},ue.error=function(){var v=new ue(null,{status:0,statusText:""});return v.type="error",v};var Te=[301,302,303,307,308];ue.redirect=function(v,E){if(Te.indexOf(E)===-1)throw new RangeError("Invalid status code");return new ue(null,{status:E,headers:{location:v}})},d.DOMException=h.DOMException;try{new d.DOMException}catch{d.DOMException=function(E,X){this.message=E,this.name=X;var ce=Error(E);this.stack=ce.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function qe(v,E){return new Promise(function(X,ce){var k=new B(v,E);if(k.signal&&k.signal.aborted)return ce(new d.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function z(){U.abort()}U.onload=function(){var H={status:U.status,statusText:U.statusText,headers:re(U.getAllResponseHeaders()||"")};H.url="responseURL"in U?U.responseURL:H.headers.get("X-Request-URL");var Ye="response"in U?U.response:U.responseText;X(new ue(Ye,H))},U.onerror=function(){ce(new TypeError("Network request failed"))},U.ontimeout=function(){ce(new TypeError("Network request failed"))},U.onabort=function(){ce(new d.DOMException("Aborted","AbortError"))},U.open(k.method,k.url,!0),k.credentials==="include"?U.withCredentials=!0:k.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&y.blob&&(U.responseType="blob"),k.headers.forEach(function(H,Ye){U.setRequestHeader(Ye,H)}),k.signal&&(k.signal.addEventListener("abort",z),U.onreadystatechange=function(){U.readyState===4&&k.signal.removeEventListener("abort",z)}),U.send(typeof k._bodyInit>"u"?null:k._bodyInit)})}return qe.polyfill=!0,h.fetch||(h.fetch=qe,h.Headers=j,h.Request=B,h.Response=ue),d.Headers=j,d.Request=B,d.Response=ue,d.fetch=qe,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;r=o.fetch,r.default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,c.exports=r})(nE,ho);const xl=Y1(ho),oE={Accept:"application/json","Content-Type":"application/json"},aE="POST",Il={headers:oE,method:aE},Sl=10;class zi{constructor(r,i=!1){if(this.url=r,this.disableProviderPing=i,this.events=new kt.EventEmitter,this.isAvailable=!1,this.registering=!1,!Zh(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);this.url=r,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(r,i){this.isAvailable||await this.register();try{const n=Vs(r),h=await(await xl(this.url,Object.assign(Object.assign({},Il),{body:n}))).json();this.onPayload({data:h})}catch(n){this.onError(r.id,n)}}async register(r=this.url){if(!Zh(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));n()})})}this.url=r,this.registering=!0;try{if(!this.disableProviderPing){const i=Vs({id:1,jsonrpc:"2.0",method:"test",params:[]});await xl(r,Object.assign(Object.assign({},Il),{body:i}))}this.onOpen()}catch(i){const n=this.parseError(i);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Sl&&this.events.setMaxListeners(Sl)}}const Pl="error",cE="wss://relay.walletconnect.com",uE="wc",hE="universal_provider",Al=`${uE}@2:${hE}:`,lE="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fc={exports:{}};/** +import{c as hr,t as bi,g as f1,a as ne,b as p1,w as $l,r as jl,f as vc,d as fo,e as d1,I as _i,A as g1,U as v1,h as Q,i as y1,j as cc,k as m1,_ as _1,P as w1,V as Ah,l as b1,D as E1,C as x1,Z as Ch,$ as I1,m as S1,n as oo,q as P1,o as Ml,p as Fr,y as A1,s as C1,X as cs,u as Ft,v as rr,x as mi,z as ur,B as O1,E as us,F as Ul,G as R1,H as T1,J as N1,K as ql,L as L1,M as zl,Y as kl,N as ls,O as uc,Q as ro,R as ps,S as D1,T as io,W as F1,a0 as $1,a1 as j1,a2 as M1,a3 as U1,a4 as Va,a5 as Oh,a6 as q1,a7 as z1,a8 as k1,a9 as Rh,aa as H1,ab as B1,ac as V1,ad as K1,ae as G1,af as W1,ag as J1,ah as Y1,ai as so,aj as Hl,ak as Ka,al as X1,am as Z1}from"./index-d18dd62c.js";var kt={},Q1={get exports(){return kt},set exports(c){kt=c}},fs=typeof Reflect=="object"?Reflect:null,Th=fs&&typeof fs.apply=="function"?fs.apply:function(r,i,n){return Function.prototype.apply.call(r,i,n)},no;fs&&typeof fs.ownKeys=="function"?no=fs.ownKeys:Object.getOwnPropertySymbols?no=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:no=function(r){return Object.getOwnPropertyNames(r)};function em(c){console&&console.warn&&console.warn(c)}var Bl=Number.isNaN||function(r){return r!==r};function He(){He.init.call(this)}Q1.exports=He;kt.once=sm;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var Nh=10;function po(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}Object.defineProperty(He,"defaultMaxListeners",{enumerable:!0,get:function(){return Nh},set:function(c){if(typeof c!="number"||c<0||Bl(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");Nh=c}});He.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};He.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Bl(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Vl(c){return c._maxListeners===void 0?He.defaultMaxListeners:c._maxListeners}He.prototype.getMaxListeners=function(){return Vl(this)};He.prototype.emit=function(r){for(var i=[],n=1;n0&&(d=i[0]),d instanceof Error)throw d;var y=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw y.context=d,y}var w=h[r];if(w===void 0)return!1;if(typeof w=="function")Th(w,this,i);else for(var A=w.length,F=Yl(w,A),n=0;n0&&d.length>o&&!d.warned){d.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=c,y.type=r,y.count=d.length,em(y)}return c}He.prototype.addListener=function(r,i){return Kl(this,r,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(r,i){return Kl(this,r,i,!0)};function tm(){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 Gl(c,r,i){var n={fired:!1,wrapFn:void 0,target:c,type:r,listener:i},o=tm.bind(n);return o.listener=i,n.wrapFn=o,o}He.prototype.once=function(r,i){return po(i),this.on(r,Gl(this,r,i)),this};He.prototype.prependOnceListener=function(r,i){return po(i),this.prependListener(r,Gl(this,r,i)),this};He.prototype.removeListener=function(r,i){var n,o,h,d,y;if(po(i),o=this._events,o===void 0)return this;if(n=o[r],n===void 0)return this;if(n===i||n.listener===i)--this._eventsCount===0?this._events=Object.create(null):(delete o[r],o.removeListener&&this.emit("removeListener",r,n.listener||i));else if(typeof n!="function"){for(h=-1,d=n.length-1;d>=0;d--)if(n[d]===i||n[d].listener===i){y=n[d].listener,h=d;break}if(h<0)return this;h===0?n.shift():rm(n,h),n.length===1&&(o[r]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",r,y||i)}return this};He.prototype.off=He.prototype.removeListener;He.prototype.removeAllListeners=function(r){var i,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var h=Object.keys(n),d;for(o=0;o=0;o--)this.removeListener(r,i[o]);return this};function Wl(c,r,i){var n=c._events;if(n===void 0)return[];var o=n[r];return o===void 0?[]:typeof o=="function"?i?[o.listener||o]:[o]:i?im(o):Yl(o,o.length)}He.prototype.listeners=function(r){return Wl(this,r,!0)};He.prototype.rawListeners=function(r){return Wl(this,r,!1)};He.listenerCount=function(c,r){return typeof c.listenerCount=="function"?c.listenerCount(r):Jl.call(c,r)};He.prototype.listenerCount=Jl;function Jl(c){var r=this._events;if(r!==void 0){var i=r[c];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}He.prototype.eventNames=function(){return this._eventsCount>0?no(this._events):[]};function Yl(c,r){for(var i=new Array(r),n=0;ntypeof i>"u"?null:i)}Ks.safeJsonStringify=am;var ao={},Ga={get exports(){return ao},set exports(c){ao=c}},Lh;function cm(){return Lh||(Lh=1,function(){let c;function r(){}c=r,c.prototype.getItem=function(i){return this.hasOwnProperty(i)?String(this[i]):null},c.prototype.setItem=function(i,n){this[i]=String(n)},c.prototype.removeItem=function(i){delete this[i]},c.prototype.clear=function(){const i=this;Object.keys(i).forEach(function(n){i[n]=void 0,delete i[n]})},c.prototype.key=function(i){return i=i||0,Object.keys(this)[i]},c.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof hr<"u"&&hr.localStorage?Ga.exports=hr.localStorage:typeof window<"u"&&window.localStorage?Ga.exports=window.localStorage:Ga.exports=new r}()),ao}var Wa={},Ds={},Dh;function um(){if(Dh)return Ds;Dh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.IKeyValueStorage=void 0;class c{}return Ds.IKeyValueStorage=c,Ds}var Fs={},Fh;function hm(){if(Fh)return Fs;Fh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.parseEntry=void 0;const c=Ks;function r(i){var n;return[i[0],c.safeJsonParse((n=i[1])!==null&&n!==void 0?n:"")]}return Fs.parseEntry=r,Fs}var $h;function lm(){return $h||($h=1,function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(um(),c),r.__exportStar(hm(),c)}(Wa)),Wa}Object.defineProperty(go,"__esModule",{value:!0});go.KeyValueStorage=void 0;const hs=bi,jh=Ks,fm=hs.__importDefault(cm()),pm=lm();class Zl{constructor(){this.localStorage=fm.default}getKeys(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(pm.parseEntry)})}getItem(r){return hs.__awaiter(this,void 0,void 0,function*(){const i=this.localStorage.getItem(r);if(i!==null)return jh.safeJsonParse(i)})}setItem(r,i){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(r,jh.safeJsonStringify(i))})}removeItem(r){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(r)})}}go.KeyValueStorage=Zl;var dm=go.default=Zl,ds={},$s={},Ja={},js={};let qi=class{};const gm=Object.freeze(Object.defineProperty({__proto__:null,IEvents:qi},Symbol.toStringTag,{value:"Module"})),vm=f1(gm);var Mh;function ym(){if(Mh)return js;Mh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.IHeartBeat=void 0;const c=vm;class r extends c.IEvents{constructor(n){super()}}return js.IHeartBeat=r,js}var Uh;function Ql(){return Uh||(Uh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(ym(),c)}(Ja)),Ja}var Ya={},Mi={},qh;function mm(){if(qh)return Mi;qh=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.HEARTBEAT_EVENTS=Mi.HEARTBEAT_INTERVAL=void 0;const c=ne;return Mi.HEARTBEAT_INTERVAL=c.FIVE_SECONDS,Mi.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Mi}var zh;function ef(){return zh||(zh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(mm(),c)}(Ya)),Ya}var kh;function _m(){if(kh)return $s;kh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.HeartBeat=void 0;const c=bi,r=kt,i=ne,n=Ql(),o=ef();class h extends n.IHeartBeat{constructor(y){super(y),this.events=new r.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(y==null?void 0:y.interval)||o.HEARTBEAT_INTERVAL}static init(y){return c.__awaiter(this,void 0,void 0,function*(){const w=new h(y);return yield w.init(),w})}init(){return c.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(y,w){this.events.on(y,w)}once(y,w){this.events.once(y,w)}off(y,w){this.events.off(y,w)}removeListener(y,w){this.events.removeListener(y,w)}initialize(){return c.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),i.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return $s.HeartBeat=h,$s}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(_m(),c),r.__exportStar(Ql(),c),r.__exportStar(ef(),c)})(ds);var Re={},Xa,Hh;function wm(){if(Hh)return Xa;Hh=1;function c(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Xa=r;function r(i,n,o){var h=o&&o.stringify||c,d=1;if(typeof i=="object"&&i!==null){var y=n.length+d;if(y===1)return i;var w=new Array(y);w[0]=h(i);for(var A=1;A-1?G:0,i.charCodeAt(V+1)){case 100:case 102:if(J>=F||n[J]==null)break;G=F||n[J]==null)break;G=F||n[J]===void 0)break;G",G=V+2,V++;break}K+=h(n[J]),G=V+2,V++;break;case 115:if(J>=F)break;G-1&&(ue=!1);const Te=["error","fatal","warn","info","debug","trace"];typeof B=="function"&&(B.error=B.fatal=B.warn=B.info=B.debug=B.trace=B),T.enabled===!1&&(T.level="silent");const qe=T.level||"info",v=Object.create(B);v.log||(v.log=ie),Object.defineProperty(v,"levelVal",{get:X}),Object.defineProperty(v,"level",{get:ce,set:k});const E={transmit:M,serialize:re,asObject:T.browser.asObject,levels:Te,timestamp:G(T)};v.levels=o.levels,v.level=qe,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=ie,v.serializers=ve,v._serialize=re,v._stdErrSerialize=ue,v.child=U,M&&(v._logEvent=K());function X(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ce(){return this._level}function k(z){if(z!=="silent"&&!this.levels.values[z])throw Error("unknown level "+z);this._level=z,h(E,v,"error","log"),h(E,v,"fatal","error"),h(E,v,"warn","error"),h(E,v,"info","log"),h(E,v,"debug","log"),h(E,v,"trace","log")}function U(z,H){if(!z)throw new Error("missing bindings for child Pino");H=H||{},re&&z.serializers&&(H.serializers=z.serializers);const Ye=H.serializers;if(re&&Ye){var Be=Object.assign({},ve,Ye),jr=T.browser.serialize===!0?Object.keys(Be):re;delete z.serializers,w([z],jr,Be,this._stdErrSerialize)}function xe(St){this._childLevel=(St._childLevel|0)+1,this.error=A(St,z,"error"),this.fatal=A(St,z,"fatal"),this.warn=A(St,z,"warn"),this.info=A(St,z,"info"),this.debug=A(St,z,"debug"),this.trace=A(St,z,"trace"),Be&&(this.serializers=Be,this._serialize=jr),M&&(this._logEvent=K([].concat(St._logEvent.bindings,z)))}return xe.prototype=this,new xe(this)}return v}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=i,o.stdTimeFunctions=Object.assign({},{nullTime:Ee,epochTime:ge,unixTime:pe,isoTime:he});function h(T,M,B,ve){const re=Object.getPrototypeOf(M);M[B]=M.levelVal>M.levels.values[B]?ie:re[B]?re[B]:r[B]||r[ve]||ie,d(T,M,B)}function d(T,M,B){!T.transmit&&M[B]===ie||(M[B]=function(ve){return function(){const ue=T.timestamp(),Te=new Array(arguments.length),qe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===r?r:this;for(var v=0;v-1&&ue in B&&(T[re][ue]=B[ue](T[re][ue]))}function A(T,M,B){return function(){const ve=new Array(1+arguments.length);ve[0]=M;for(var re=1;re"u"?A=i(y,w):A=y.bindings().context||"",A}tr.getLoggerContext=o;function h(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=o(y,A);return F.trim()?`${F}/${w}`:w}tr.formatChildLoggerContext=h;function d(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=h(y,w,A),K=y.child({context:F});return n(K,F,A)}return tr.generateChildLogger=d,tr}(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.pino=void 0;const r=bi,i=r.__importDefault(bm());Object.defineProperty(c,"pino",{enumerable:!0,get:function(){return i.default}}),r.__exportStar(tf(),c),r.__exportStar(Em(),c)})(Re);class xm extends qi{constructor(r){super(),this.opts=r,this.protocol="wc",this.version=2}}class Im extends qi{constructor(r,i){super(),this.core=r,this.logger=i,this.records=new Map}}class Sm{constructor(r,i){this.logger=r,this.core=i}}let Pm=class extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}},Am=class extends qi{constructor(r){super()}},Cm=class{constructor(r,i,n,o){this.core=r,this.logger=i,this.name=n}};class Om extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}}let Rm=class extends qi{constructor(r,i){super(),this.core=r,this.logger=i}},Tm=class{constructor(r,i){this.projectId=r,this.logger=i}},Nm=class{constructor(r){this.opts=r,this.protocol="wc",this.version=2}},Lm=class{constructor(r){this.client=r}};const Dm=c=>JSON.stringify(c,(r,i)=>typeof i=="bigint"?i.toString()+"n":i),Fm=c=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,i=c.replace(r,'$1"$2n"$3');return JSON.parse(i,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function yc(c){if(typeof c!="string")throw new Error(`Cannot safe json parse value of type ${typeof c}`);try{return Fm(c)}catch{return c}}function Vs(c){return typeof c=="string"?c:Dm(c)||""}var mc={},rf={};(function(c){Object.defineProperty(c,"__esModule",{value:!0});var r=p1,i=$l;c.DIGEST_LENGTH=64,c.BLOCK_SIZE=128;var n=function(){function y(){this.digestLength=c.DIGEST_LENGTH,this.blockSize=c.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},y.prototype.update=function(w,A){if(A===void 0&&(A=w.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var F=0;if(this._bytesHashed+=A,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=w[F++],A--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(A>=this.blockSize&&(F=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,w,F,A),A%=this.blockSize);A>0;)this._buffer[this._bufferLength++]=w[F++],A--;return this},y.prototype.finish=function(w){if(!this._finished){var A=this._bytesHashed,F=this._bufferLength,K=A/536870912|0,J=A<<3,G=A%128<112?128:256;this._buffer[F]=128;for(var j=F+1;j0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(w){return this._stateHi.set(w.stateHi),this._stateLo.set(w.stateLo),this._bufferLength=w.bufferLength,w.buffer&&this._buffer.set(w.buffer),this._bytesHashed=w.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(w){i.wipe(w.stateHi),i.wipe(w.stateLo),w.buffer&&i.wipe(w.buffer),w.bufferLength=0,w.bytesHashed=0},y}();c.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function h(y,w,A,F,K,J,G){for(var j=A[0],V=A[1],ie=A[2],Ee=A[3],ge=A[4],pe=A[5],he=A[6],le=A[7],T=F[0],M=F[1],B=F[2],ve=F[3],re=F[4],ue=F[5],Te=F[6],qe=F[7],v,E,X,ce,k,U,z,H;G>=128;){for(var Ye=0;Ye<16;Ye++){var Be=8*Ye+J;y[Ye]=r.readUint32BE(K,Be),w[Ye]=r.readUint32BE(K,Be+4)}for(var Ye=0;Ye<80;Ye++){var jr=j,xe=V,St=ie,R=Ee,O=ge,P=pe,u=he,b=le,ee=T,fe=M,we=B,Ne=ve,De=re,Pe=ue,Pt=Te,_t=qe;if(v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(ge>>>14|re<<32-14)^(ge>>>18|re<<32-18)^(re>>>41-32|ge<<32-(41-32)),E=(re>>>14|ge<<32-14)^(re>>>18|ge<<32-18)^(ge>>>41-32|re<<32-(41-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=ge&pe^~ge&he,E=re&ue^~re&Te,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=o[Ye*2],E=o[Ye*2+1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=y[Ye%16],E=w[Ye%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,X=z&65535|H<<16,ce=k&65535|U<<16,v=X,E=ce,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(j>>>28|T<<32-28)^(T>>>34-32|j<<32-(34-32))^(T>>>39-32|j<<32-(39-32)),E=(T>>>28|j<<32-28)^(j>>>34-32|T<<32-(34-32))^(j>>>39-32|T<<32-(39-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=j&V^j&ie^V&ie,E=T&M^T&B^M&B,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,b=z&65535|H<<16,_t=k&65535|U<<16,v=R,E=Ne,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=X,E=ce,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,R=z&65535|H<<16,Ne=k&65535|U<<16,V=jr,ie=xe,Ee=St,ge=R,pe=O,he=P,le=u,j=b,M=ee,B=fe,ve=we,re=Ne,ue=De,Te=Pe,qe=Pt,T=_t,Ye%16===15)for(var Be=0;Be<16;Be++)v=y[Be],E=w[Be],k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=y[(Be+9)%16],E=w[(Be+9)%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+1)%16],ce=w[(Be+1)%16],v=(X>>>1|ce<<32-1)^(X>>>8|ce<<32-8)^X>>>7,E=(ce>>>1|X<<32-1)^(ce>>>8|X<<32-8)^(ce>>>7|X<<32-7),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+14)%16],ce=w[(Be+14)%16],v=(X>>>19|ce<<32-19)^(ce>>>61-32|X<<32-(61-32))^X>>>6,E=(ce>>>19|X<<32-19)^(X>>>61-32|ce<<32-(61-32))^(ce>>>6|X<<32-6),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,y[Be]=z&65535|H<<16,w[Be]=k&65535|U<<16}v=j,E=T,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[0],E=F[0],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[0]=j=z&65535|H<<16,F[0]=T=k&65535|U<<16,v=V,E=M,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[1],E=F[1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[1]=V=z&65535|H<<16,F[1]=M=k&65535|U<<16,v=ie,E=B,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[2],E=F[2],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[2]=ie=z&65535|H<<16,F[2]=B=k&65535|U<<16,v=Ee,E=ve,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[3],E=F[3],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[3]=Ee=z&65535|H<<16,F[3]=ve=k&65535|U<<16,v=ge,E=re,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[4],E=F[4],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[4]=ge=z&65535|H<<16,F[4]=re=k&65535|U<<16,v=pe,E=ue,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[5],E=F[5],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[5]=pe=z&65535|H<<16,F[5]=ue=k&65535|U<<16,v=he,E=Te,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[6],E=F[6],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[6]=he=z&65535|H<<16,F[6]=Te=k&65535|U<<16,v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[7],E=F[7],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[7]=le=z&65535|H<<16,F[7]=qe=k&65535|U<<16,J+=128,G-=128}return J}function d(y){var w=new n;w.update(y);var A=w.digest();return w.clean(),A}c.hash=d})(rf);(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.convertSecretKeyToX25519=c.convertPublicKeyToX25519=c.verify=c.sign=c.extractPublicKeyFromSecretKey=c.generateKeyPair=c.generateKeyPairFromSeed=c.SEED_LENGTH=c.SECRET_KEY_LENGTH=c.PUBLIC_KEY_LENGTH=c.SIGNATURE_LENGTH=void 0;const r=jl,i=rf,n=$l;c.SIGNATURE_LENGTH=64,c.PUBLIC_KEY_LENGTH=32,c.SECRET_KEY_LENGTH=64,c.SEED_LENGTH=32;function o(R){const O=new Float64Array(16);if(R)for(let P=0;P>16&1),P[fe-1]&=65535;P[15]=u[15]-32767-(P[14]>>16&1);const ee=P[15]>>16&1;P[14]&=65535,V(u,P,1-ee)}for(let b=0;b<16;b++)R[2*b]=u[b]&255,R[2*b+1]=u[b]>>8}function Ee(R,O){let P=0;for(let u=0;u<32;u++)P|=R[u]^O[u];return(1&P-1>>>8)-1}function ge(R,O){const P=new Uint8Array(32),u=new Uint8Array(32);return ie(P,R),ie(u,O),Ee(P,u)}function pe(R){const O=new Uint8Array(32);return ie(O,R),O[0]&1}function he(R,O){for(let P=0;P<16;P++)R[P]=O[2*P]+(O[2*P+1]<<8);R[15]&=32767}function le(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]+P[u]}function T(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]-P[u]}function M(R,O,P){let u,b,ee=0,fe=0,we=0,Ne=0,De=0,Pe=0,Pt=0,_t=0,ot=0,$e=0,Ze=0,Qe=0,at=0,ze=0,et=0,Le=0,Ve=0,ht=0,Me=0,At=0,$t=0,Ht=0,Bt=0,Ut=0,Jt=0,ir=0,Mr=0,Yt=0,Kr=0,ai=0,Ii=0,lt=P[0],it=P[1],ft=P[2],pt=P[3],ct=P[4],st=P[5],Ct=P[6],Ot=P[7],dt=P[8],Rt=P[9],gt=P[10],wt=P[11],vt=P[12],Xe=P[13],Tt=P[14],Nt=P[15];u=O[0],ee+=u*lt,fe+=u*it,we+=u*ft,Ne+=u*pt,De+=u*ct,Pe+=u*st,Pt+=u*Ct,_t+=u*Ot,ot+=u*dt,$e+=u*Rt,Ze+=u*gt,Qe+=u*wt,at+=u*vt,ze+=u*Xe,et+=u*Tt,Le+=u*Nt,u=O[1],fe+=u*lt,we+=u*it,Ne+=u*ft,De+=u*pt,Pe+=u*ct,Pt+=u*st,_t+=u*Ct,ot+=u*Ot,$e+=u*dt,Ze+=u*Rt,Qe+=u*gt,at+=u*wt,ze+=u*vt,et+=u*Xe,Le+=u*Tt,Ve+=u*Nt,u=O[2],we+=u*lt,Ne+=u*it,De+=u*ft,Pe+=u*pt,Pt+=u*ct,_t+=u*st,ot+=u*Ct,$e+=u*Ot,Ze+=u*dt,Qe+=u*Rt,at+=u*gt,ze+=u*wt,et+=u*vt,Le+=u*Xe,Ve+=u*Tt,ht+=u*Nt,u=O[3],Ne+=u*lt,De+=u*it,Pe+=u*ft,Pt+=u*pt,_t+=u*ct,ot+=u*st,$e+=u*Ct,Ze+=u*Ot,Qe+=u*dt,at+=u*Rt,ze+=u*gt,et+=u*wt,Le+=u*vt,Ve+=u*Xe,ht+=u*Tt,Me+=u*Nt,u=O[4],De+=u*lt,Pe+=u*it,Pt+=u*ft,_t+=u*pt,ot+=u*ct,$e+=u*st,Ze+=u*Ct,Qe+=u*Ot,at+=u*dt,ze+=u*Rt,et+=u*gt,Le+=u*wt,Ve+=u*vt,ht+=u*Xe,Me+=u*Tt,At+=u*Nt,u=O[5],Pe+=u*lt,Pt+=u*it,_t+=u*ft,ot+=u*pt,$e+=u*ct,Ze+=u*st,Qe+=u*Ct,at+=u*Ot,ze+=u*dt,et+=u*Rt,Le+=u*gt,Ve+=u*wt,ht+=u*vt,Me+=u*Xe,At+=u*Tt,$t+=u*Nt,u=O[6],Pt+=u*lt,_t+=u*it,ot+=u*ft,$e+=u*pt,Ze+=u*ct,Qe+=u*st,at+=u*Ct,ze+=u*Ot,et+=u*dt,Le+=u*Rt,Ve+=u*gt,ht+=u*wt,Me+=u*vt,At+=u*Xe,$t+=u*Tt,Ht+=u*Nt,u=O[7],_t+=u*lt,ot+=u*it,$e+=u*ft,Ze+=u*pt,Qe+=u*ct,at+=u*st,ze+=u*Ct,et+=u*Ot,Le+=u*dt,Ve+=u*Rt,ht+=u*gt,Me+=u*wt,At+=u*vt,$t+=u*Xe,Ht+=u*Tt,Bt+=u*Nt,u=O[8],ot+=u*lt,$e+=u*it,Ze+=u*ft,Qe+=u*pt,at+=u*ct,ze+=u*st,et+=u*Ct,Le+=u*Ot,Ve+=u*dt,ht+=u*Rt,Me+=u*gt,At+=u*wt,$t+=u*vt,Ht+=u*Xe,Bt+=u*Tt,Ut+=u*Nt,u=O[9],$e+=u*lt,Ze+=u*it,Qe+=u*ft,at+=u*pt,ze+=u*ct,et+=u*st,Le+=u*Ct,Ve+=u*Ot,ht+=u*dt,Me+=u*Rt,At+=u*gt,$t+=u*wt,Ht+=u*vt,Bt+=u*Xe,Ut+=u*Tt,Jt+=u*Nt,u=O[10],Ze+=u*lt,Qe+=u*it,at+=u*ft,ze+=u*pt,et+=u*ct,Le+=u*st,Ve+=u*Ct,ht+=u*Ot,Me+=u*dt,At+=u*Rt,$t+=u*gt,Ht+=u*wt,Bt+=u*vt,Ut+=u*Xe,Jt+=u*Tt,ir+=u*Nt,u=O[11],Qe+=u*lt,at+=u*it,ze+=u*ft,et+=u*pt,Le+=u*ct,Ve+=u*st,ht+=u*Ct,Me+=u*Ot,At+=u*dt,$t+=u*Rt,Ht+=u*gt,Bt+=u*wt,Ut+=u*vt,Jt+=u*Xe,ir+=u*Tt,Mr+=u*Nt,u=O[12],at+=u*lt,ze+=u*it,et+=u*ft,Le+=u*pt,Ve+=u*ct,ht+=u*st,Me+=u*Ct,At+=u*Ot,$t+=u*dt,Ht+=u*Rt,Bt+=u*gt,Ut+=u*wt,Jt+=u*vt,ir+=u*Xe,Mr+=u*Tt,Yt+=u*Nt,u=O[13],ze+=u*lt,et+=u*it,Le+=u*ft,Ve+=u*pt,ht+=u*ct,Me+=u*st,At+=u*Ct,$t+=u*Ot,Ht+=u*dt,Bt+=u*Rt,Ut+=u*gt,Jt+=u*wt,ir+=u*vt,Mr+=u*Xe,Yt+=u*Tt,Kr+=u*Nt,u=O[14],et+=u*lt,Le+=u*it,Ve+=u*ft,ht+=u*pt,Me+=u*ct,At+=u*st,$t+=u*Ct,Ht+=u*Ot,Bt+=u*dt,Ut+=u*Rt,Jt+=u*gt,ir+=u*wt,Mr+=u*vt,Yt+=u*Xe,Kr+=u*Tt,ai+=u*Nt,u=O[15],Le+=u*lt,Ve+=u*it,ht+=u*ft,Me+=u*pt,At+=u*ct,$t+=u*st,Ht+=u*Ct,Bt+=u*Ot,Ut+=u*dt,Jt+=u*Rt,ir+=u*gt,Mr+=u*wt,Yt+=u*vt,Kr+=u*Xe,ai+=u*Tt,Ii+=u*Nt,ee+=38*Ve,fe+=38*ht,we+=38*Me,Ne+=38*At,De+=38*$t,Pe+=38*Ht,Pt+=38*Bt,_t+=38*Ut,ot+=38*Jt,$e+=38*ir,Ze+=38*Mr,Qe+=38*Yt,at+=38*Kr,ze+=38*ai,et+=38*Ii,b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),R[0]=ee,R[1]=fe,R[2]=we,R[3]=Ne,R[4]=De,R[5]=Pe,R[6]=Pt,R[7]=_t,R[8]=ot,R[9]=$e,R[10]=Ze,R[11]=Qe,R[12]=at,R[13]=ze,R[14]=et,R[15]=Le}function B(R,O){M(R,O,O)}function ve(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=253;u>=0;u--)B(P,P),u!==2&&u!==4&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function re(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=250;u>=0;u--)B(P,P),u!==1&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function ue(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o(),De=o(),Pe=o();T(P,R[1],R[0]),T(Pe,O[1],O[0]),M(P,P,Pe),le(u,R[0],R[1]),le(Pe,O[0],O[1]),M(u,u,Pe),M(b,R[3],O[3]),M(b,b,A),M(ee,R[2],O[2]),le(ee,ee,ee),T(fe,u,P),T(we,ee,b),le(Ne,ee,b),le(De,u,P),M(R[0],fe,we),M(R[1],De,Ne),M(R[2],Ne,we),M(R[3],fe,De)}function Te(R,O,P){for(let u=0;u<4;u++)V(R[u],O[u],P)}function qe(R,O){const P=o(),u=o(),b=o();ve(b,O[2]),M(P,O[0],b),M(u,O[1],b),ie(R,u),R[31]^=pe(P)<<7}function v(R,O,P){G(R[0],d),G(R[1],y),G(R[2],y),G(R[3],d);for(let u=255;u>=0;--u){const b=P[u/8|0]>>(u&7)&1;Te(R,O,b),ue(O,R),ue(R,R),Te(R,O,b)}}function E(R,O){const P=[o(),o(),o(),o()];G(P[0],F),G(P[1],K),G(P[2],y),M(P[3],F,K),v(R,P,O)}function X(R){if(R.length!==c.SEED_LENGTH)throw new Error(`ed25519: seed must be ${c.SEED_LENGTH} bytes`);const O=(0,i.hash)(R);O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(32),u=[o(),o(),o(),o()];E(u,O),qe(P,u);const b=new Uint8Array(64);return b.set(R),b.set(P,32),{publicKey:P,secretKey:b}}c.generateKeyPairFromSeed=X;function ce(R){const O=(0,r.randomBytes)(32,R),P=X(O);return(0,n.wipe)(O),P}c.generateKeyPair=ce;function k(R){if(R.length!==c.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${c.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(R.subarray(32))}c.extractPublicKeyFromSecretKey=k;const U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function z(R,O){let P,u,b,ee;for(u=63;u>=32;--u){for(P=0,b=u-32,ee=u-12;b>4)*U[b],P=O[b]>>8,O[b]&=255;for(b=0;b<32;b++)O[b]-=P*U[b];for(u=0;u<32;u++)O[u+1]+=O[u]>>8,R[u]=O[u]&255}function H(R){const O=new Float64Array(64);for(let P=0;P<64;P++)O[P]=R[P];for(let P=0;P<64;P++)R[P]=0;z(R,O)}function Ye(R,O){const P=new Float64Array(64),u=[o(),o(),o(),o()],b=(0,i.hash)(R.subarray(0,32));b[0]&=248,b[31]&=127,b[31]|=64;const ee=new Uint8Array(64);ee.set(b.subarray(32),32);const fe=new i.SHA512;fe.update(ee.subarray(32)),fe.update(O);const we=fe.digest();fe.clean(),H(we),E(u,we),qe(ee,u),fe.reset(),fe.update(ee.subarray(0,32)),fe.update(R.subarray(32)),fe.update(O);const Ne=fe.digest();H(Ne);for(let De=0;De<32;De++)P[De]=we[De];for(let De=0;De<32;De++)for(let Pe=0;Pe<32;Pe++)P[De+Pe]+=Ne[De]*b[Pe];return z(ee.subarray(32),P),ee}c.sign=Ye;function Be(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o();return G(R[2],y),he(R[1],O),B(b,R[1]),M(ee,b,w),T(b,b,R[2]),le(ee,R[2],ee),B(fe,ee),B(we,fe),M(Ne,we,fe),M(P,Ne,b),M(P,P,ee),re(P,P),M(P,P,b),M(P,P,ee),M(P,P,ee),M(R[0],P,ee),B(u,R[0]),M(u,u,ee),ge(u,b)&&M(R[0],R[0],J),B(u,R[0]),M(u,u,ee),ge(u,b)?-1:(pe(R[0])===O[31]>>7&&T(R[0],d,R[0]),M(R[3],R[0],R[1]),0)}function jr(R,O,P){const u=new Uint8Array(32),b=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(P.length!==c.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${c.SIGNATURE_LENGTH} bytes`);if(Be(ee,R))return!1;const fe=new i.SHA512;fe.update(P.subarray(0,32)),fe.update(R),fe.update(O);const we=fe.digest();return H(we),v(b,ee,we),E(ee,P.subarray(32)),ue(b,ee),qe(u,b),!Ee(P,u)}c.verify=jr;function xe(R){let O=[o(),o(),o(),o()];if(Be(O,R))throw new Error("Ed25519: invalid public key");let P=o(),u=o(),b=O[1];le(P,y,b),T(u,y,b),ve(u,u),M(P,P,u);let ee=new Uint8Array(32);return ie(ee,P),ee}c.convertPublicKeyToX25519=xe;function St(R){const O=(0,i.hash)(R.subarray(0,32));O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(O.subarray(0,32));return(0,n.wipe)(O),P}c.convertSecretKeyToX25519=St})(mc);const $m="EdDSA",jm="JWT",sf=".",nf="base64url",Mm="utf8",Um="utf8",qm=":",zm="did",km="key",Gh="base58btc",Hm="z",Bm="K36",Vm=32;function co(c){return fo(vc(Vs(c),Mm),nf)}function of(c){const r=vc(Bm,Gh),i=Hm+fo(d1([r,c]),Gh);return[zm,km,i].join(qm)}function Km(c){return fo(c,nf)}function Gm(c){return vc([co(c.header),co(c.payload)].join(sf),Um)}function Wm(c){return[co(c.header),co(c.payload),Km(c.signature)].join(sf)}function Wh(c=jl.randomBytes(Vm)){return mc.generateKeyPairFromSeed(c)}async function Jm(c,r,i,n,o=ne.fromMiliseconds(Date.now())){const h={alg:$m,typ:jm},d=of(n.publicKey),y=o+i,w={iss:d,sub:c,aud:r,iat:o,exp:y},A=Gm({header:h,payload:w}),F=mc.sign(n.secretKey,A);return Wm({header:h,payload:w,signature:F})}const Ym="PARSE_ERROR",Xm="INVALID_REQUEST",Zm="METHOD_NOT_FOUND",Qm="INVALID_PARAMS",af="INTERNAL_ERROR",_c="SERVER_ERROR",e_=[-32700,-32600,-32601,-32602,-32603],Bs={[Ym]:{code:-32700,message:"Parse error"},[Xm]:{code:-32600,message:"Invalid Request"},[Zm]:{code:-32601,message:"Method not found"},[Qm]:{code:-32602,message:"Invalid params"},[af]:{code:-32603,message:"Internal error"},[_c]:{code:-32e3,message:"Server error"}},cf=_c;function t_(c){return e_.includes(c)}function Jh(c){return Object.keys(Bs).includes(c)?Bs[c]:Bs[cf]}function r_(c){const r=Object.values(Bs).find(i=>i.code===c);return r||Bs[cf]}function uf(c,r,i){return c.message.includes("getaddrinfo ENOTFOUND")||c.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${r}`):c}var hf={},si={},Yh;function i_(){if(Yh)return si;Yh=1,Object.defineProperty(si,"__esModule",{value:!0}),si.isBrowserCryptoAvailable=si.getSubtleCrypto=si.getBrowerCrypto=void 0;function c(){return(hr===null||hr===void 0?void 0:hr.crypto)||(hr===null||hr===void 0?void 0:hr.msCrypto)||{}}si.getBrowerCrypto=c;function r(){const n=c();return n.subtle||n.webkitSubtle}si.getSubtleCrypto=r;function i(){return!!c()&&!!r()}return si.isBrowserCryptoAvailable=i,si}var ni={},Xh;function s_(){if(Xh)return ni;Xh=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.isBrowser=ni.isNode=ni.isReactNative=void 0;function c(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ni.isReactNative=c;function r(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ni.isNode=r;function i(){return!c()&&!r()}return ni.isBrowser=i,ni}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(i_(),c),r.__exportStar(s_(),c)})(hf);function lf(c=3){const r=Date.now()*Math.pow(10,c),i=Math.floor(Math.random()*Math.pow(10,c));return r+i}function wc(c=6){return BigInt(lf(c))}function vo(c,r,i){return{id:i||lf(),jsonrpc:"2.0",method:c,params:r}}function bc(c,r){return{id:c,jsonrpc:"2.0",result:r}}function yo(c,r,i){return{id:c,jsonrpc:"2.0",error:n_(r,i)}}function n_(c,r){return typeof c>"u"?Jh(af):(typeof c=="string"&&(c=Object.assign(Object.assign({},Jh(_c)),{message:c})),typeof r<"u"&&(c.data=r),t_(c.code)&&(c=r_(c.code)),c)}class o_{}class a_ extends o_{constructor(){super()}}class c_ extends a_{constructor(r){super()}}const u_="^https?:",h_="^wss?:";function l_(c){const r=c.match(new RegExp(/^\w+:/,"gi"));if(!(!r||!r.length))return r[0]}function ff(c,r){const i=l_(c);return typeof i>"u"?!1:new RegExp(r).test(i)}function Zh(c){return ff(c,u_)}function Qh(c){return ff(c,h_)}function f_(c){return new RegExp("wss?://localhost(:d{2,5})?").test(c)}function pf(c){return typeof c=="object"&&"id"in c&&"jsonrpc"in c&&c.jsonrpc==="2.0"}function Ec(c){return pf(c)&&"method"in c}function mo(c){return pf(c)&&(oi(c)||$r(c))}function oi(c){return"result"in c}function $r(c){return"error"in c}class Ei extends c_{constructor(r){super(r),this.events=new kt.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(r),this.connection.connected&&this.registerEventListeners()}async connect(r=this.connection){await this.open(r)}async disconnect(){await this.close()}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async request(r,i){return this.requestStrict(vo(r.method,r.params||[],r.id||wc().toString()),i)}async requestStrict(r,i){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(h){o(h)}this.events.on(`${r.id}`,h=>{$r(h)?o(h.error):n(h.result)});try{await this.connection.send(r,i)}catch(h){o(h)}})}setConnection(r=this.connection){return r}onPayload(r){this.events.emit("payload",r),mo(r)?this.events.emit(`${r.id}`,r):this.events.emit("message",{type:r.method,data:r.params})}onClose(r){r&&r.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${r.code} ${r.reason?`(${r.reason})`:""}`)),this.events.emit("disconnect")}async open(r=this.connection){this.connection===r&&this.connection.connected||(this.connection.connected&&this.close(),typeof r=="string"&&(await this.connection.open(r),r=this.connection),this.connection=this.setConnection(r),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",r=>this.onPayload(r)),this.connection.on("close",r=>this.onClose(r)),this.connection.on("error",r=>this.events.emit("error",r)),this.connection.on("register_error",r=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const p_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),d_=()=>typeof window<"u",el=c=>c.split("?")[0],tl=10,g_=p_();class v_{constructor(r){if(this.url=r,this.events=new kt.EventEmitter,this.registering=!1,!Qh(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);this.url=r}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){return new Promise((r,i)=>{if(typeof this.socket>"u"){i(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),r()},this.socket.close()})}async send(r,i){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Vs(r))}catch(n){this.onError(r.id,n)}}register(r=this.url){if(!Qh(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=r,this.registering=!0,new Promise((i,n)=>{const o=hf.isReactNative()?void 0:{rejectUnauthorized:!f_(r)},h=new g_(r,[],o);d_()?h.onerror=d=>{const y=d;n(this.emitError(y.error))}:h.on("error",d=>{n(this.emitError(d))}),h.onopen=()=>{this.onOpen(h),i(h)}})}onOpen(r){r.onmessage=i=>this.onPayload(i),r.onclose=i=>this.onClose(i),this.socket=r,this.registering=!1,this.events.emit("open")}onClose(r){this.socket=void 0,this.registering=!1,this.events.emit("close",r)}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,el(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>tl&&this.events.setMaxListeners(tl)}emitError(r){const i=this.parseError(new Error((r==null?void 0:r.message)||`WebSocket connection failed for host: ${el(this.url)}`));return this.events.emit("register_error",i),i}}var uo={},y_={get exports(){return uo},set exports(c){uo=c}};(function(c,r){var i=200,n="__lodash_hash_undefined__",o=1,h=2,d=9007199254740991,y="[object Arguments]",w="[object Array]",A="[object AsyncFunction]",F="[object Boolean]",K="[object Date]",J="[object Error]",G="[object Function]",j="[object GeneratorFunction]",V="[object Map]",ie="[object Number]",Ee="[object Null]",ge="[object Object]",pe="[object Promise]",he="[object Proxy]",le="[object RegExp]",T="[object Set]",M="[object String]",B="[object Symbol]",ve="[object Undefined]",re="[object WeakMap]",ue="[object ArrayBuffer]",Te="[object DataView]",qe="[object Float32Array]",v="[object Float64Array]",E="[object Int8Array]",X="[object Int16Array]",ce="[object Int32Array]",k="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",H="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,jr=/^(?:0|[1-9]\d*)$/,xe={};xe[qe]=xe[v]=xe[E]=xe[X]=xe[ce]=xe[k]=xe[U]=xe[z]=xe[H]=!0,xe[y]=xe[w]=xe[ue]=xe[F]=xe[Te]=xe[K]=xe[J]=xe[G]=xe[V]=xe[ie]=xe[ge]=xe[le]=xe[T]=xe[M]=xe[re]=!1;var St=typeof hr=="object"&&hr&&hr.Object===Object&&hr,R=typeof self=="object"&&self&&self.Object===Object&&self,O=St||R||Function("return this")(),P=r&&!r.nodeType&&r,u=P&&!0&&c&&!c.nodeType&&c,b=u&&u.exports===P,ee=b&&St.process,fe=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),we=fe&&fe.isTypedArray;function Ne(g,x){for(var $=-1,Y=g==null?0:g.length,Ge=0,ye=[];++$-1}function Co(g,x){var $=this.__data__,Y=Si($,g);return Y<0?(++this.size,$.push([g,x])):$[Y][1]=x,this}yr.prototype.clear=Io,yr.prototype.delete=So,yr.prototype.get=Po,yr.prototype.has=Ao,yr.prototype.set=Co;function Gr(g){var x=-1,$=g==null?0:g.length;for(this.clear();++x<$;){var Y=g[x];this.set(Y[0],Y[1])}}function ki(){this.size=0,this.__data__={hash:new Xe,map:new(it||yr),string:new Xe}}function Oo(g){var x=ci(this,g).delete(g);return this.size-=x?1:0,x}function Hi(g){return ci(this,g).get(g)}function Ro(g){return ci(this,g).has(g)}function To(g,x){var $=ci(this,g),Y=$.size;return $.set(g,x),this.size+=$.size==Y?0:1,this}Gr.prototype.clear=ki,Gr.prototype.delete=Oo,Gr.prototype.get=Hi,Gr.prototype.has=Ro,Gr.prototype.set=To;function Bi(g){var x=-1,$=g==null?0:g.length;for(this.__data__=new Gr;++x<$;)this.add(g[x])}function Ws(g){return this.__data__.set(g,n),this}function Js(g){return this.__data__.has(g)}Bi.prototype.add=Bi.prototype.push=Ws,Bi.prototype.has=Js;function Or(g){var x=this.__data__=new yr(g);this.size=x.size}function No(){this.__data__=new yr,this.size=0}function Lo(g){var x=this.__data__,$=x.delete(g);return this.size=x.size,$}function Do(g){return this.__data__.get(g)}function Fo(g){return this.__data__.has(g)}function Ys(g,x){var $=this.__data__;if($ instanceof yr){var Y=$.__data__;if(!it||Y.lengthLt))return!1;var We=ye.get(g);if(We&&ye.get(x))return We==x;var bt=-1,sr=!0,Dt=$&h?new Bi:void 0;for(ye.set(g,x),ye.set(x,g);++bt-1&&g%1==0&&g-1&&g%1==0&&g<=d}function fn(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Ci(g){return g!=null&&typeof g=="object"}var pn=we?_t(we):Qs;function zo(g){return Uo(g)?Xs(g):en(g)}function Ke(){return[]}function ke(){return!1}c.exports=qo})(y_,uo);function m_(c,r){if(c.length>=255)throw new TypeError("Alphabet too long");for(var i=new Uint8Array(256),n=0;n>>0,he=new Uint8Array(pe);Ee!==ge;){for(var le=j[Ee],T=0,M=pe-1;(le!==0||T>>0,he[M]=le%y>>>0,le=le/y>>>0;if(le!==0)throw new Error("Non-zero carry");ie=T,Ee++}for(var B=pe-ie;B!==pe&&he[B]===0;)B++;for(var ve=w.repeat(V);B>>0,pe=new Uint8Array(ge);j[V];){var he=i[j.charCodeAt(V)];if(he===255)return;for(var le=0,T=ge-1;(he!==0||le>>0,pe[T]=he%256>>>0,he=he/256>>>0;if(he!==0)throw new Error("Non-zero carry");Ee=le,V++}if(j[V]!==" "){for(var M=ge-Ee;M!==ge&&pe[M]===0;)M++;for(var B=new Uint8Array(ie+(ge-M)),ve=ie;M!==ge;)B[ve++]=pe[M++];return B}}}function G(j){var V=J(j);if(V)return V;throw new Error(`Non-${r} character`)}return{encode:K,decodeUnsafe:J,decode:G}}var __=m_,w_=__;const df=c=>{if(c instanceof Uint8Array&&c.constructor.name==="Uint8Array")return c;if(c instanceof ArrayBuffer)return new Uint8Array(c);if(ArrayBuffer.isView(c))return new Uint8Array(c.buffer,c.byteOffset,c.byteLength);throw new Error("Unknown type, must be binary type")},b_=c=>new TextEncoder().encode(c),E_=c=>new TextDecoder().decode(c);class x_{constructor(r,i,n){this.name=r,this.prefix=i,this.baseEncode=n}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}}class I_{constructor(r,i,n){if(this.name=r,this.prefix=i,i.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i.codePointAt(0),this.baseDecode=n}decode(r){if(typeof r=="string"){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(r){return gf(this,r)}}class S_{constructor(r){this.decoders=r}or(r){return gf(this,r)}decode(r){const i=r[0],n=this.decoders[i];if(n)return n.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const gf=(c,r)=>new S_({...c.decoders||{[c.prefix]:c},...r.decoders||{[r.prefix]:r}});class P_{constructor(r,i,n,o){this.name=r,this.prefix=i,this.baseEncode=n,this.baseDecode=o,this.encoder=new x_(r,i,n),this.decoder=new I_(r,i,o)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const _o=({name:c,prefix:r,encode:i,decode:n})=>new P_(c,r,i,n),Gs=({prefix:c,name:r,alphabet:i})=>{const{encode:n,decode:o}=w_(i,r);return _o({prefix:c,name:r,encode:n,decode:h=>df(o(h))})},A_=(c,r,i,n)=>{const o={};for(let F=0;F=8&&(y-=8,d[A++]=255&w>>y)}if(y>=i||255&w<<8-y)throw new SyntaxError("Unexpected end of data");return d},C_=(c,r,i)=>{const n=r[r.length-1]==="=",o=(1<i;)d-=i,h+=r[o&y>>d];if(d&&(h+=r[o&y<_o({prefix:r,name:c,encode(o){return C_(o,n,i)},decode(o){return A_(o,n,i,c)}}),O_=_o({prefix:"\0",name:"identity",encode:c=>E_(c),decode:c=>b_(c)});var R_=Object.freeze({__proto__:null,identity:O_});const T_=Kt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var N_=Object.freeze({__proto__:null,base2:T_});const L_=Kt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var D_=Object.freeze({__proto__:null,base8:L_});const F_=Gs({prefix:"9",name:"base10",alphabet:"0123456789"});var $_=Object.freeze({__proto__:null,base10:F_});const j_=Kt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),M_=Kt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var U_=Object.freeze({__proto__:null,base16:j_,base16upper:M_});const q_=Kt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),z_=Kt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),k_=Kt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),H_=Kt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),B_=Kt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),V_=Kt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),K_=Kt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),G_=Kt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),W_=Kt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var J_=Object.freeze({__proto__:null,base32:q_,base32upper:z_,base32pad:k_,base32padupper:H_,base32hex:B_,base32hexupper:V_,base32hexpad:K_,base32hexpadupper:G_,base32z:W_});const Y_=Gs({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X_=Gs({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Z_=Object.freeze({__proto__:null,base36:Y_,base36upper:X_});const Q_=Gs({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ew=Gs({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var tw=Object.freeze({__proto__:null,base58btc:Q_,base58flickr:ew});const rw=Kt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iw=Kt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sw=Kt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),nw=Kt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ow=Object.freeze({__proto__:null,base64:rw,base64pad:iw,base64url:sw,base64urlpad:nw});const vf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),aw=vf.reduce((c,r,i)=>(c[i]=r,c),[]),cw=vf.reduce((c,r,i)=>(c[r.codePointAt(0)]=i,c),[]);function uw(c){return c.reduce((r,i)=>(r+=aw[i],r),"")}function hw(c){const r=[];for(const i of c){const n=cw[i.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${i}`);r.push(n)}return new Uint8Array(r)}const lw=_o({prefix:"🚀",name:"base256emoji",encode:uw,decode:hw});var fw=Object.freeze({__proto__:null,base256emoji:lw}),pw=yf,rl=128,dw=127,gw=~dw,vw=Math.pow(2,31);function yf(c,r,i){r=r||[],i=i||0;for(var n=i;c>=vw;)r[i++]=c&255|rl,c/=128;for(;c&gw;)r[i++]=c&255|rl,c>>>=7;return r[i]=c|0,yf.bytes=i-n+1,r}var yw=hc,mw=128,il=127;function hc(c,n){var i=0,n=n||0,o=0,h=n,d,y=c.length;do{if(h>=y)throw hc.bytes=0,new RangeError("Could not decode varint");d=c[h++],i+=o<28?(d&il)<=mw);return hc.bytes=h-n,i}var _w=Math.pow(2,7),ww=Math.pow(2,14),bw=Math.pow(2,21),Ew=Math.pow(2,28),xw=Math.pow(2,35),Iw=Math.pow(2,42),Sw=Math.pow(2,49),Pw=Math.pow(2,56),Aw=Math.pow(2,63),Cw=function(c){return c<_w?1:c(mf.encode(c,r,i),r),nl=c=>mf.encodingLength(c),lc=(c,r)=>{const i=r.byteLength,n=nl(c),o=n+nl(i),h=new Uint8Array(o+i);return sl(c,h,0),sl(i,h,n),h.set(r,o),new Rw(c,i,r,h)};class Rw{constructor(r,i,n,o){this.code=r,this.size=i,this.digest=n,this.bytes=o}}const _f=({name:c,code:r,encode:i})=>new Tw(c,r,i);class Tw{constructor(r,i,n){this.name=r,this.code=i,this.encode=n}digest(r){if(r instanceof Uint8Array){const i=this.encode(r);return i instanceof Uint8Array?lc(this.code,i):i.then(n=>lc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const wf=c=>async r=>new Uint8Array(await crypto.subtle.digest(c,r)),Nw=_f({name:"sha2-256",code:18,encode:wf("SHA-256")}),Lw=_f({name:"sha2-512",code:19,encode:wf("SHA-512")});var Dw=Object.freeze({__proto__:null,sha256:Nw,sha512:Lw});const bf=0,Fw="identity",Ef=df,$w=c=>lc(bf,Ef(c)),jw={code:bf,name:Fw,encode:Ef,digest:$w};var Mw=Object.freeze({__proto__:null,identity:jw});new TextEncoder,new TextDecoder;const ol={...R_,...N_,...D_,...$_,...U_,...J_,...Z_,...tw,...ow,...fw};({...Dw,...Mw});function xf(c){return globalThis.Buffer!=null?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):c}function Uw(c=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xf(globalThis.Buffer.allocUnsafe(c)):new Uint8Array(c)}function If(c,r,i,n){return{name:c,prefix:r,encoder:{name:c,prefix:r,encode:i},decoder:{decode:n}}}const al=If("utf8","u",c=>"u"+new TextDecoder("utf8").decode(c),c=>new TextEncoder().encode(c.substring(1))),Qa=If("ascii","a",c=>{let r="a";for(let i=0;i{c=c.substring(1);const r=Uw(c.length);for(let i=0;i{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:h}=Q("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(h)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=r,this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(r){await this.core.storage.setItem(this.storageKey,zl(r))}async getKeyChain(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(r):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class yb{constructor(r,i,n){this.core=r,this.logger=i,this.name=Vw,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),h=Wh(o);return of(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=y1();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),d=Wh(h),y=cc();return await Jm(y,o,Kw,d)},this.generateSharedKey=(o,h,d)=>{this.isInitialized();const y=this.getPrivateKey(o),w=m1(y,h);return this.setSymKey(w,d)},this.setSymKey=async(o,h)=>{this.isInitialized();const d=h||_1(o);return await this.keychain.set(d,o),d},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,h,d)=>{this.isInitialized();const y=w1(d),w=Vs(h);if(Ah(y)){const J=y.senderPublicKey,G=y.receiverPublicKey;o=await this.generateSharedKey(J,G)}const A=this.getSymKey(o),{type:F,senderPublicKey:K}=y;return b1({type:F,symKey:A,message:w,senderPublicKey:K})},this.decode=async(o,h,d)=>{this.isInitialized();const y=E1(h,d);if(Ah(y)){const F=y.receiverPublicKey,K=y.senderPublicKey;o=await this.generateSharedKey(F,K)}const w=this.getSymKey(o),A=x1({symKey:w,encoded:h});return yc(A)},this.getPayloadType=o=>{const h=Ch(o);return I1(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Ch(o);return h.senderPublicKey?fo(h.senderPublicKey,S1):void 0},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.keychain=n||new vb(this.core,this.logger)}get context(){return Re.getLoggerContext(this.logger)}async setPrivateKey(r,i){return await this.keychain.set(r,i),r}getPrivateKey(r){return this.keychain.get(r)}async getClientSeed(){let r="";try{r=this.keychain.get(cl)}catch{r=cc(),await this.keychain.set(cl,r)}return zw(r,"base16")}getSymKey(r){return this.keychain.get(r)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class mb extends Sm{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name=Jw,this.version=Yw,this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const h=ls(o);let d=this.messages.get(n);return typeof d>"u"&&(d={}),typeof d[h]<"u"||(d[h]=o,this.messages.set(n,d),await this.persist()),h},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const h=this.get(n),d=ls(o);return typeof h[d]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Re.generateChildLogger(r,this.name),this.core=i}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(r){await this.core.storage.setItem(this.storageKey,zl(r))}async getRelayerMessages(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(r):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class _b extends Pm{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new kt.EventEmitter,this.name=Zw,this.queue=new Map,this.publishTimeout=ne.toMiliseconds(ne.TEN_SECONDS),this.queueTimeout=ne.toMiliseconds(ne.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,o,h)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}});try{const d=(h==null?void 0:h.ttl)||Xw,y=uc(h),w=(h==null?void 0:h.prompt)||!1,A=(h==null?void 0:h.tag)||0,F=(h==null?void 0:h.id)||wc().toString(),K={topic:n,message:o,opts:{ttl:d,relay:y,prompt:w,tag:A,id:F}},J=setTimeout(()=>this.queue.set(F,K),this.queueTimeout);try{await await oo(this.rpcPublish(n,o,d,y,w,A,F),this.publishTimeout),clearTimeout(J),this.relayer.events.emit(mt.publish,K)}catch{this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0;return}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}})}catch(d){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(d),d}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.registerEventListeners()}get context(){return Re.getLoggerContext(this.logger)}rpcPublish(r,i,n,o,h,d,y){var w,A,F,K;const J={method:ro(o.protocol).publish,params:{topic:r,message:i,ttl:n,prompt:h,tag:d},id:y};return _i((w=J.params)==null?void 0:w.prompt)&&((A=J.params)==null||delete A.prompt),_i((F=J.params)==null?void 0:F.tag)&&((K=J.params)==null||delete K.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:J}),this.relayer.request(J)}onPublish(r){this.queue.delete(r)}checkQueue(){this.queue.forEach(async r=>{const{topic:i,message:n,opts:o}=r;await this.publish(i,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(mt.connection_stalled);return}this.checkQueue()}),this.relayer.on(mt.message_ack,r=>{this.onPublish(r.id.toString())})}}class wb{constructor(){this.map=new Map,this.set=(r,i)=>{const n=this.get(r);this.exists(r,i)||this.map.set(r,[...n,i])},this.get=r=>this.map.get(r)||[],this.exists=(r,i)=>this.get(r).includes(i),this.delete=(r,i)=>{if(typeof i>"u"){this.map.delete(r);return}if(!this.map.has(r))return;const n=this.get(r);if(!this.exists(r,i))return;const o=n.filter(h=>h!==i);if(!o.length){this.map.delete(r);return}this.map.set(r,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var bb=Object.defineProperty,Eb=Object.defineProperties,xb=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ib=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,fl=(c,r,i)=>r in c?bb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,qs=(c,r)=>{for(var i in r||(r={}))Ib.call(r,i)&&fl(c,i,r[i]);if(ll)for(var i of ll(r))Sb.call(r,i)&&fl(c,i,r[i]);return c},tc=(c,r)=>Eb(c,xb(r));class Pb extends Om{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new wb,this.events=new kt.EventEmitter,this.name=ab,this.version=cb,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=wi,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const h=uc(o),d={topic:n,relay:h};this.pending.set(n,d);const y=await this.rpcSubscribe(n,h);return this.onSubscribe(y,d),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),y}catch(h){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(h),h}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,h)=>{const d=new ne.Watch;d.start(this.pendingSubscriptionWatchLabel);const y=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),o(!0)),d.elapsed(this.pendingSubscriptionWatchLabel)>=ub&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),h(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.clientId=""}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(r,i){let n=!1;try{n=this.getSubscription(r).topic===i}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(r,i){const n=this.topicMap.get(r);await Promise.all(n.map(async o=>await this.unsubscribeById(r,o,i)))}async unsubscribeById(r,i,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}});try{const o=uc(n);await this.rpcUnsubscribe(r,i,o);const h=rr("USER_DISCONNECTED",`${this.name}, ${r}`);await this.onUnsubscribe(r,i,h),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(r,i){const n={method:ro(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await oo(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}return ls(r+this.clientId)}async rpcBatchSubscribe(r){if(!r.length)return;const i=r[0].relay,n={method:ro(i.protocol).batchSubscribe,params:{topics:r.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await oo(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}}rpcUnsubscribe(r,i,n){const o={method:ro(n.protocol).unsubscribe,params:{topic:r,id:i}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(r,i){this.setSubscription(r,tc(qs({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(i=>{this.setSubscription(i.id,qs({},i)),this.pending.delete(i.topic)})}async onUnsubscribe(r,i,n){this.events.removeAllListeners(i),this.hasSubscription(i,r)&&this.deleteSubscription(i,n),await this.relayer.messages.del(r)}async setRelayerSubscriptions(r){await this.relayer.core.storage.setItem(this.storageKey,r)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(r,i){this.subscriptions.has(r)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:r,subscription:i}),this.addSubscription(r,i))}addSubscription(r,i){this.subscriptions.set(r,qs({},i)),this.topicMap.set(i.topic,r),this.events.emit(Vr.created,i)}getSubscription(r){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:r});const i=this.subscriptions.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}deleteSubscription(r,i){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:r,reason:i});const n=this.getSubscription(r);this.subscriptions.delete(r),this.topicMap.delete(n.topic,r),this.events.emit(Vr.deleted,tc(qs({},n),{reason:i}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Vr.sync)}async reset(){if(this.cached.length){const r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i"u"||!r.length)return;if(this.subscriptions.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(r){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(r)}}async batchSubscribe(r){if(!r.length)return;const i=await this.rpcBatchSubscribe(r);ps(i)&&this.onBatchSubscribe(i.map((n,o)=>tc(qs({},r[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mt.connect,async()=>{await this.onConnect()}),this.relayer.on(mt.disconnect,()=>{this.onDisconnect()}),this.events.on(Vr.created,async r=>{const i=Vr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(Vr.deleted,async r=>{const i=Vr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async restartToComplete(){this.restartInProgress&&await new Promise(r=>{const i=setInterval(()=>{this.restartInProgress||(clearInterval(i),r())},this.pollingInterval)})}}var Ab=Object.defineProperty,pl=Object.getOwnPropertySymbols,Cb=Object.prototype.hasOwnProperty,Ob=Object.prototype.propertyIsEnumerable,dl=(c,r,i)=>r in c?Ab(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Rb=(c,r)=>{for(var i in r||(r={}))Cb.call(r,i)&&dl(c,i,r[i]);if(pl)for(var i of pl(r))Ob.call(r,i)&&dl(c,i,r[i]);return c};class Tb extends Am{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new kt.EventEmitter,this.name=eb,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async i=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(i)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=r.core,this.logger=typeof r.logger<"u"&&typeof r.logger!="string"?Re.generateChildLogger(r.logger,this.name):Re.pino(Re.getDefaultLoggerOptions({level:r.logger||Qw})),this.messages=new mb(this.logger,r.core),this.subscriber=new Pb(this,this.logger),this.publisher=new _b(this,this.logger),this.relayUrl=(r==null?void 0:r.relayUrl)||Af,this.projectId=r.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${ul}...`),await this.restartTransport(ul)}this.registerEventListeners(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},sb)}get context(){return Re.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(r,i,n){this.isInitialized(),await this.publisher.publish(r,i,n),await this.recordMessageEvent({topic:r,message:i,publishedAt:Date.now()})}async subscribe(r,i){var n;this.isInitialized();let o=((n=this.subscriber.topicMap.get(r))==null?void 0:n[0])||"";return o||(await Promise.all([new Promise(h=>{this.subscriber.once(Vr.created,d=>{d.topic===r&&h()})}),new Promise(async h=>{o=await this.subscriber.subscribe(r,i),h()})]),o)}async unsubscribe(r,i){this.isInitialized(),await this.subscriber.unsubscribe(r,i)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mt.transport_closed))}async transportOpen(r){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=r||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(i=>{this.initialized||i(),this.subscriber.once(Vr.resubscribed,()=>{i()})}),await Promise.race([new Promise(async(i,n)=>{await oo(this.provider.connect(),5e3,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>n(o)).then(()=>i()).finally(()=>this.removeListener(mt.transport_closed,this.rejectTransportOpen))}),new Promise(i=>this.once(mt.transport_closed,this.rejectTransportOpen))])])}catch(i){this.logger.error(i);const n=i;if(!this.isConnectionStalled(n.message))throw i;this.events.emit(mt.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(r){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=r||this.relayUrl,this.connected&&await Promise.all([new Promise(i=>{this.provider.once(Ms.disconnect,()=>{i()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(r){return this.staleConnectionErrors.some(i=>r.includes(i))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const r=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ei(new v_(P1({sdkVersion:ib,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:r,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(r){const{topic:i,message:n}=r;await this.messages.set(i,n)}async shouldIgnoreMessageEvent(r){const{topic:i,message:n}=r;return await this.subscriber.isSubscribed(i)?this.messages.has(i,n):!0}async onProviderPayload(r){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:r}),Ec(r)){if(!r.method.endsWith(tb))return;const i=r.params,{topic:n,message:o,publishedAt:h}=i.data,d={topic:n,message:o,publishedAt:h};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Rb({type:"event",event:i.id},d)),this.events.emit(i.id,d),await this.acknowledgePayload(r),await this.onMessageEvent(d)}else mo(r)&&this.events.emit(mt.message_ack,r)}async onMessageEvent(r){await this.shouldIgnoreMessageEvent(r)||(this.events.emit(mt.message,r),await this.recordMessageEvent(r))}async acknowledgePayload(r){const i=bc(r.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Ms.payload,r=>this.onProviderPayload(r)),this.provider.on(Ms.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Ms.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ms.error,r=>{this.logger.error(r),this.events.emit(mt.error,r)})}registerEventListeners(){this.events.on(mt.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mt.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},ne.toMiliseconds(rb))}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(r=>{const i=setInterval(()=>{this.connected&&(clearInterval(i),r())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var Nb=Object.defineProperty,gl=Object.getOwnPropertySymbols,Lb=Object.prototype.hasOwnProperty,Db=Object.prototype.propertyIsEnumerable,vl=(c,r,i)=>r in c?Nb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,yl=(c,r)=>{for(var i in r||(r={}))Lb.call(r,i)&&vl(c,i,r[i]);if(gl)for(var i of gl(r))Db.call(r,i)&&vl(c,i,r[i]);return c};class wo extends Cm{constructor(r,i,n,o=wi,h=void 0){super(r,i,n,o),this.core=r,this.logger=i,this.name=n,this.map=new Map,this.version=nb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(d=>{this.getKey&&d!==null&&!_i(d)?this.map.set(this.getKey(d),d):g1(d)?this.map.set(d.id,d):v1(d)&&this.map.set(d.topic,d)}),this.cached=[],this.initialized=!0)},this.set=async(d,y)=>{this.isInitialized(),this.map.has(d)?await this.update(d,y):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:d,value:y}),this.map.set(d,y),await this.persist())},this.get=d=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:d}),this.getData(d)),this.getAll=d=>(this.isInitialized(),d?this.values.filter(y=>Object.keys(d).every(w=>uo(y[w],d[w]))):this.values),this.update=async(d,y)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:d,update:y});const w=yl(yl({},this.getData(d)),y);this.map.set(d,w),await this.persist()},this.delete=async(d,y)=>{this.isInitialized(),this.map.has(d)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:d,reason:y}),this.map.delete(d),await this.persist())},this.logger=Re.generateChildLogger(i,this.name),this.storagePrefix=o,this.getKey=h}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(r){await this.core.storage.setItem(this.storageKey,r)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(r){const i=this.map.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}async persist(){await this.setDataStore(this.values)}async restore(){try{const r=await this.getDataStore();if(typeof r>"u"||!r.length)return;if(this.map.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(r){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Fb{constructor(r,i){this.core=r,this.logger=i,this.name=hb,this.version=lb,this.events=new kt,this.initialized=!1,this.storagePrefix=wi,this.ignoredPayloadTypes=[Ml],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=cc(),o=await this.core.crypto.setSymKey(n),h=Fr(ne.FIVE_MINUTES),d={protocol:Pf},y={topic:o,expiry:h,relay:d,active:!1},w=A1({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:d});return await this.pairings.set(o,y),await this.core.relayer.subscribe(o),this.core.expirer.set(o,h),{topic:o,uri:w}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:h,relay:d}=C1(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const y=Fr(ne.FIVE_MINUTES),w={topic:o,relay:d,expiry:y,active:!1};return await this.pairings.set(o,w),await this.core.crypto.setSymKey(h,o),await this.core.relayer.subscribe(o,{relay:d}),this.core.expirer.set(o,y),n.activatePairing&&await this.activate({topic:o}),w},this.activate=async({topic:n})=>{this.isInitialized();const o=Fr(ne.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const h=await this.sendRequest(o,"wc_pairingPing",{}),{done:d,resolve:y,reject:w}=cs();this.events.once(Ft("pairing_ping",h),({error:A})=>{A?w(A):y()}),await d()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",rr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,h)=>{const d=vo(o,h),y=await this.core.crypto.encode(n,d),w=Us[o].req;return this.core.history.set(n,d),this.core.relayer.publish(n,y,w),d.id},this.sendResult=async(n,o,h)=>{const d=bc(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method].res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.sendError=async(n,o,h)=>{const d=yo(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method]?Us[w.request.method].res:Us.unregistered_method.res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,rr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>mi(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:h}=n,d=h.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingRequest(o,h);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,h);default:return this.onUnknownRpcMethodRequest(o,h)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:h}=n,d=(await this.core.history.get(o,h.id)).request.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingResponse(o,h);default:return this.onUnknownRpcMethodResponse(d)}},this.onPairingPingRequest=async(n,o)=>{const{id:h}=o;try{this.isValidPing({topic:n}),await this.sendResult(h,n,!0),this.events.emit("pairing_ping",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onPairingPingResponse=(n,o)=>{const{id:h}=o;setTimeout(()=>{oi(o)?this.events.emit(Ft("pairing_ping",h),{}):$r(o)&&this.events.emit(Ft("pairing_ping",h),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:h}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:h,method:d}=o;try{if(this.registeredMethods.includes(d))return;const y=rr("WC_METHOD_UNSUPPORTED",d);await this.sendError(h,n,y),this.logger.error(y)}catch(y){await this.sendError(h,n,y),this.logger.error(y)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(rr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!ur(n)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!O1(n.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!ur(n)){const{message:h}=Q("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!ur(n)){const{message:h}=Q("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!us(n,!1)){const{message:o}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(mi(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Q("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.pairings=new wo(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Re.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(i,n);Ec(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.core.history.delete(i,o.id))})}registerExpirerEvents(){this.core.expirer.on(Ar.expired,async r=>{const{topic:i}=Ul(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class $b extends Im{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new kt.EventEmitter,this.name=fb,this.version=pb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,h)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:h}),this.records.has(o.id))return;const d={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:h,expiry:Fr(ne.THIRTY_DAYS)};this.records.set(d.id,d),this.events.emit(Br.created,d)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=$r(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(Br.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(h=>{if(h.topic===n){if(typeof o<"u"&&h.id!==o)return;this.records.delete(h.id),this.events.emit(Br.deleted,h)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const r=[];return this.values.forEach(i=>{if(typeof i.response<"u")return;const n={topic:i.topic,request:vo(i.request.method,i.request.params,i.id),chainId:i.chainId};return r.push(n)}),r}async setJsonRpcRecords(r){await this.core.storage.setItem(this.storageKey,r)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(r){this.isInitialized();const i=this.records.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Br.sync)}async restore(){try{const r=await this.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(this.records.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}}registerEventListeners(){this.events.on(Br.created,r=>{const i=Br.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.updated,r=>{const i=Br.updated;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.deleted,r=>{const i=Br.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(r=>{ne.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.delete(r.topic,r.id))})}catch(r){this.logger.warn(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class jb extends Rm{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new kt.EventEmitter,this.name=db,this.version=gb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const h=this.formatTarget(n),d={target:h,expiry:o};this.expirations.set(h,d),this.checkExpiry(h,d),this.events.emit(Ar.created,{target:h,expiration:d})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),h=this.getExpiration(o);this.expirations.delete(o),this.events.emit(Ar.deleted,{target:o,expiration:h})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(r){if(typeof r=="string")return R1(r);if(typeof r=="number")return T1(r);const{message:i}=Q("UNKNOWN_TYPE",`Target type: ${typeof r}`);throw new Error(i)}async setExpirations(r){await this.core.storage.setItem(this.storageKey,r)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ar.sync)}async restore(){try{const r=await this.getExpirations();if(typeof r>"u"||!r.length)return;if(this.expirations.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(r){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(r)}}getExpiration(r){const i=this.expirations.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}checkExpiry(r,i){const{expiry:n}=i;ne.toMiliseconds(n)-Date.now()<=0&&this.expire(r,i)}expire(r,i){this.expirations.delete(r),this.events.emit(Ar.expired,{target:r,expiration:i})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((r,i)=>this.checkExpiry(i,r))}registerEventListeners(){this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Ar.created,r=>{const i=Ar.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.expired,r=>{const i=Ar.expired;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.deleted,r=>{const i=Ar.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Mb extends Tm{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=ec,this.initialized=!1,this.init=async n=>{N1()||!ql()||(this.verifyUrl=(n==null?void 0:n.verifyUrl)||hl,await this.createIframe())},this.register=async n=>{var o;if(this.initialized||await this.init(),!!this.iframe)try{(o=this.iframe.contentWindow)==null||o.postMessage(n.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${n.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async n=>{var o;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${n.attestationId}`);const h=this.startAbortTimer(ne.FIVE_SECONDS),d=await fetch(`${this.verifyUrl}/attestation/${n.attestationId}`,{signal:this.abortController.signal});return clearTimeout(h),d.status===200?(o=await d.json())==null?void 0:o.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((n,o)=>{if(document.getElementById(ec))return n();const h=document.createElement("iframe");h.setAttribute("id",ec),h.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),h.style.display="none",h.addEventListener("load",()=>{this.initialized=!0,n()}),h.addEventListener("error",d=>{o(d)}),document.body.append(h),this.iframe=h}),new Promise(n=>{setTimeout(()=>n("iframe load timeout"),ne.toMiliseconds(ne.ONE_SECOND/2))})])}catch(n){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(n)}},this.logger=Re.generateChildLogger(i,this.name),this.verifyUrl=hl,this.abortController=new AbortController,this.isDevEnv=L1()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(r){return setTimeout(()=>this.abortController.abort(),ne.toMiliseconds(r))}}var Ub=Object.defineProperty,ml=Object.getOwnPropertySymbols,qb=Object.prototype.hasOwnProperty,zb=Object.prototype.propertyIsEnumerable,_l=(c,r,i)=>r in c?Ub(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,wl=(c,r)=>{for(var i in r||(r={}))qb.call(r,i)&&_l(c,i,r[i]);if(ml)for(var i of ml(r))zb.call(r,i)&&_l(c,i,r[i]);return c};class Ic extends xm{constructor(r){super(r),this.protocol=Sf,this.version=kw,this.name=xc,this.events=new kt.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=r==null?void 0:r.projectId,this.relayUrl=(r==null?void 0:r.relayUrl)||Af;const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Hw.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new ds.HeartBeat,this.crypto=new yb(this,this.logger,r==null?void 0:r.keychain),this.history=new $b(this,this.logger),this.expirer=new jb(this,this.logger),this.storage=r!=null&&r.storage?r.storage:new dm(wl(wl({},Bw),r==null?void 0:r.storageOptions)),this.relayer=new Tb({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Fb(this,this.logger),this.verify=new Mb(this.projectId||"",this.logger)}static async init(r){const i=new Ic(r);await i.initialize();const n=await i.crypto.getClientId();return await i.storage.setItem(ob,n),i}get context(){return Re.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(r){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),this.logger.error(r.message),r}}}const kb=Ic,Cf="wc",Of=2,Rf="client",Sc=`${Cf}@${Of}:${Rf}:`,rc={name:Rf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Hb="WALLETCONNECT_DEEPLINK_CHOICE",Bb="proposal",Tf="Proposal expired",Vb="session",Qn=ne.SEVEN_DAYS,Kb="engine",zs={wc_sessionPropose:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1115}}},ic={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Gb="request",Wb=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Jb=Object.defineProperty,Yb=Object.defineProperties,Xb=Object.getOwnPropertyDescriptors,bl=Object.getOwnPropertySymbols,Zb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,El=(c,r,i)=>r in c?Jb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Pr=(c,r)=>{for(var i in r||(r={}))Zb.call(r,i)&&El(c,i,r[i]);if(bl)for(var i of bl(r))Qb.call(r,i)&&El(c,i,r[i]);return c},sc=(c,r)=>Yb(c,Xb(r));class eE extends Lm{constructor(r){super(r),this.name=Kb,this.events=new kt,this.initialized=!1,this.ignoredPayloadTypes=[Ml],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(zs)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const n=sc(Pr({},i),{requiredNamespaces:i.requiredNamespaces||{},optionalNamespaces:i.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:h,optionalNamespaces:d,sessionProperties:y,relays:w}=n;let A=o,F,K=!1;if(A&&(K=this.client.core.pairing.pairings.get(A).active),!A||!K){const{topic:pe,uri:he}=await this.client.core.pairing.create();A=pe,F=he}const J=await this.client.core.crypto.generateKeyPair(),G=Pr({requiredNamespaces:h,optionalNamespaces:d,relays:w??[{protocol:Pf}],proposer:{publicKey:J,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:j,resolve:V,done:ie}=cs(ne.FIVE_MINUTES,Tf);if(this.events.once(Ft("session_connect"),async({error:pe,session:he})=>{if(pe)j(pe);else if(he){he.self.publicKey=J;const le=sc(Pr({},he),{requiredNamespaces:he.requiredNamespaces,optionalNamespaces:he.optionalNamespaces});await this.client.session.set(he.topic,le),await this.setExpiry(he.topic,he.expiry),A&&await this.client.core.pairing.updateMetadata({topic:A,metadata:he.peer.metadata}),V(le)}}),!A){const{message:pe}=Q("NO_MATCHING_KEY",`connect() pairing topic: ${A}`);throw new Error(pe)}const Ee=await this.sendRequest(A,"wc_sessionPropose",G),ge=Fr(ne.FIVE_MINUTES);return await this.setProposal(Ee,Pr({id:Ee,expiry:ge},G)),{uri:F,approval:ie}},this.pair=async i=>(this.isInitialized(),await this.client.core.pairing.pair(i)),this.approve=async i=>{this.isInitialized(),await this.isValidApprove(i);const{id:n,relayProtocol:o,namespaces:h,sessionProperties:d}=i,y=this.client.proposal.get(n);let{pairingTopic:w,proposer:A,requiredNamespaces:F,optionalNamespaces:K}=y;w=w||"",io(F)||(F=F1(h,"approve()"));const J=await this.client.core.crypto.generateKeyPair(),G=A.publicKey,j=await this.client.core.crypto.generateSharedKey(J,G);w&&n&&(await this.client.core.pairing.updateMetadata({topic:w,metadata:A.metadata}),await this.sendResult(n,w,{relay:{protocol:o??"irn"},responderPublicKey:J}),await this.client.proposal.delete(n,rr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:w}));const V=Pr({relay:{protocol:o??"irn"},namespaces:h,requiredNamespaces:F,optionalNamespaces:K,pairingTopic:w,controller:{publicKey:J,metadata:this.client.metadata},expiry:Fr(Qn)},d&&{sessionProperties:d});await this.client.core.relayer.subscribe(j),await this.sendRequest(j,"wc_sessionSettle",V);const ie=sc(Pr({},V),{topic:j,pairingTopic:w,acknowledged:!1,self:V.controller,peer:{publicKey:A.publicKey,metadata:A.metadata},controller:J});return await this.client.session.set(j,ie),await this.setExpiry(j,Fr(Qn)),{topic:j,acknowledged:()=>new Promise(Ee=>setTimeout(()=>Ee(this.client.session.get(j)),500))}},this.reject=async i=>{this.isInitialized(),await this.isValidReject(i);const{id:n,reason:o}=i,{pairingTopic:h}=this.client.proposal.get(n);h&&(await this.sendError(n,h,o),await this.client.proposal.delete(n,rr("USER_DISCONNECTED")))},this.update=async i=>{this.isInitialized(),await this.isValidUpdate(i);const{topic:n,namespaces:o}=i,h=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:d,resolve:y,reject:w}=cs();return this.events.once(Ft("session_update",h),({error:A})=>{A?w(A):y()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:d}},this.extend=async i=>{this.isInitialized(),await this.isValidExtend(i);const{topic:n}=i,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:h,resolve:d,reject:y}=cs();return this.events.once(Ft("session_extend",o),({error:w})=>{w?y(w):d()}),await this.setExpiry(n,Fr(Qn)),{acknowledged:h}},this.request=async i=>{this.isInitialized(),await this.isValidRequest(i);const{chainId:n,request:o,topic:h,expiry:d}=i,y=await this.sendRequest(h,"wc_sessionRequest",{request:o,chainId:n},d),{done:w,resolve:A,reject:F}=cs(d);this.events.once(Ft("session_request",y),({error:J,result:G})=>{J?F(J):A(G)}),this.client.events.emit("session_request_sent",{topic:h,request:o,chainId:n,id:y});const K=await this.client.core.storage.getItem(Hb);return $1({id:y,topic:h,wcDeepLink:K}),await w()},this.respond=async i=>{this.isInitialized(),await this.isValidRespond(i);const{topic:n,response:o}=i,{id:h}=o;oi(o)?await this.sendResult(h,n,o.result):$r(o)&&await this.sendError(h,n,o.error),this.deletePendingSessionRequest(i.response.id,{message:"fulfilled",code:0})},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:h,resolve:d,reject:y}=cs();this.events.once(Ft("session_ping",o),({error:w})=>{w?y(w):d()}),await h()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async i=>{this.isInitialized(),await this.isValidEmit(i);const{topic:n,event:o,chainId:h}=i;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:h})},this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=wc().toString();let h;const d=y=>{(y==null?void 0:y.id.toString())===o&&(this.client.core.relayer.events.removeListener(mt.message_ack,d),h())};await Promise.all([new Promise(y=>{h=y,this.client.core.relayer.on(mt.message_ack,d)}),this.sendRequest(n,"wc_sessionDelete",rr("USER_DISCONNECTED"),void 0,o)]),await this.deleteSession(n)}else await this.client.core.pairing.disconnect({topic:n})},this.find=i=>(this.isInitialized(),this.client.session.getAll().filter(n=>j1(n,i))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async i=>{if(i.pairingTopic)try{const n=this.client.core.pairing.pairings.get(i.pairingTopic),o=this.client.core.pairing.pairings.getAll().filter(h=>{var d,y;return((d=h.peerMetadata)==null?void 0:d.url)&&((y=h.peerMetadata)==null?void 0:y.url)===i.peer.metadata.url&&h.topic&&h.topic!==n.topic});if(o.length===0)return;this.client.logger.info(`Cleaning up ${o.length} duplicate pairing(s)`),await Promise.all(o.map(h=>this.client.core.pairing.disconnect({topic:h.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(i,n)=>{const{self:o}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),this.client.session.delete(i,rr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),n||this.client.core.expirer.del(i)},this.deleteProposal=async(i,n)=>{await Promise.all([this.client.proposal.delete(i,rr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(i)])},this.deletePendingSessionRequest=async(i,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(i,n),o?Promise.resolve():this.client.core.expirer.del(i)])},this.setExpiry=async(i,n)=>{this.client.session.keys.includes(i)&&await this.client.session.update(i,{expiry:n}),this.client.core.expirer.set(i,n)},this.setProposal=async(i,n)=>{await this.client.proposal.set(i,n),this.client.core.expirer.set(i,n.expiry)},this.setPendingSessionRequest=async i=>{const n=zs.wc_sessionRequest.req.ttl,{id:o,topic:h,params:d}=i;await this.client.pendingRequest.set(o,{id:o,topic:h,params:d}),n&&this.client.core.expirer.set(o,Fr(n))},this.sendRequest=async(i,n,o,h,d)=>{const y=vo(n,o);if(ql()&&Wb.includes(n)){const F=ls(JSON.stringify(y));await this.client.core.verify.register({attestationId:F})}const w=await this.client.core.crypto.encode(i,y),A=zs[n].req;return h&&(A.ttl=h),d&&(A.id=d),this.client.core.history.set(i,y),this.client.core.relayer.publish(i,w,A),y.id},this.sendResult=async(i,n,o)=>{const h=bc(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.sendError=async(i,n,o)=>{const h=yo(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.cleanup=async()=>{const i=[],n=[];this.client.session.getAll().forEach(o=>{mi(o.expiry)&&i.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{mi(o.expiry)&&n.push(o.id)}),await Promise.all([...i.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=i=>{const{topic:n,payload:o}=i,h=o.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${h}`)}},this.onRelayEventResponse=async i=>{const{topic:n,payload:o}=i,h=(await this.client.core.history.get(n,o.id)).request.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${h}`)}},this.onRelayEventUnknownPayload=i=>{const{topic:n}=i,{message:o}=Q("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(o)},this.onSessionProposeRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidConnect(Pr({},n.params));const d=Fr(ne.FIVE_MINUTES),y=Pr({id:h,pairingTopic:i,expiry:d},o);await this.setProposal(h,y);const w=ls(JSON.stringify(n)),A=await this.getVerifyContext(w,y.proposer.metadata);this.client.events.emit("session_proposal",{id:h,params:y,verifyContext:A})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionProposeResponse=async(i,n)=>{const{id:o}=n;if(oi(n)){const{result:h}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:h});const d=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:d});const y=d.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:y});const w=h.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:w});const A=await this.client.core.crypto.generateSharedKey(y,w);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:A});const F=await this.client.core.relayer.subscribe(A);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:F}),await this.client.core.pairing.activate({topic:i})}else $r(n)&&(await this.client.proposal.delete(o,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidSessionSettleRequest(h);const{relay:d,controller:y,expiry:w,namespaces:A,requiredNamespaces:F,optionalNamespaces:K,sessionProperties:J,pairingTopic:G}=n.params,j=Pr({topic:i,relay:d,expiry:w,namespaces:A,acknowledged:!0,pairingTopic:G,requiredNamespaces:F,optionalNamespaces:K,controller:y.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:y.publicKey,metadata:y.metadata}},J&&{sessionProperties:J});await this.sendResult(n.id,i,!0),this.events.emit(Ft("session_connect"),{session:j}),this.cleanupDuplicatePairings(j)}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionSettleResponse=async(i,n)=>{const{id:o}=n;oi(n)?(await this.client.session.update(i,{acknowledged:!0}),this.events.emit(Ft("session_approve",o),{})):$r(n)&&(await this.client.session.delete(i,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidUpdate(Pr({topic:i},o)),await this.client.session.update(i,{namespaces:o.namespaces}),await this.sendResult(h,i,!0),this.client.events.emit("session_update",{id:h,topic:i,params:o})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionUpdateResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_update",o),{}):$r(n)&&this.events.emit(Ft("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(i,n)=>{const{id:o}=n;try{this.isValidExtend({topic:i}),await this.setExpiry(i,Fr(Qn)),await this.sendResult(o,i,!0),this.client.events.emit("session_extend",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionExtendResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_extend",o),{}):$r(n)&&this.events.emit(Ft("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(i,n)=>{const{id:o}=n;try{this.isValidPing({topic:i}),await this.sendResult(o,i,!0),this.client.events.emit("session_ping",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionPingResponse=(i,n)=>{const{id:o}=n;setTimeout(()=>{oi(n)?this.events.emit(Ft("session_ping",o),{}):$r(n)&&this.events.emit(Ft("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(i,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:i,reason:n.params}),await Promise.all([new Promise(h=>{this.client.core.relayer.once(mt.publish,async()=>{h(await this.deleteSession(i))})}),this.sendResult(o,i,!0)]),this.client.events.emit("session_delete",{id:o,topic:i})}catch(h){this.client.logger.error(h)}},this.onSessionRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidRequest(Pr({topic:i},h)),await this.setPendingSessionRequest({id:o,topic:i,params:h});const d=ls(JSON.stringify(n)),y=this.client.session.get(i),w=await this.getVerifyContext(d,y.peer.metadata);this.client.events.emit("session_request",{id:o,topic:i,params:h,verifyContext:w})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionRequestResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_request",o),{result:n.result}):$r(n)&&this.events.emit(Ft("session_request",o),{error:n.error})},this.onSessionEventRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidEmit(Pr({topic:i},h)),this.client.events.emit("session_event",{id:o,topic:i,params:h})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.isValidConnect=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(i)}`);throw new Error(w)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:h,sessionProperties:d,relays:y}=i;if(_i(n)||await this.isValidPairingTopic(n),!M1(y,!0)){const{message:w}=Q("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(o)&&io(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!_i(h)&&io(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),_i(d)||this.validateSessionProps(d,"sessionProperties")},this.validateNamespaces=(i,n)=>{const o=U1(i,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!ur(i))throw new Error(Q("MISSING_OR_INVALID",`approve() params: ${i}`).message);const{id:n,namespaces:o,relayProtocol:h,sessionProperties:d}=i;await this.isValidProposalId(n);const y=this.client.proposal.get(n),w=Va(o,"approve()");if(w)throw new Error(w.message);const A=Oh(y.requiredNamespaces,o,"approve()");if(A)throw new Error(A.message);if(!us(h,!0)){const{message:F}=Q("MISSING_OR_INVALID",`approve() relayProtocol: ${h}`);throw new Error(F)}_i(d)||this.validateSessionProps(d,"sessionProperties")},this.isValidReject=async i=>{if(!ur(i)){const{message:h}=Q("MISSING_OR_INVALID",`reject() params: ${i}`);throw new Error(h)}const{id:n,reason:o}=i;if(await this.isValidProposalId(n),!q1(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!ur(i)){const{message:A}=Q("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${i}`);throw new Error(A)}const{relay:n,controller:o,namespaces:h,expiry:d}=i;if(!z1(n)){const{message:A}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(A)}const y=k1(o,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Va(h,"onSessionSettleRequest()");if(w)throw new Error(w.message);if(mi(d)){const{message:A}=Q("EXPIRED","onSessionSettleRequest()");throw new Error(A)}},this.isValidUpdate=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`update() params: ${i}`);throw new Error(w)}const{topic:n,namespaces:o}=i;await this.isValidSessionTopic(n);const h=this.client.session.get(n),d=Va(o,"update()");if(d)throw new Error(d.message);const y=Oh(h.requiredNamespaces,o,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`extend() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionTopic(n)},this.isValidRequest=async i=>{if(!ur(i)){const{message:w}=Q("MISSING_OR_INVALID",`request() params: ${i}`);throw new Error(w)}const{topic:n,request:o,chainId:h,expiry:d}=i;await this.isValidSessionTopic(n);const{namespaces:y}=this.client.session.get(n);if(!Rh(y,h)){const{message:w}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(w)}if(!H1(o)){const{message:w}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(w)}if(!B1(y,h,o.method)){const{message:w}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(w)}if(d&&!V1(d,ic)){const{message:w}=Q("MISSING_OR_INVALID",`request() expiry: ${d}. Expiry must be a number (in seconds) between ${ic.min} and ${ic.max}`);throw new Error(w)}},this.isValidRespond=async i=>{if(!ur(i)){const{message:h}=Q("MISSING_OR_INVALID",`respond() params: ${i}`);throw new Error(h)}const{topic:n,response:o}=i;if(await this.isValidSessionTopic(n),!K1(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async i=>{if(!ur(i)){const{message:y}=Q("MISSING_OR_INVALID",`emit() params: ${i}`);throw new Error(y)}const{topic:n,event:o,chainId:h}=i;await this.isValidSessionTopic(n);const{namespaces:d}=this.client.session.get(n);if(!Rh(d,h)){const{message:y}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(y)}if(!G1(o)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}if(!W1(d,h,o.name)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}},this.isValidDisconnect=async i=>{if(!ur(i)){const{message:o}=Q("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(i,n)=>{const o={verified:{verifyUrl:n.verifyUrl||"",validation:"UNKNOWN",origin:n.url||""}};try{const h=await this.client.core.verify.resolve({attestationId:i,verifyUrl:n.verifyUrl});h&&(o.verified.origin=h,o.verified.validation=h===n.url?"VALID":"INVALID")}catch(h){this.client.logger.error(h)}return this.client.logger.info(`Verify context: ${JSON.stringify(o)}`),o},this.validateSessionProps=(i,n)=>{Object.values(i).forEach(o=>{if(!us(o,!1)){const{message:h}=Q("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(h)}})}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.client.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(i,n);Ec(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.client.core.history.delete(i,o.id)):this.onRelayEventUnknownPayload({topic:i,payload:o})})}registerExpirerEvents(){this.client.core.expirer.on(Ar.expired,async r=>{const{topic:i,id:n}=Ul(r.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Q("EXPIRED"),!0);i?this.client.session.keys.includes(i)&&(await this.deleteSession(i,!0),this.client.events.emit("session_expire",{topic:i})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.client.core.pairing.pairings.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.core.pairing.pairings.get(r).expiry)){const{message:i}=Q("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}}async isValidSessionTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`session topic should be a string: ${r}`);throw new Error(i)}if(!this.client.session.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`session topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.session.get(r).expiry)){await this.deleteSession(r);const{message:i}=Q("EXPIRED",`session topic: ${r}`);throw new Error(i)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if(us(r,!1)){const{message:i}=Q("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${r}`);throw new Error(i)}else{const{message:i}=Q("MISSING_OR_INVALID",`session or pairing topic should be a string: ${r}`);throw new Error(i)}}async isValidProposalId(r){if(!J1(r)){const{message:i}=Q("MISSING_OR_INVALID",`proposal id should be a number: ${r}`);throw new Error(i)}if(!this.client.proposal.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`proposal id doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.proposal.get(r).expiry)){await this.deleteProposal(r);const{message:i}=Q("EXPIRED",`proposal id: ${r}`);throw new Error(i)}}}class tE extends wo{constructor(r,i){super(r,i,Bb,Sc),this.core=r,this.logger=i}}class rE extends wo{constructor(r,i){super(r,i,Vb,Sc),this.core=r,this.logger=i}}class iE extends wo{constructor(r,i){super(r,i,Gb,Sc,n=>n.id),this.core=r,this.logger=i}}let sE=class Nf extends Nm{constructor(r){super(r),this.protocol=Cf,this.version=Of,this.name=rc.name,this.events=new kt.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(r==null?void 0:r.name)||rc.name,this.metadata=(r==null?void 0:r.metadata)||D1();const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||rc.logger}));this.core=(r==null?void 0:r.core)||new kb(r),this.logger=Re.generateChildLogger(i,this.name),this.session=new rE(this.core,this.logger),this.proposal=new tE(this.core,this.logger),this.pendingRequest=new iE(this.core,this.logger),this.engine=new eE(this)}static async init(r){const i=new Nf(r);return await i.initialize(),i}get context(){return Re.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(r){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(r.message),r}}};var ho={},nE={get exports(){return ho},set exports(c){ho=c}};(function(c,r){var i=typeof self<"u"?self:hr,n=function(){function h(){this.fetch=!1,this.DOMException=i.DOMException}return h.prototype=i,new h}();(function(h){(function(d){var y={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function w(v){return v&&DataView.prototype.isPrototypeOf(v)}if(y.arrayBuffer)var A=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(v){return v&&A.indexOf(Object.prototype.toString.call(v))>-1};function K(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function J(v){return typeof v!="string"&&(v=String(v)),v}function G(v){var E={next:function(){var X=v.shift();return{done:X===void 0,value:X}}};return y.iterable&&(E[Symbol.iterator]=function(){return E}),E}function j(v){this.map={},v instanceof j?v.forEach(function(E,X){this.append(X,E)},this):Array.isArray(v)?v.forEach(function(E){this.append(E[0],E[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(E){this.append(E,v[E])},this)}j.prototype.append=function(v,E){v=K(v),E=J(E);var X=this.map[v];this.map[v]=X?X+", "+E:E},j.prototype.delete=function(v){delete this.map[K(v)]},j.prototype.get=function(v){return v=K(v),this.has(v)?this.map[v]:null},j.prototype.has=function(v){return this.map.hasOwnProperty(K(v))},j.prototype.set=function(v,E){this.map[K(v)]=J(E)},j.prototype.forEach=function(v,E){for(var X in this.map)this.map.hasOwnProperty(X)&&v.call(E,this.map[X],X,this)},j.prototype.keys=function(){var v=[];return this.forEach(function(E,X){v.push(X)}),G(v)},j.prototype.values=function(){var v=[];return this.forEach(function(E){v.push(E)}),G(v)},j.prototype.entries=function(){var v=[];return this.forEach(function(E,X){v.push([X,E])}),G(v)},y.iterable&&(j.prototype[Symbol.iterator]=j.prototype.entries);function V(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function ie(v){return new Promise(function(E,X){v.onload=function(){E(v.result)},v.onerror=function(){X(v.error)}})}function Ee(v){var E=new FileReader,X=ie(E);return E.readAsArrayBuffer(v),X}function ge(v){var E=new FileReader,X=ie(E);return E.readAsText(v),X}function pe(v){for(var E=new Uint8Array(v),X=new Array(E.length),ce=0;ce-1?E:v}function B(v,E){E=E||{};var X=E.body;if(v instanceof B){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,E.headers||(this.headers=new j(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!X&&v._bodyInit!=null&&(X=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new j(E.headers)),this.method=M(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function ve(v){var E=new FormData;return v.trim().split("&").forEach(function(X){if(X){var ce=X.split("="),k=ce.shift().replace(/\+/g," "),U=ce.join("=").replace(/\+/g," ");E.append(decodeURIComponent(k),decodeURIComponent(U))}}),E}function re(v){var E=new j,X=v.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(ce){var k=ce.split(":"),U=k.shift().trim();if(U){var z=k.join(":").trim();E.append(U,z)}}),E}le.call(B.prototype);function ue(v,E){E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in E?E.statusText:"OK",this.headers=new j(E.headers),this.url=E.url||"",this._initBody(v)}le.call(ue.prototype),ue.prototype.clone=function(){return new ue(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new j(this.headers),url:this.url})},ue.error=function(){var v=new ue(null,{status:0,statusText:""});return v.type="error",v};var Te=[301,302,303,307,308];ue.redirect=function(v,E){if(Te.indexOf(E)===-1)throw new RangeError("Invalid status code");return new ue(null,{status:E,headers:{location:v}})},d.DOMException=h.DOMException;try{new d.DOMException}catch{d.DOMException=function(E,X){this.message=E,this.name=X;var ce=Error(E);this.stack=ce.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function qe(v,E){return new Promise(function(X,ce){var k=new B(v,E);if(k.signal&&k.signal.aborted)return ce(new d.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function z(){U.abort()}U.onload=function(){var H={status:U.status,statusText:U.statusText,headers:re(U.getAllResponseHeaders()||"")};H.url="responseURL"in U?U.responseURL:H.headers.get("X-Request-URL");var Ye="response"in U?U.response:U.responseText;X(new ue(Ye,H))},U.onerror=function(){ce(new TypeError("Network request failed"))},U.ontimeout=function(){ce(new TypeError("Network request failed"))},U.onabort=function(){ce(new d.DOMException("Aborted","AbortError"))},U.open(k.method,k.url,!0),k.credentials==="include"?U.withCredentials=!0:k.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&y.blob&&(U.responseType="blob"),k.headers.forEach(function(H,Ye){U.setRequestHeader(Ye,H)}),k.signal&&(k.signal.addEventListener("abort",z),U.onreadystatechange=function(){U.readyState===4&&k.signal.removeEventListener("abort",z)}),U.send(typeof k._bodyInit>"u"?null:k._bodyInit)})}return qe.polyfill=!0,h.fetch||(h.fetch=qe,h.Headers=j,h.Request=B,h.Response=ue),d.Headers=j,d.Request=B,d.Response=ue,d.fetch=qe,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;r=o.fetch,r.default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,c.exports=r})(nE,ho);const xl=Y1(ho),oE={Accept:"application/json","Content-Type":"application/json"},aE="POST",Il={headers:oE,method:aE},Sl=10;class zi{constructor(r,i=!1){if(this.url=r,this.disableProviderPing=i,this.events=new kt.EventEmitter,this.isAvailable=!1,this.registering=!1,!Zh(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);this.url=r,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(r,i){this.isAvailable||await this.register();try{const n=Vs(r),h=await(await xl(this.url,Object.assign(Object.assign({},Il),{body:n}))).json();this.onPayload({data:h})}catch(n){this.onError(r.id,n)}}async register(r=this.url){if(!Zh(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));n()})})}this.url=r,this.registering=!0;try{if(!this.disableProviderPing){const i=Vs({id:1,jsonrpc:"2.0",method:"test",params:[]});await xl(r,Object.assign(Object.assign({},Il),{body:i}))}this.onOpen()}catch(i){const n=this.parseError(i);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Sl&&this.events.setMaxListeners(Sl)}}const Pl="error",cE="wss://relay.walletconnect.com",uE="wc",hE="universal_provider",Al=`${uE}@2:${hE}:`,lE="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fc={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -24,4 +24,4 @@ __p += '`),Oe&&(q+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+q+`return __p -}`;var be=Ih(function(){return Fe(p,te+"return "+q).apply(i,m)});if(be.source=q,Da(be))throw be;return be}function _0(e){return je(e).toLowerCase()}function w0(e){return je(e).toUpperCase()}function b0(e,t,s){if(e=je(e),e&&(s||t===i))return Lc(e);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Tr(t),p=Dc(a,l),m=Fc(a,l)+1;return vi(a,p,m).join("")}function E0(e,t,s){if(e=je(e),e&&(s||t===i))return e.slice(0,jc(e)+1);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Fc(a,Tr(t))+1;return vi(a,0,l).join("")}function x0(e,t,s){if(e=je(e),e&&(s||t===i))return e.replace(gt,"");if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Dc(a,Tr(t));return vi(a,l).join("")}function I0(e,t){var s=re,a=ue;if(ut(t)){var l="separator"in t?t.separator:l;s="length"in t?_e(t.length):s,a="omission"in t?pr(t.omission):a}e=je(e);var p=e.length;if(Yi(e)){var m=Tr(e);p=m.length}if(s>=p)return e;var _=s-Xi(a);if(_<1)return a;var S=m?vi(m,0,_).join(""):e.slice(0,_);if(l===i)return S+a;if(m&&(_+=S.length-_),Fa(l)){if(e.slice(_).search(l)){var L,D=S;for(l.global||(l=Xo(l.source,je(yr.exec(l))+"g")),l.lastIndex=0;L=l.exec(D);)var q=L.index;S=S.slice(0,q===i?_:q)}}else if(e.indexOf(pr(l),_)!=_){var W=S.lastIndexOf(l);W>-1&&(S=S.slice(0,W))}return S+a}function S0(e){return e=je(e),e&<.test(e)?e.replace(ai,ep):e}var P0=ss(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ma=Su("toUpperCase");function xh(e,t,s){return e=je(e),t=s?i:t,t===i?Jf(e)?ip(e):qf(e):e.match(t)||[]}var Ih=Ie(function(e,t){try{return qt(e,i,t)}catch(s){return Da(s)?s:new de(s)}}),A0=Qr(function(e,t){return _r(t,function(s){s=Hr(s),Xr(e,s,Na(e[s],e))}),e});function C0(e){var t=e==null?0:e.length,s=se();return e=t?nt(e,function(a){if(typeof a[1]!="function")throw new wr(d);return[s(a[0]),a[1]]}):[],Ie(function(a){for(var l=-1;++lk)return[];var s=H,a=Gt(e,H);t=se(t),e-=H;for(var l=Wo(a,t);++s0||t<0)?new Ae(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=_e(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},Ae.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ae.prototype.toArray=function(){return this.take(H)},zr(Ae.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),l=f[a?"take"+(t=="last"?"Right":""):t],p=a||/^find/.test(t);l&&(f.prototype[t]=function(){var m=this.__wrapped__,_=a?[1]:arguments,S=m instanceof Ae,L=_[0],D=S||me(m),q=function(Se){var Oe=l.apply(f,hi([Se],_));return a&&W?Oe[0]:Oe};D&&s&&typeof L=="function"&&L.length!=1&&(S=D=!1);var W=this.__chain__,te=!!this.__actions__.length,oe=p&&!W,be=S&&!te;if(!p&&D){m=be?m:new Ae(this);var ae=e.apply(m,_);return ae.__actions__.push({func:Vn,args:[q],thisArg:i}),new br(ae,W)}return oe&&be?e.apply(this,_):(ae=this.thru(q),oe?a?ae.value()[0]:ae.value():ae)})}),_r(["pop","push","shift","sort","splice","unshift"],function(e){var t=yn[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(a&&!this.__chain__){var p=this.value();return t.apply(me(p)?p:[],l)}return this[s](function(m){return t.apply(me(m)?m:[],l)})}}),zr(Ae.prototype,function(e,t){var s=f[t];if(s){var a=s.name+"";Ue.call(ts,a)||(ts[a]=[]),ts[a].push({name:t,func:s})}}),ts[Mn(i,Ee).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Sp,Ae.prototype.reverse=Pp,Ae.prototype.value=Ap,f.prototype.at=rv,f.prototype.chain=iv,f.prototype.commit=sv,f.prototype.next=nv,f.prototype.plant=av,f.prototype.reverse=cv,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=uv,f.prototype.first=f.prototype.head,ws&&(f.prototype[ws]=ov),f},Zi=sp();bt?((bt.exports=Zi)._=Zi,We._=Zi):Ce._=Zi}).call(ks)})(fc,fc.exports);var fE=Object.defineProperty,pE=Object.defineProperties,dE=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,Ol=(c,r,i)=>r in c?fE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,eo=(c,r)=>{for(var i in r||(r={}))gE.call(r,i)&&Ol(c,i,r[i]);if(Cl)for(var i of Cl(r))vE.call(r,i)&&Ol(c,i,r[i]);return c},yE=(c,r)=>pE(c,dE(r));function Cr(c,r,i){let n;const o=pc(c);return r.rpcMap&&(n=r.rpcMap[o]),n||(n=`${lE}?chainId=eip155:${o}&projectId=${i}`),n}function pc(c){return c.includes("eip155")?Number(c.split(":")[1]):Number(c)}function Lf(c){return c.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function mE(c,r){const i=Object.keys(r.namespaces).filter(o=>o.includes(c));if(!i.length)return[];const n=[];return i.forEach(o=>{const h=r.namespaces[o].accounts;n.push(...h)}),n}function _E(c={},r={}){const i=Rl(c),n=Rl(r);return fc.exports.merge(i,n)}function Rl(c){var r,i,n,o;const h={};if(!io(c))return h;for(const[d,y]of Object.entries(c)){const w=Hl(d)?[d]:y.chains,A=y.methods||[],F=y.events||[],K=y.rpcMap||{},J=so(d);h[J]=yE(eo(eo({},h[J]),y),{chains:Ka(w,(r=h[J])==null?void 0:r.chains),methods:Ka(A,(i=h[J])==null?void 0:i.methods),events:Ka(F,(n=h[J])==null?void 0:n.events),rpcMap:eo(eo({},K),(o=h[J])==null?void 0:o.rpcMap)})}return h}function wE(c){return c.includes(":")?c.split(":")[2]:c}function bE(c){const r={};for(const[i,n]of Object.entries(c)){const o=n.methods||[],h=n.events||[],d=n.accounts||[],y=Hl(i)?[i]:n.chains?n.chains:Lf(n.accounts);r[i]={chains:y,methods:o,events:h,accounts:d}}return r}const Df={},It=c=>Df[c],nc=(c,r)=>{Df[c]=r};class EE{constructor(r){this.name="polkadot",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class xE{constructor(r){this.name="eip155",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(r){switch(r.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(r);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(r.request.method)?await this.client.request(r):this.getHttpProvider().request(r.request)}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}setDefaultChain(r,i){const n=pc(r);if(!this.httpProviders[n]){const o=i||Cr(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,o)}this.chainId=n,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}createHttpProvider(r,i){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;const o=pc(i);r[o]=this.createHttpProvider(o,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const r=this.chainId,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}async handleSwitchChain(r){var i,n;let o=r.request.params?(i=r.request.params[0])==null?void 0:i.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const h=parseInt(o,16);if(this.isChainApproved(h))this.setDefaultChain(`${h}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:r.topic,request:{method:r.request.method,params:[{chainId:o}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${h}`);else throw new Error(`Failed to switch to chain 'eip155:${h}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(r){return this.namespace.chains.includes(`${this.name}:${r}`)}}class IE{constructor(r){this.name="solana",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class SE{constructor(r){this.name="cosmos",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class PE{constructor(r){this.name="cip34",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||this.getCardanoRPCUrl(r);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{const n=this.getCardanoRPCUrl(i);r[i]=this.createHttpProvider(i,n)}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}getCardanoRPCUrl(r){const i=this.namespace.rpcMap;if(i)return i[r]}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||this.getCardanoRPCUrl(r);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class AE{constructor(r){this.name="elrond",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class CE{constructor(r){this.name="multiversx",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}var OE=Object.defineProperty,RE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,Nl=(c,r,i)=>r in c?OE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,to=(c,r)=>{for(var i in r||(r={}))NE.call(r,i)&&Nl(c,i,r[i]);if(Tl)for(var i of Tl(r))LE.call(r,i)&&Nl(c,i,r[i]);return c},oc=(c,r)=>RE(c,TE(r));class Pc{constructor(r){this.events=new kt,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=r,this.logger=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Pl})),this.disableProviderPing=(r==null?void 0:r.disableProviderPing)||!1}static async init(r){const i=new Pc(r);return await i.initialize(),i}async request(r,i){const[n,o]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:to({},r),chainId:`${n}:${o}`,topic:this.session.topic})}sendAsync(r,i,n){this.request(r,n).then(o=>i(null,o)).catch(o=>i(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var r;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(r=this.session)==null?void 0:r.topic,reason:rr("USER_DISCONNECTED")}),await this.cleanup()}async connect(r){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(r),await this.cleanupPendingPairings(),!r.skipPairing)return await this.pair(r.pairingTopic)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}removeListener(r,i){this.events.removeListener(r,i)}off(r,i){this.events.off(r,i)}get isWalletConnect(){return!0}async pair(r){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:o}=await this.client.connect({pairingTopic:r,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await o().then(h=>{this.session=h,this.namespaces||(this.namespaces=bE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Tf)throw h;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(r,i){try{if(!this.session)return;const[n,o]=this.validateChain(r);this.getProvider(n).setDefaultChain(o,i)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(r={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(ps(i)){for(const n of i)r.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const r=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[r]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await sE.init({logger:this.providerOpts.logger||Pl,relayUrl:this.providerOpts.relayUrl||cE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const r=[...new Set(Object.keys(this.session.namespaces).map(i=>so(i)))];nc("client",this.client),nc("events",this.events),nc("disableProviderPing",this.disableProviderPing),r.forEach(i=>{if(!this.session)return;const n=mE(i,this.session),o=Lf(n),h=_E(this.namespaces,this.optionalNamespaces),d=oc(to({},h[i]),{accounts:n,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new xE({namespace:d});break;case"solana":this.rpcProviders[i]=new IE({namespace:d});break;case"cosmos":this.rpcProviders[i]=new SE({namespace:d});break;case"polkadot":this.rpcProviders[i]=new EE({namespace:d});break;case"cip34":this.rpcProviders[i]=new PE({namespace:d});break;case"elrond":this.rpcProviders[i]=new AE({namespace:d});break;case"multiversx":this.rpcProviders[i]=new CE({namespace:d});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{const{params:i}=r,{event:n}=i;if(n.name==="accountsChanged"){const o=n.data;o&&ps(o)&&this.events.emit("accountsChanged",o.map(wE))}else n.name==="chainChanged"?this.onChainChanged(i.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:i})=>{var n;const{namespaces:o}=i,h=(n=this.client)==null?void 0:n.session.get(r);this.session=oc(to({},h),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:i})}),this.client.on("session_delete",async r=>{await this.cleanup(),this.events.emit("session_delete",r),this.events.emit("disconnect",oc(to({},rr("USER_DISCONNECTED")),{data:r.topic}))}),this.on(xi.DEFAULT_CHAIN_CHANGED,r=>{this.onChainChanged(r,!0)})}getProvider(r){if(!this.rpcProviders[r])throw new Error(`Provider not found: ${r}`);return this.rpcProviders[r]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(r=>{var i;this.getProvider(r).updateNamespace((i=this.session)==null?void 0:i.namespaces[r])})}setNamespaces(r){const{namespaces:i,optionalNamespaces:n,sessionProperties:o}=r;i&&Object.keys(i).length&&(this.namespaces=i),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=o,this.persist("namespaces",i),this.persist("optionalNamespaces",n)}validateChain(r){const[i,n]=(r==null?void 0:r.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,n];if(i&&!Object.keys(this.namespaces||{}).map(d=>so(d)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&n)return[i,n];const o=so(Object.keys(this.namespaces)[0]),h=this.rpcProviders[o].getDefaultChain();return[o,h]}async requestAccounts(){const[r]=this.validateChain();return await this.getProvider(r).requestAccounts()}onChainChanged(r,i=!1){var n;if(!this.namespaces)return;const[o,h]=this.validateChain(r);i||this.getProvider(o).setDefaultChain(h),((n=this.namespaces[o])!=null?n:this.namespaces[`${o}:${h}`]).defaultChain=h,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",h)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(r,i){this.client.core.storage.setItem(`${Al}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${Al}/${r}`)}}const DE=Pc,FE="wc",$E="ethereum_provider",jE=`${FE}@2:${$E}:`,ME="https://rpc.walletconnect.com/v1/",dc=["eth_sendTransaction","personal_sign"],UE=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],gc=["chainChanged","accountsChanged"],qE=["message","disconnect","connect"];var zE=Object.defineProperty,kE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,Dl=(c,r,i)=>r in c?zE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Hs=(c,r)=>{for(var i in r||(r={}))BE.call(r,i)&&Dl(c,i,r[i]);if(Ll)for(var i of Ll(r))VE.call(r,i)&&Dl(c,i,r[i]);return c},Fl=(c,r)=>kE(c,HE(r));function lo(c){return Number(c[0].split(":")[1])}function ac(c){return`0x${c.toString(16)}`}function KE(c){const{chains:r,optionalChains:i,methods:n,optionalMethods:o,events:h,optionalEvents:d,rpcMap:y}=c;if(!ps(r))throw new Error("Invalid chains");const w={chains:r,methods:n||dc,events:h||gc,rpcMap:Hs({},r.length?{[lo(r)]:y[lo(r)]}:{})},A=h==null?void 0:h.filter(G=>!gc.includes(G)),F=n==null?void 0:n.filter(G=>!dc.includes(G));if(!i&&!d&&!o&&!(A!=null&&A.length)&&!(F!=null&&F.length))return{required:r.length?w:void 0};const K=(A==null?void 0:A.length)&&(F==null?void 0:F.length)||!i,J={chains:[...new Set(K?w.chains.concat(i||[]):i)],methods:[...new Set(w.methods.concat(o!=null&&o.length?o:UE))],events:[...new Set(w.events.concat(d||qE))],rpcMap:y};return{required:r.length?w:void 0,optional:i.length?J:void 0}}class Ac{constructor(){this.events=new kt.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=jE,this.on=(r,i)=>(this.events.on(r,i),this),this.once=(r,i)=>(this.events.once(r,i),this),this.removeListener=(r,i)=>(this.events.removeListener(r,i),this),this.off=(r,i)=>(this.events.off(r,i),this),this.parseAccount=r=>this.isCompatibleChainId(r)?this.parseAccountId(r).address:r,this.signer={},this.rpc={}}static async init(r){const i=new Ac;return await i.initialize(r),i}async request(r){return await this.signer.request(r,this.formatChainId(this.chainId))}sendAsync(r,i){this.signer.sendAsync(r,i,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(r){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(r);const{required:i,optional:n}=KE(this.rpc);try{const o=await new Promise(async(d,y)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(A=>{!A.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Fl(Hs({namespaces:Hs({},i&&{[this.namespace]:i})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:r==null?void 0:r.pairingTopic})).then(A=>{d(A)}).catch(A=>{y(new Error(A.message))})});if(!o)return;this.setChainIds(this.rpc.chains);const h=X1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:ac(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",r=>{const{params:i}=r,{event:n}=i;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",r)}),this.signer.on("chainChanged",r=>{const i=parseInt(r);this.chainId=i,this.events.emit("chainChanged",ac(this.chainId)),this.persist()}),this.signer.on("session_update",r=>{this.events.emit("session_update",r)}),this.signer.on("session_delete",r=>{this.reset(),this.events.emit("session_delete",r),this.events.emit("disconnect",Fl(Hs({},rr("USER_DISCONNECTED")),{data:r.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",r=>{var i,n;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(n=this.modal)==null||n.openModal({uri:r})),this.events.emit("display_uri",r)})}switchEthereumChain(r){this.request({method:"wallet_switchEthereumChain",params:[{chainId:r.toString(16)}]})}isCompatibleChainId(r){return typeof r=="string"?r.startsWith(`${this.namespace}:`):!1}formatChainId(r){return`${this.namespace}:${r}`}parseChainId(r){return Number(r.split(":")[1])}setChainIds(r){const i=r.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",ac(this.chainId)),this.persist())}setChainId(r){if(this.isCompatibleChainId(r)){const i=this.parseChainId(r);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(r){const[i,n,o]=r.split(":");return{chainId:`${i}:${n}`,address:o}}setAccounts(r){this.accounts=r.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(r){var i,n;const o=(i=r==null?void 0:r.chains)!=null?i:[],h=(n=r==null?void 0:r.optionalChains)!=null?n:[],d=o.concat(h);if(!d.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=o.length?(r==null?void 0:r.methods)||dc:[],w=o.length?(r==null?void 0:r.events)||gc:[],A=(r==null?void 0:r.optionalMethods)||[],F=(r==null?void 0:r.optionalEvents)||[],K=(r==null?void 0:r.rpcMap)||this.buildRpcMap(d,r.projectId),J=(r==null?void 0:r.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(G=>this.formatChainId(G)),optionalChains:h.map(G=>this.formatChainId(G)),methods:y,events:w,optionalMethods:A,optionalEvents:F,rpcMap:K,showQrModal:!!(r!=null&&r.showQrModal),qrModalOptions:J,projectId:r.projectId,metadata:r.metadata}}buildRpcMap(r,i){const n={};return r.forEach(o=>{n[o]=this.getRpcUrl(o,i)}),n}async initialize(r){if(this.rpc=this.getRpcConfig(r),this.chainId=this.rpc.chains.length?lo(this.rpc.chains):lo(this.rpc.optionalChains),this.signer=await DE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:r.disableProviderPing,relayUrl:r.relayUrl,storageOptions:r.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:n}=await Z1(()=>import("./index-123c87d4.js").then(o=>o.a),["./index-123c87d4.js","./index-aa62d2a2.js","./index-fddf5a6e.css"],import.meta.url);i=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Hs({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(r){if(!r)return;const{chains:i,optionalChains:n,rpcMap:o}=r;i&&ps(i)&&(this.rpc.chains=i.map(h=>this.formatChainId(h)),i.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)})),n&&ps(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(h=>this.formatChainId(h)),n.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)}))}getRpcUrl(r,i){var n;return((n=this.rpc.rpcMap)==null?void 0:n[r])||`${ME}?chainId=eip155:${r}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const r=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${r}`]?this.session.namespaces[`${this.namespace}:${r}`]:this.session.namespaces[this.namespace];this.setChainIds(r?[this.formatChainId(r)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(r){return typeof r=="string"||r instanceof String?[this.parseAccount(r)]:r.map(i=>this.parseAccount(i))}}const rx=Ac;export{rx as EthereumProvider,qE as OPTIONAL_EVENTS,UE as OPTIONAL_METHODS,gc as REQUIRED_EVENTS,dc as REQUIRED_METHODS,Ac as default}; +}`;var be=Ih(function(){return Fe(p,te+"return "+q).apply(i,m)});if(be.source=q,Da(be))throw be;return be}function _0(e){return je(e).toLowerCase()}function w0(e){return je(e).toUpperCase()}function b0(e,t,s){if(e=je(e),e&&(s||t===i))return Lc(e);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Tr(t),p=Dc(a,l),m=Fc(a,l)+1;return vi(a,p,m).join("")}function E0(e,t,s){if(e=je(e),e&&(s||t===i))return e.slice(0,jc(e)+1);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Fc(a,Tr(t))+1;return vi(a,0,l).join("")}function x0(e,t,s){if(e=je(e),e&&(s||t===i))return e.replace(gt,"");if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Dc(a,Tr(t));return vi(a,l).join("")}function I0(e,t){var s=re,a=ue;if(ut(t)){var l="separator"in t?t.separator:l;s="length"in t?_e(t.length):s,a="omission"in t?pr(t.omission):a}e=je(e);var p=e.length;if(Yi(e)){var m=Tr(e);p=m.length}if(s>=p)return e;var _=s-Xi(a);if(_<1)return a;var S=m?vi(m,0,_).join(""):e.slice(0,_);if(l===i)return S+a;if(m&&(_+=S.length-_),Fa(l)){if(e.slice(_).search(l)){var L,D=S;for(l.global||(l=Xo(l.source,je(yr.exec(l))+"g")),l.lastIndex=0;L=l.exec(D);)var q=L.index;S=S.slice(0,q===i?_:q)}}else if(e.indexOf(pr(l),_)!=_){var W=S.lastIndexOf(l);W>-1&&(S=S.slice(0,W))}return S+a}function S0(e){return e=je(e),e&<.test(e)?e.replace(ai,ep):e}var P0=ss(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ma=Su("toUpperCase");function xh(e,t,s){return e=je(e),t=s?i:t,t===i?Jf(e)?ip(e):qf(e):e.match(t)||[]}var Ih=Ie(function(e,t){try{return qt(e,i,t)}catch(s){return Da(s)?s:new de(s)}}),A0=Qr(function(e,t){return _r(t,function(s){s=Hr(s),Xr(e,s,Na(e[s],e))}),e});function C0(e){var t=e==null?0:e.length,s=se();return e=t?nt(e,function(a){if(typeof a[1]!="function")throw new wr(d);return[s(a[0]),a[1]]}):[],Ie(function(a){for(var l=-1;++lk)return[];var s=H,a=Gt(e,H);t=se(t),e-=H;for(var l=Wo(a,t);++s0||t<0)?new Ae(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=_e(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},Ae.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ae.prototype.toArray=function(){return this.take(H)},zr(Ae.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),l=f[a?"take"+(t=="last"?"Right":""):t],p=a||/^find/.test(t);l&&(f.prototype[t]=function(){var m=this.__wrapped__,_=a?[1]:arguments,S=m instanceof Ae,L=_[0],D=S||me(m),q=function(Se){var Oe=l.apply(f,hi([Se],_));return a&&W?Oe[0]:Oe};D&&s&&typeof L=="function"&&L.length!=1&&(S=D=!1);var W=this.__chain__,te=!!this.__actions__.length,oe=p&&!W,be=S&&!te;if(!p&&D){m=be?m:new Ae(this);var ae=e.apply(m,_);return ae.__actions__.push({func:Vn,args:[q],thisArg:i}),new br(ae,W)}return oe&&be?e.apply(this,_):(ae=this.thru(q),oe?a?ae.value()[0]:ae.value():ae)})}),_r(["pop","push","shift","sort","splice","unshift"],function(e){var t=yn[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(a&&!this.__chain__){var p=this.value();return t.apply(me(p)?p:[],l)}return this[s](function(m){return t.apply(me(m)?m:[],l)})}}),zr(Ae.prototype,function(e,t){var s=f[t];if(s){var a=s.name+"";Ue.call(ts,a)||(ts[a]=[]),ts[a].push({name:t,func:s})}}),ts[Mn(i,Ee).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Sp,Ae.prototype.reverse=Pp,Ae.prototype.value=Ap,f.prototype.at=rv,f.prototype.chain=iv,f.prototype.commit=sv,f.prototype.next=nv,f.prototype.plant=av,f.prototype.reverse=cv,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=uv,f.prototype.first=f.prototype.head,ws&&(f.prototype[ws]=ov),f},Zi=sp();bt?((bt.exports=Zi)._=Zi,We._=Zi):Ce._=Zi}).call(ks)})(fc,fc.exports);var fE=Object.defineProperty,pE=Object.defineProperties,dE=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,Ol=(c,r,i)=>r in c?fE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,eo=(c,r)=>{for(var i in r||(r={}))gE.call(r,i)&&Ol(c,i,r[i]);if(Cl)for(var i of Cl(r))vE.call(r,i)&&Ol(c,i,r[i]);return c},yE=(c,r)=>pE(c,dE(r));function Cr(c,r,i){let n;const o=pc(c);return r.rpcMap&&(n=r.rpcMap[o]),n||(n=`${lE}?chainId=eip155:${o}&projectId=${i}`),n}function pc(c){return c.includes("eip155")?Number(c.split(":")[1]):Number(c)}function Lf(c){return c.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function mE(c,r){const i=Object.keys(r.namespaces).filter(o=>o.includes(c));if(!i.length)return[];const n=[];return i.forEach(o=>{const h=r.namespaces[o].accounts;n.push(...h)}),n}function _E(c={},r={}){const i=Rl(c),n=Rl(r);return fc.exports.merge(i,n)}function Rl(c){var r,i,n,o;const h={};if(!io(c))return h;for(const[d,y]of Object.entries(c)){const w=Hl(d)?[d]:y.chains,A=y.methods||[],F=y.events||[],K=y.rpcMap||{},J=so(d);h[J]=yE(eo(eo({},h[J]),y),{chains:Ka(w,(r=h[J])==null?void 0:r.chains),methods:Ka(A,(i=h[J])==null?void 0:i.methods),events:Ka(F,(n=h[J])==null?void 0:n.events),rpcMap:eo(eo({},K),(o=h[J])==null?void 0:o.rpcMap)})}return h}function wE(c){return c.includes(":")?c.split(":")[2]:c}function bE(c){const r={};for(const[i,n]of Object.entries(c)){const o=n.methods||[],h=n.events||[],d=n.accounts||[],y=Hl(i)?[i]:n.chains?n.chains:Lf(n.accounts);r[i]={chains:y,methods:o,events:h,accounts:d}}return r}const Df={},It=c=>Df[c],nc=(c,r)=>{Df[c]=r};class EE{constructor(r){this.name="polkadot",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class xE{constructor(r){this.name="eip155",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(r){switch(r.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(r);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(r.request.method)?await this.client.request(r):this.getHttpProvider().request(r.request)}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}setDefaultChain(r,i){const n=pc(r);if(!this.httpProviders[n]){const o=i||Cr(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,o)}this.chainId=n,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}createHttpProvider(r,i){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;const o=pc(i);r[o]=this.createHttpProvider(o,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const r=this.chainId,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}async handleSwitchChain(r){var i,n;let o=r.request.params?(i=r.request.params[0])==null?void 0:i.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const h=parseInt(o,16);if(this.isChainApproved(h))this.setDefaultChain(`${h}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:r.topic,request:{method:r.request.method,params:[{chainId:o}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${h}`);else throw new Error(`Failed to switch to chain 'eip155:${h}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(r){return this.namespace.chains.includes(`${this.name}:${r}`)}}class IE{constructor(r){this.name="solana",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class SE{constructor(r){this.name="cosmos",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class PE{constructor(r){this.name="cip34",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||this.getCardanoRPCUrl(r);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{const n=this.getCardanoRPCUrl(i);r[i]=this.createHttpProvider(i,n)}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}getCardanoRPCUrl(r){const i=this.namespace.rpcMap;if(i)return i[r]}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||this.getCardanoRPCUrl(r);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class AE{constructor(r){this.name="elrond",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class CE{constructor(r){this.name="multiversx",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}var OE=Object.defineProperty,RE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,Nl=(c,r,i)=>r in c?OE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,to=(c,r)=>{for(var i in r||(r={}))NE.call(r,i)&&Nl(c,i,r[i]);if(Tl)for(var i of Tl(r))LE.call(r,i)&&Nl(c,i,r[i]);return c},oc=(c,r)=>RE(c,TE(r));class Pc{constructor(r){this.events=new kt,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=r,this.logger=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Pl})),this.disableProviderPing=(r==null?void 0:r.disableProviderPing)||!1}static async init(r){const i=new Pc(r);return await i.initialize(),i}async request(r,i){const[n,o]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:to({},r),chainId:`${n}:${o}`,topic:this.session.topic})}sendAsync(r,i,n){this.request(r,n).then(o=>i(null,o)).catch(o=>i(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var r;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(r=this.session)==null?void 0:r.topic,reason:rr("USER_DISCONNECTED")}),await this.cleanup()}async connect(r){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(r),await this.cleanupPendingPairings(),!r.skipPairing)return await this.pair(r.pairingTopic)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}removeListener(r,i){this.events.removeListener(r,i)}off(r,i){this.events.off(r,i)}get isWalletConnect(){return!0}async pair(r){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:o}=await this.client.connect({pairingTopic:r,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await o().then(h=>{this.session=h,this.namespaces||(this.namespaces=bE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Tf)throw h;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(r,i){try{if(!this.session)return;const[n,o]=this.validateChain(r);this.getProvider(n).setDefaultChain(o,i)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(r={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(ps(i)){for(const n of i)r.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const r=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[r]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await sE.init({logger:this.providerOpts.logger||Pl,relayUrl:this.providerOpts.relayUrl||cE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const r=[...new Set(Object.keys(this.session.namespaces).map(i=>so(i)))];nc("client",this.client),nc("events",this.events),nc("disableProviderPing",this.disableProviderPing),r.forEach(i=>{if(!this.session)return;const n=mE(i,this.session),o=Lf(n),h=_E(this.namespaces,this.optionalNamespaces),d=oc(to({},h[i]),{accounts:n,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new xE({namespace:d});break;case"solana":this.rpcProviders[i]=new IE({namespace:d});break;case"cosmos":this.rpcProviders[i]=new SE({namespace:d});break;case"polkadot":this.rpcProviders[i]=new EE({namespace:d});break;case"cip34":this.rpcProviders[i]=new PE({namespace:d});break;case"elrond":this.rpcProviders[i]=new AE({namespace:d});break;case"multiversx":this.rpcProviders[i]=new CE({namespace:d});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{const{params:i}=r,{event:n}=i;if(n.name==="accountsChanged"){const o=n.data;o&&ps(o)&&this.events.emit("accountsChanged",o.map(wE))}else n.name==="chainChanged"?this.onChainChanged(i.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:i})=>{var n;const{namespaces:o}=i,h=(n=this.client)==null?void 0:n.session.get(r);this.session=oc(to({},h),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:i})}),this.client.on("session_delete",async r=>{await this.cleanup(),this.events.emit("session_delete",r),this.events.emit("disconnect",oc(to({},rr("USER_DISCONNECTED")),{data:r.topic}))}),this.on(xi.DEFAULT_CHAIN_CHANGED,r=>{this.onChainChanged(r,!0)})}getProvider(r){if(!this.rpcProviders[r])throw new Error(`Provider not found: ${r}`);return this.rpcProviders[r]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(r=>{var i;this.getProvider(r).updateNamespace((i=this.session)==null?void 0:i.namespaces[r])})}setNamespaces(r){const{namespaces:i,optionalNamespaces:n,sessionProperties:o}=r;i&&Object.keys(i).length&&(this.namespaces=i),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=o,this.persist("namespaces",i),this.persist("optionalNamespaces",n)}validateChain(r){const[i,n]=(r==null?void 0:r.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,n];if(i&&!Object.keys(this.namespaces||{}).map(d=>so(d)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&n)return[i,n];const o=so(Object.keys(this.namespaces)[0]),h=this.rpcProviders[o].getDefaultChain();return[o,h]}async requestAccounts(){const[r]=this.validateChain();return await this.getProvider(r).requestAccounts()}onChainChanged(r,i=!1){var n;if(!this.namespaces)return;const[o,h]=this.validateChain(r);i||this.getProvider(o).setDefaultChain(h),((n=this.namespaces[o])!=null?n:this.namespaces[`${o}:${h}`]).defaultChain=h,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",h)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(r,i){this.client.core.storage.setItem(`${Al}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${Al}/${r}`)}}const DE=Pc,FE="wc",$E="ethereum_provider",jE=`${FE}@2:${$E}:`,ME="https://rpc.walletconnect.com/v1/",dc=["eth_sendTransaction","personal_sign"],UE=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],gc=["chainChanged","accountsChanged"],qE=["message","disconnect","connect"];var zE=Object.defineProperty,kE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,Dl=(c,r,i)=>r in c?zE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Hs=(c,r)=>{for(var i in r||(r={}))BE.call(r,i)&&Dl(c,i,r[i]);if(Ll)for(var i of Ll(r))VE.call(r,i)&&Dl(c,i,r[i]);return c},Fl=(c,r)=>kE(c,HE(r));function lo(c){return Number(c[0].split(":")[1])}function ac(c){return`0x${c.toString(16)}`}function KE(c){const{chains:r,optionalChains:i,methods:n,optionalMethods:o,events:h,optionalEvents:d,rpcMap:y}=c;if(!ps(r))throw new Error("Invalid chains");const w={chains:r,methods:n||dc,events:h||gc,rpcMap:Hs({},r.length?{[lo(r)]:y[lo(r)]}:{})},A=h==null?void 0:h.filter(G=>!gc.includes(G)),F=n==null?void 0:n.filter(G=>!dc.includes(G));if(!i&&!d&&!o&&!(A!=null&&A.length)&&!(F!=null&&F.length))return{required:r.length?w:void 0};const K=(A==null?void 0:A.length)&&(F==null?void 0:F.length)||!i,J={chains:[...new Set(K?w.chains.concat(i||[]):i)],methods:[...new Set(w.methods.concat(o!=null&&o.length?o:UE))],events:[...new Set(w.events.concat(d||qE))],rpcMap:y};return{required:r.length?w:void 0,optional:i.length?J:void 0}}class Ac{constructor(){this.events=new kt.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=jE,this.on=(r,i)=>(this.events.on(r,i),this),this.once=(r,i)=>(this.events.once(r,i),this),this.removeListener=(r,i)=>(this.events.removeListener(r,i),this),this.off=(r,i)=>(this.events.off(r,i),this),this.parseAccount=r=>this.isCompatibleChainId(r)?this.parseAccountId(r).address:r,this.signer={},this.rpc={}}static async init(r){const i=new Ac;return await i.initialize(r),i}async request(r){return await this.signer.request(r,this.formatChainId(this.chainId))}sendAsync(r,i){this.signer.sendAsync(r,i,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(r){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(r);const{required:i,optional:n}=KE(this.rpc);try{const o=await new Promise(async(d,y)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(A=>{!A.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Fl(Hs({namespaces:Hs({},i&&{[this.namespace]:i})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:r==null?void 0:r.pairingTopic})).then(A=>{d(A)}).catch(A=>{y(new Error(A.message))})});if(!o)return;this.setChainIds(this.rpc.chains);const h=X1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:ac(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",r=>{const{params:i}=r,{event:n}=i;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",r)}),this.signer.on("chainChanged",r=>{const i=parseInt(r);this.chainId=i,this.events.emit("chainChanged",ac(this.chainId)),this.persist()}),this.signer.on("session_update",r=>{this.events.emit("session_update",r)}),this.signer.on("session_delete",r=>{this.reset(),this.events.emit("session_delete",r),this.events.emit("disconnect",Fl(Hs({},rr("USER_DISCONNECTED")),{data:r.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",r=>{var i,n;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(n=this.modal)==null||n.openModal({uri:r})),this.events.emit("display_uri",r)})}switchEthereumChain(r){this.request({method:"wallet_switchEthereumChain",params:[{chainId:r.toString(16)}]})}isCompatibleChainId(r){return typeof r=="string"?r.startsWith(`${this.namespace}:`):!1}formatChainId(r){return`${this.namespace}:${r}`}parseChainId(r){return Number(r.split(":")[1])}setChainIds(r){const i=r.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",ac(this.chainId)),this.persist())}setChainId(r){if(this.isCompatibleChainId(r)){const i=this.parseChainId(r);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(r){const[i,n,o]=r.split(":");return{chainId:`${i}:${n}`,address:o}}setAccounts(r){this.accounts=r.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(r){var i,n;const o=(i=r==null?void 0:r.chains)!=null?i:[],h=(n=r==null?void 0:r.optionalChains)!=null?n:[],d=o.concat(h);if(!d.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=o.length?(r==null?void 0:r.methods)||dc:[],w=o.length?(r==null?void 0:r.events)||gc:[],A=(r==null?void 0:r.optionalMethods)||[],F=(r==null?void 0:r.optionalEvents)||[],K=(r==null?void 0:r.rpcMap)||this.buildRpcMap(d,r.projectId),J=(r==null?void 0:r.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(G=>this.formatChainId(G)),optionalChains:h.map(G=>this.formatChainId(G)),methods:y,events:w,optionalMethods:A,optionalEvents:F,rpcMap:K,showQrModal:!!(r!=null&&r.showQrModal),qrModalOptions:J,projectId:r.projectId,metadata:r.metadata}}buildRpcMap(r,i){const n={};return r.forEach(o=>{n[o]=this.getRpcUrl(o,i)}),n}async initialize(r){if(this.rpc=this.getRpcConfig(r),this.chainId=this.rpc.chains.length?lo(this.rpc.chains):lo(this.rpc.optionalChains),this.signer=await DE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:r.disableProviderPing,relayUrl:r.relayUrl,storageOptions:r.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:n}=await Z1(()=>import("./index-4139a9f6.js").then(o=>o.a),["./index-4139a9f6.js","./index-d18dd62c.js","./index-fddf5a6e.css"],import.meta.url);i=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Hs({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(r){if(!r)return;const{chains:i,optionalChains:n,rpcMap:o}=r;i&&ps(i)&&(this.rpc.chains=i.map(h=>this.formatChainId(h)),i.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)})),n&&ps(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(h=>this.formatChainId(h)),n.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)}))}getRpcUrl(r,i){var n;return((n=this.rpc.rpcMap)==null?void 0:n[r])||`${ME}?chainId=eip155:${r}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const r=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${r}`]?this.session.namespaces[`${this.namespace}:${r}`]:this.session.namespaces[this.namespace];this.setChainIds(r?[this.formatChainId(r)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(r){return typeof r=="string"||r instanceof String?[this.parseAccount(r)]:r.map(i=>this.parseAccount(i))}}const rx=Ac;export{rx as EthereumProvider,qE as OPTIONAL_EVENTS,UE as OPTIONAL_METHODS,gc as REQUIRED_EVENTS,dc as REQUIRED_METHODS,Ac as default}; diff --git a/index.html b/index.html index 8032c47b..9fd905a3 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence Kit Demo - +