43 lines
141 KiB
JavaScript
43 lines
141 KiB
JavaScript
(()=>{var Va=Object.create;var kr=Object.defineProperty;var Ha=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var Ga=Object.getPrototypeOf,Ka=Object.prototype.hasOwnProperty;var at=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ya=(e,t)=>{for(var r in t)kr(e,r,{get:t[r],enumerable:!0})},Ja=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wa(t))!Ka.call(e,i)&&i!==r&&kr(e,i,{get:()=>t[i],enumerable:!(o=Ha(t,i))||o.enumerable});return e};var Se=(e,t,r)=>(r=e!=null?Va(Ga(e)):{},Ja(t||!e||!e.__esModule?kr(r,"default",{value:e,enumerable:!0}):r,e));var m=at(()=>{});var y=at(()=>{(function(){try{var e=typeof globalThis<"u"||typeof globalThis<"u"||typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"26.10.9.1"}}catch{}})()});var x={};Ya(x,{_debugEnd:()=>fi,_debugProcess:()=>li,_events:()=>Ri,_eventsCount:()=>Pi,_exiting:()=>Vo,_fatalExceptions:()=>si,_getActiveHandles:()=>Ko,_getActiveRequests:()=>Go,_kill:()=>Jo,_linkedBinding:()=>Fo,_maxListeners:()=>Oi,_preload_modules:()=>xi,_rawDebug:()=>qo,_startProfilerIdleNotifier:()=>di,_stopProfilerIdleNotifier:()=>pi,_tickCallback:()=>ci,abort:()=>gi,addListener:()=>Ai,allowedNodeEnvironmentFlags:()=>ni,arch:()=>Ro,argv:()=>Io,argv0:()=>Si,assert:()=>oi,binding:()=>Bo,browser:()=>zo,chdir:()=>No,config:()=>Ho,cpuUsage:()=>Xt,cwd:()=>ko,debugPort:()=>Ei,default:()=>Ni,dlopen:()=>Wo,domain:()=>$o,emit:()=>Di,emitWarning:()=>Do,env:()=>Ao,execArgv:()=>Co,execPath:()=>wi,exit:()=>ti,features:()=>ii,hasUncaughtExceptionCaptureCallback:()=>ui,hrtime:()=>Zt,kill:()=>ei,listeners:()=>ki,memoryUsage:()=>Xo,moduleLoadList:()=>Qo,nextTick:()=>To,off:()=>Ci,on:()=>He,once:()=>Ii,openStdin:()=>ri,pid:()=>vi,platform:()=>Po,ppid:()=>bi,prependListener:()=>Bi,prependOnceListener:()=>Ui,reallyExit:()=>Yo,release:()=>Lo,removeAllListeners:()=>ji,removeListener:()=>Mi,resourceUsage:()=>Zo,setSourceMapsEnabled:()=>Ti,setUncaughtExceptionCaptureCallback:()=>ai,stderr:()=>mi,stdin:()=>yi,stdout:()=>hi,title:()=>Oo,umask:()=>Uo,uptime:()=>_i,version:()=>Mo,versions:()=>jo});function zr(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function Za(){!yt||!ut||(yt=!1,ut.length?Ve=ut.concat(Ve):Jt=-1,Ve.length&&xo())}function xo(){if(!yt){var e=setTimeout(Za,0);yt=!0;for(var t=Ve.length;t;){for(ut=Ve,Ve=[];++Jt<t;)ut&&ut[Jt].run();Jt=-1,t=Ve.length}ut=null,yt=!1,clearTimeout(e)}}function To(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ve.push(new _o(e,t)),Ve.length===1&&!yt&&setTimeout(xo,0)}function _o(e,t){this.fun=e,this.array=t}function ye(){}function Fo(e){zr("_linkedBinding")}function Wo(e){zr("dlopen")}function Go(){return[]}function Ko(){return[]}function oi(e,t){if(!e)throw new Error(t||"assertion error")}function ui(){return!1}function _i(){return Xe.now()/1e3}function Zt(e){var t=Math.floor((Date.now()-Xe.now())*.001),r=Xe.now()*.001,o=Math.floor(r)+t,i=Math.floor(r%1*1e9);return e&&(o=o-e[0],i=i-e[1],i<0&&(o--,i+=Lr)),[o,i]}function He(){return Ni}function ki(e){return[]}var Ve,yt,ut,Jt,Oo,Ro,Po,Ao,Io,Co,Mo,jo,Do,Bo,Uo,ko,No,Lo,zo,qo,Qo,$o,Vo,Ho,Yo,Jo,Xt,Zo,Xo,ei,ti,ri,ni,ii,si,ai,ci,li,fi,di,pi,hi,mi,yi,gi,vi,bi,wi,Ei,Si,xi,Ti,Xe,Nr,Lr,Oi,Ri,Pi,Ai,Ii,Ci,Mi,ji,Di,Bi,Ui,Ni,Li=at(()=>{m();v();g();y();Ve=[],yt=!1,Jt=-1;_o.prototype.run=function(){this.fun.apply(null,this.array)};Oo="browser",Ro="x64",Po="browser",Ao={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Io=["/usr/bin/node"],Co=[],Mo="v16.8.0",jo={},Do=function(e,t){console.warn((t?t+": ":"")+e)},Bo=function(e){zr("binding")},Uo=function(e){return 0},ko=function(){return"/"},No=function(e){},Lo={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};zo=!0,qo=ye,Qo=[];$o={},Vo=!1,Ho={};Yo=ye,Jo=ye,Xt=function(){return{}},Zo=Xt,Xo=Xt,ei=ye,ti=ye,ri=ye,ni={};ii={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},si=ye,ai=ye;ci=ye,li=ye,fi=ye,di=ye,pi=ye,hi=void 0,mi=void 0,yi=void 0,gi=ye,vi=2,bi=1,wi="/bin/usr/node",Ei=9229,Si="node",xi=[],Ti=ye,Xe={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Xe.now===void 0&&(Nr=Date.now(),Xe.timing&&Xe.timing.navigationStart&&(Nr=Xe.timing.navigationStart),Xe.now=()=>Date.now()-Nr);Lr=1e9;Zt.bigint=function(e){var t=Zt(e);return typeof BigInt>"u"?t[0]*Lr+t[1]:BigInt(t[0]*Lr)+BigInt(t[1])};Oi=10,Ri={},Pi=0;Ai=He,Ii=He,Ci=He,Mi=He,ji=He,Di=ye,Bi=He,Ui=He;Ni={version:Mo,versions:jo,arch:Ro,platform:Po,browser:zo,release:Lo,_rawDebug:qo,moduleLoadList:Qo,binding:Bo,_linkedBinding:Fo,_events:Ri,_eventsCount:Pi,_maxListeners:Oi,on:He,addListener:Ai,once:Ii,off:Ci,removeListener:Mi,removeAllListeners:ji,emit:Di,prependListener:Bi,prependOnceListener:Ui,listeners:ki,domain:$o,_exiting:Vo,config:Ho,dlopen:Wo,uptime:_i,_getActiveRequests:Go,_getActiveHandles:Ko,reallyExit:Yo,_kill:Jo,cpuUsage:Xt,resourceUsage:Zo,memoryUsage:Xo,kill:ei,exit:ti,openStdin:ri,allowedNodeEnvironmentFlags:ni,assert:oi,features:ii,_fatalExceptions:si,setUncaughtExceptionCaptureCallback:ai,hasUncaughtExceptionCaptureCallback:ui,emitWarning:Do,nextTick:To,_tickCallback:ci,_debugProcess:li,_debugEnd:fi,_startProfilerIdleNotifier:di,_stopProfilerIdleNotifier:pi,stdout:hi,stdin:yi,stderr:mi,abort:gi,umask:Uo,chdir:No,cwd:ko,env:Ao,title:Oo,argv:Io,execArgv:Co,pid:vi,ppid:bi,execPath:wi,debugPort:Ei,hrtime:Zt,argv0:Si,_preload_modules:xi,setSourceMapsEnabled:Ti}});var g=at(()=>{Li()});function Xa(){if(zi)return Mt;zi=!0,Mt.byteLength=l,Mt.toByteArray=w,Mt.fromByteArray=C;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,u=o.length;i<u;++i)e[i]=o[i],t[o.charCodeAt(i)]=i;t[45]=62,t[95]=63;function s(P){var R=P.length;if(R%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var j=P.indexOf("=");j===-1&&(j=R);var N=j===R?0:4-j%4;return[j,N]}function l(P){var R=s(P),j=R[0],N=R[1];return(j+N)*3/4-N}function d(P,R,j){return(R+j)*3/4-j}function w(P){var R,j=s(P),N=j[0],J=j[1],Z=new r(d(P,N,J)),ue=0,pe=J>0?N-4:N,me;for(me=0;me<pe;me+=4)R=t[P.charCodeAt(me)]<<18|t[P.charCodeAt(me+1)]<<12|t[P.charCodeAt(me+2)]<<6|t[P.charCodeAt(me+3)],Z[ue++]=R>>16&255,Z[ue++]=R>>8&255,Z[ue++]=R&255;return J===2&&(R=t[P.charCodeAt(me)]<<2|t[P.charCodeAt(me+1)]>>4,Z[ue++]=R&255),J===1&&(R=t[P.charCodeAt(me)]<<10|t[P.charCodeAt(me+1)]<<4|t[P.charCodeAt(me+2)]>>2,Z[ue++]=R>>8&255,Z[ue++]=R&255),Z}function S(P){return e[P>>18&63]+e[P>>12&63]+e[P>>6&63]+e[P&63]}function A(P,R,j){for(var N,J=[],Z=R;Z<j;Z+=3)N=(P[Z]<<16&16711680)+(P[Z+1]<<8&65280)+(P[Z+2]&255),J.push(S(N));return J.join("")}function C(P){for(var R,j=P.length,N=j%3,J=[],Z=16383,ue=0,pe=j-N;ue<pe;ue+=Z)J.push(A(P,ue,ue+Z>pe?pe:ue+Z));return N===1?(R=P[j-1],J.push(e[R>>2]+e[R<<4&63]+"==")):N===2&&(R=(P[j-2]<<8)+P[j-1],J.push(e[R>>10]+e[R>>4&63]+e[R<<2&63]+"=")),J.join("")}return Mt}function eu(){if(qi)return er;qi=!0;return er.read=function(e,t,r,o,i){var u,s,l=i*8-o-1,d=(1<<l)-1,w=d>>1,S=-7,A=r?i-1:0,C=r?-1:1,P=e[t+A];for(A+=C,u=P&(1<<-S)-1,P>>=-S,S+=l;S>0;u=u*256+e[t+A],A+=C,S-=8);for(s=u&(1<<-S)-1,u>>=-S,S+=o;S>0;s=s*256+e[t+A],A+=C,S-=8);if(u===0)u=1-w;else{if(u===d)return s?NaN:(P?-1:1)*(1/0);s=s+Math.pow(2,o),u=u-w}return(P?-1:1)*s*Math.pow(2,u-o)},er.write=function(e,t,r,o,i,u){var s,l,d,w=u*8-i-1,S=(1<<w)-1,A=S>>1,C=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=o?0:u-1,R=o?1:-1,j=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=S):(s=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+A>=1?t+=C/d:t+=C*Math.pow(2,1-A),t*d>=2&&(s++,d/=2),s+A>=S?(l=0,s=S):s+A>=1?(l=(t*d-1)*Math.pow(2,i),s=s+A):(l=t*Math.pow(2,A-1)*Math.pow(2,i),s=0));i>=8;e[r+P]=l&255,P+=R,l/=256,i-=8);for(s=s<<i|l,w+=i;w>0;e[r+P]=s&255,P+=R,s/=256,w-=8);e[r+P-R]|=j*128},er}function Fi(){if(Qi)return ct;Qi=!0;let e=Xa(),t=eu(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ct.Buffer=s,ct.SlowBuffer=J,ct.INSPECT_MAX_BYTES=50;let o=2147483647;ct.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!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 i(){try{let c=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(c,n),c.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 u(c){if(c>o)throw new RangeError('The value "'+c+'" is invalid for option "size"');let n=new Uint8Array(c);return Object.setPrototypeOf(n,s.prototype),n}function s(c,n,a){if(typeof c=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return S(c)}return l(c,n,a)}s.poolSize=8192;function l(c,n,a){if(typeof c=="string")return A(c,n);if(ArrayBuffer.isView(c))return P(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(ke(c,ArrayBuffer)||c&&ke(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(c,SharedArrayBuffer)||c&&ke(c.buffer,SharedArrayBuffer)))return R(c,n,a);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let p=c.valueOf&&c.valueOf();if(p!=null&&p!==c)return s.from(p,n,a);let h=j(c);if(h)return h;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return s.from(c[Symbol.toPrimitive]("string"),n,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}s.from=function(c,n,a){return l(c,n,a)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function d(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function w(c,n,a){return d(c),c<=0?u(c):n!==void 0?typeof a=="string"?u(c).fill(n,a):u(c).fill(n):u(c)}s.alloc=function(c,n,a){return w(c,n,a)};function S(c){return d(c),u(c<0?0:N(c)|0)}s.allocUnsafe=function(c){return S(c)},s.allocUnsafeSlow=function(c){return S(c)};function A(c,n){if((typeof n!="string"||n==="")&&(n="utf8"),!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);let a=Z(c,n)|0,p=u(a),h=p.write(c,n);return h!==a&&(p=p.slice(0,h)),p}function C(c){let n=c.length<0?0:N(c.length)|0,a=u(n);for(let p=0;p<n;p+=1)a[p]=c[p]&255;return a}function P(c){if(ke(c,Uint8Array)){let n=new Uint8Array(c);return R(n.buffer,n.byteOffset,n.byteLength)}return C(c)}function R(c,n,a){if(n<0||c.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<n+(a||0))throw new RangeError('"length" is outside of buffer bounds');let p;return n===void 0&&a===void 0?p=new Uint8Array(c):a===void 0?p=new Uint8Array(c,n):p=new Uint8Array(c,n,a),Object.setPrototypeOf(p,s.prototype),p}function j(c){if(s.isBuffer(c)){let n=N(c.length)|0,a=u(n);return a.length===0||c.copy(a,0,0,n),a}if(c.length!==void 0)return typeof c.length!="number"||Ur(c.length)?u(0):C(c);if(c.type==="Buffer"&&Array.isArray(c.data))return C(c.data)}function N(c){if(c>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return c|0}function J(c){return+c!=c&&(c=0),s.alloc(+c)}s.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==s.prototype},s.compare=function(n,a){if(ke(n,Uint8Array)&&(n=s.from(n,n.offset,n.byteLength)),ke(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(n)||!s.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===a)return 0;let p=n.length,h=a.length;for(let b=0,E=Math.min(p,h);b<E;++b)if(n[b]!==a[b]){p=n[b],h=a[b];break}return p<h?-1:h<p?1:0},s.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(n,a){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return s.alloc(0);let p;if(a===void 0)for(a=0,p=0;p<n.length;++p)a+=n[p].length;let h=s.allocUnsafe(a),b=0;for(p=0;p<n.length;++p){let E=n[p];if(ke(E,Uint8Array))b+E.length>h.length?(s.isBuffer(E)||(E=s.from(E)),E.copy(h,b)):Uint8Array.prototype.set.call(h,E,b);else if(s.isBuffer(E))E.copy(h,b);else throw new TypeError('"list" argument must be an Array of Buffers');b+=E.length}return h};function Z(c,n){if(s.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||ke(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let a=c.length,p=arguments.length>2&&arguments[2]===!0;if(!p&&a===0)return 0;let h=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return Br(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return So(c).length;default:if(h)return p?-1:Br(c).length;n=(""+n).toLowerCase(),h=!0}}s.byteLength=Z;function ue(c,n,a){let p=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((a===void 0||a>this.length)&&(a=this.length),a<=0)||(a>>>=0,n>>>=0,a<=n))return"";for(c||(c="utf8");;)switch(c){case"hex":return te(this,n,a);case"utf8":case"utf-8":return k(this,n,a);case"ascii":return X(this,n,a);case"latin1":case"binary":return G(this,n,a);case"base64":return z(this,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,n,a);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}s.prototype._isBuffer=!0;function pe(c,n,a){let p=c[n];c[n]=c[a],c[a]=p}s.prototype.swap16=function(){let n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let a=0;a<n;a+=2)pe(this,a,a+1);return this},s.prototype.swap32=function(){let n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let a=0;a<n;a+=4)pe(this,a,a+3),pe(this,a+1,a+2);return this},s.prototype.swap64=function(){let n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let a=0;a<n;a+=8)pe(this,a,a+7),pe(this,a+1,a+6),pe(this,a+2,a+5),pe(this,a+3,a+4);return this},s.prototype.toString=function(){let n=this.length;return n===0?"":arguments.length===0?k(this,0,n):ue.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(n){if(!s.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:s.compare(this,n)===0},s.prototype.inspect=function(){let n="",a=ct.INSPECT_MAX_BYTES;return n=this.toString("hex",0,a).replace(/(.{2})/g,"$1 ").trim(),this.length>a&&(n+=" ... "),"<Buffer "+n+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(n,a,p,h,b){if(ke(n,Uint8Array)&&(n=s.from(n,n.offset,n.byteLength)),!s.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(a===void 0&&(a=0),p===void 0&&(p=n?n.length:0),h===void 0&&(h=0),b===void 0&&(b=this.length),a<0||p>n.length||h<0||b>this.length)throw new RangeError("out of range index");if(h>=b&&a>=p)return 0;if(h>=b)return-1;if(a>=p)return 1;if(a>>>=0,p>>>=0,h>>>=0,b>>>=0,this===n)return 0;let E=b-h,F=p-a,ce=Math.min(E,F),ie=this.slice(h,b),le=n.slice(a,p);for(let re=0;re<ce;++re)if(ie[re]!==le[re]){E=ie[re],F=le[re];break}return E<F?-1:F<E?1:0};function me(c,n,a,p,h){if(c.length===0)return-1;if(typeof a=="string"?(p=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,Ur(a)&&(a=h?0:c.length-1),a<0&&(a=c.length+a),a>=c.length){if(h)return-1;a=c.length-1}else if(a<0)if(h)a=0;else return-1;if(typeof n=="string"&&(n=s.from(n,p)),s.isBuffer(n))return n.length===0?-1:D(c,n,a,p,h);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?h?Uint8Array.prototype.indexOf.call(c,n,a):Uint8Array.prototype.lastIndexOf.call(c,n,a):D(c,[n],a,p,h);throw new TypeError("val must be string, number or Buffer")}function D(c,n,a,p,h){let b=1,E=c.length,F=n.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||n.length<2)return-1;b=2,E/=2,F/=2,a/=2}function ce(le,re){return b===1?le[re]:le.readUInt16BE(re*b)}let ie;if(h){let le=-1;for(ie=a;ie<E;ie++)if(ce(c,ie)===ce(n,le===-1?0:ie-le)){if(le===-1&&(le=ie),ie-le+1===F)return le*b}else le!==-1&&(ie-=ie-le),le=-1}else for(a+F>E&&(a=E-F),ie=a;ie>=0;ie--){let le=!0;for(let re=0;re<F;re++)if(ce(c,ie+re)!==ce(n,re)){le=!1;break}if(le)return ie}return-1}s.prototype.includes=function(n,a,p){return this.indexOf(n,a,p)!==-1},s.prototype.indexOf=function(n,a,p){return me(this,n,a,p,!0)},s.prototype.lastIndexOf=function(n,a,p){return me(this,n,a,p,!1)};function M(c,n,a,p){a=Number(a)||0;let h=c.length-a;p?(p=Number(p),p>h&&(p=h)):p=h;let b=n.length;p>b/2&&(p=b/2);let E;for(E=0;E<p;++E){let F=parseInt(n.substr(E*2,2),16);if(Ur(F))return E;c[a+E]=F}return E}function O(c,n,a,p){return Kt(Br(n,c.length-a),c,a,p)}function B(c,n,a,p){return Kt(qa(n),c,a,p)}function U(c,n,a,p){return Kt(So(n),c,a,p)}function L(c,n,a,p){return Kt(Qa(n,c.length-a),c,a,p)}s.prototype.write=function(n,a,p,h){if(a===void 0)h="utf8",p=this.length,a=0;else if(p===void 0&&typeof a=="string")h=a,p=this.length,a=0;else if(isFinite(a))a=a>>>0,isFinite(p)?(p=p>>>0,h===void 0&&(h="utf8")):(h=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let b=this.length-a;if((p===void 0||p>b)&&(p=b),n.length>0&&(p<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let E=!1;for(;;)switch(h){case"hex":return M(this,n,a,p);case"utf8":case"utf-8":return O(this,n,a,p);case"ascii":case"latin1":case"binary":return B(this,n,a,p);case"base64":return U(this,n,a,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,n,a,p);default:if(E)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),E=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(c,n,a){return n===0&&a===c.length?e.fromByteArray(c):e.fromByteArray(c.slice(n,a))}function k(c,n,a){a=Math.min(c.length,a);let p=[],h=n;for(;h<a;){let b=c[h],E=null,F=b>239?4:b>223?3:b>191?2:1;if(h+F<=a){let ce,ie,le,re;switch(F){case 1:b<128&&(E=b);break;case 2:ce=c[h+1],(ce&192)===128&&(re=(b&31)<<6|ce&63,re>127&&(E=re));break;case 3:ce=c[h+1],ie=c[h+2],(ce&192)===128&&(ie&192)===128&&(re=(b&15)<<12|(ce&63)<<6|ie&63,re>2047&&(re<55296||re>57343)&&(E=re));break;case 4:ce=c[h+1],ie=c[h+2],le=c[h+3],(ce&192)===128&&(ie&192)===128&&(le&192)===128&&(re=(b&15)<<18|(ce&63)<<12|(ie&63)<<6|le&63,re>65535&&re<1114112&&(E=re))}}E===null?(E=65533,F=1):E>65535&&(E-=65536,p.push(E>>>10&1023|55296),E=56320|E&1023),p.push(E),h+=F}return $(p)}let W=4096;function $(c){let n=c.length;if(n<=W)return String.fromCharCode.apply(String,c);let a="",p=0;for(;p<n;)a+=String.fromCharCode.apply(String,c.slice(p,p+=W));return a}function X(c,n,a){let p="";a=Math.min(c.length,a);for(let h=n;h<a;++h)p+=String.fromCharCode(c[h]&127);return p}function G(c,n,a){let p="";a=Math.min(c.length,a);for(let h=n;h<a;++h)p+=String.fromCharCode(c[h]);return p}function te(c,n,a){let p=c.length;(!n||n<0)&&(n=0),(!a||a<0||a>p)&&(a=p);let h="";for(let b=n;b<a;++b)h+=Fa[c[b]];return h}function ne(c,n,a){let p=c.slice(n,a),h="";for(let b=0;b<p.length-1;b+=2)h+=String.fromCharCode(p[b]+p[b+1]*256);return h}s.prototype.slice=function(n,a){let p=this.length;n=~~n,a=a===void 0?p:~~a,n<0?(n+=p,n<0&&(n=0)):n>p&&(n=p),a<0?(a+=p,a<0&&(a=0)):a>p&&(a=p),a<n&&(a=n);let h=this.subarray(n,a);return Object.setPrototypeOf(h,s.prototype),h};function Q(c,n,a){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+n>a)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(n,a,p){n=n>>>0,a=a>>>0,p||Q(n,a,this.length);let h=this[n],b=1,E=0;for(;++E<a&&(b*=256);)h+=this[n+E]*b;return h},s.prototype.readUintBE=s.prototype.readUIntBE=function(n,a,p){n=n>>>0,a=a>>>0,p||Q(n,a,this.length);let h=this[n+--a],b=1;for(;a>0&&(b*=256);)h+=this[n+--a]*b;return h},s.prototype.readUint8=s.prototype.readUInt8=function(n,a){return n=n>>>0,a||Q(n,1,this.length),this[n]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(n,a){return n=n>>>0,a||Q(n,2,this.length),this[n]|this[n+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(n,a){return n=n>>>0,a||Q(n,2,this.length),this[n]<<8|this[n+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},s.prototype.readBigUInt64LE=Ze(function(n){n=n>>>0,mt(n,"offset");let a=this[n],p=this[n+7];(a===void 0||p===void 0)&&Ct(n,this.length-8);let h=a+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,b=this[++n]+this[++n]*2**8+this[++n]*2**16+p*2**24;return BigInt(h)+(BigInt(b)<<BigInt(32))}),s.prototype.readBigUInt64BE=Ze(function(n){n=n>>>0,mt(n,"offset");let a=this[n],p=this[n+7];(a===void 0||p===void 0)&&Ct(n,this.length-8);let h=a*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],b=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+p;return(BigInt(h)<<BigInt(32))+BigInt(b)}),s.prototype.readIntLE=function(n,a,p){n=n>>>0,a=a>>>0,p||Q(n,a,this.length);let h=this[n],b=1,E=0;for(;++E<a&&(b*=256);)h+=this[n+E]*b;return b*=128,h>=b&&(h-=Math.pow(2,8*a)),h},s.prototype.readIntBE=function(n,a,p){n=n>>>0,a=a>>>0,p||Q(n,a,this.length);let h=a,b=1,E=this[n+--h];for(;h>0&&(b*=256);)E+=this[n+--h]*b;return b*=128,E>=b&&(E-=Math.pow(2,8*a)),E},s.prototype.readInt8=function(n,a){return n=n>>>0,a||Q(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},s.prototype.readInt16LE=function(n,a){n=n>>>0,a||Q(n,2,this.length);let p=this[n]|this[n+1]<<8;return p&32768?p|4294901760:p},s.prototype.readInt16BE=function(n,a){n=n>>>0,a||Q(n,2,this.length);let p=this[n+1]|this[n]<<8;return p&32768?p|4294901760:p},s.prototype.readInt32LE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},s.prototype.readInt32BE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},s.prototype.readBigInt64LE=Ze(function(n){n=n>>>0,mt(n,"offset");let a=this[n],p=this[n+7];(a===void 0||p===void 0)&&Ct(n,this.length-8);let h=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(p<<24);return(BigInt(h)<<BigInt(32))+BigInt(a+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),s.prototype.readBigInt64BE=Ze(function(n){n=n>>>0,mt(n,"offset");let a=this[n],p=this[n+7];(a===void 0||p===void 0)&&Ct(n,this.length-8);let h=(a<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(h)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+p)}),s.prototype.readFloatLE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),t.read(this,n,!0,23,4)},s.prototype.readFloatBE=function(n,a){return n=n>>>0,a||Q(n,4,this.length),t.read(this,n,!1,23,4)},s.prototype.readDoubleLE=function(n,a){return n=n>>>0,a||Q(n,8,this.length),t.read(this,n,!0,52,8)},s.prototype.readDoubleBE=function(n,a){return n=n>>>0,a||Q(n,8,this.length),t.read(this,n,!1,52,8)};function oe(c,n,a,p,h,b){if(!s.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>h||n<b)throw new RangeError('"value" argument is out of bounds');if(a+p>c.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(n,a,p,h){if(n=+n,a=a>>>0,p=p>>>0,!h){let F=Math.pow(2,8*p)-1;oe(this,n,a,p,F,0)}let b=1,E=0;for(this[a]=n&255;++E<p&&(b*=256);)this[a+E]=n/b&255;return a+p},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(n,a,p,h){if(n=+n,a=a>>>0,p=p>>>0,!h){let F=Math.pow(2,8*p)-1;oe(this,n,a,p,F,0)}let b=p-1,E=1;for(this[a+b]=n&255;--b>=0&&(E*=256);)this[a+b]=n/E&255;return a+p},s.prototype.writeUint8=s.prototype.writeUInt8=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,1,255,0),this[a]=n&255,a+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,2,65535,0),this[a]=n&255,this[a+1]=n>>>8,a+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,2,65535,0),this[a]=n>>>8,this[a+1]=n&255,a+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,4,4294967295,0),this[a+3]=n>>>24,this[a+2]=n>>>16,this[a+1]=n>>>8,this[a]=n&255,a+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,4,4294967295,0),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4};function ae(c,n,a,p,h){Eo(n,p,h,c,a,7);let b=Number(n&BigInt(4294967295));c[a++]=b,b=b>>8,c[a++]=b,b=b>>8,c[a++]=b,b=b>>8,c[a++]=b;let E=Number(n>>BigInt(32)&BigInt(4294967295));return c[a++]=E,E=E>>8,c[a++]=E,E=E>>8,c[a++]=E,E=E>>8,c[a++]=E,a}function ve(c,n,a,p,h){Eo(n,p,h,c,a,7);let b=Number(n&BigInt(4294967295));c[a+7]=b,b=b>>8,c[a+6]=b,b=b>>8,c[a+5]=b,b=b>>8,c[a+4]=b;let E=Number(n>>BigInt(32)&BigInt(4294967295));return c[a+3]=E,E=E>>8,c[a+2]=E,E=E>>8,c[a+1]=E,E=E>>8,c[a]=E,a+8}s.prototype.writeBigUInt64LE=Ze(function(n,a=0){return ae(this,n,a,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Ze(function(n,a=0){return ve(this,n,a,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(n,a,p,h){if(n=+n,a=a>>>0,!h){let ce=Math.pow(2,8*p-1);oe(this,n,a,p,ce-1,-ce)}let b=0,E=1,F=0;for(this[a]=n&255;++b<p&&(E*=256);)n<0&&F===0&&this[a+b-1]!==0&&(F=1),this[a+b]=(n/E>>0)-F&255;return a+p},s.prototype.writeIntBE=function(n,a,p,h){if(n=+n,a=a>>>0,!h){let ce=Math.pow(2,8*p-1);oe(this,n,a,p,ce-1,-ce)}let b=p-1,E=1,F=0;for(this[a+b]=n&255;--b>=0&&(E*=256);)n<0&&F===0&&this[a+b+1]!==0&&(F=1),this[a+b]=(n/E>>0)-F&255;return a+p},s.prototype.writeInt8=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,1,127,-128),n<0&&(n=255+n+1),this[a]=n&255,a+1},s.prototype.writeInt16LE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,2,32767,-32768),this[a]=n&255,this[a+1]=n>>>8,a+2},s.prototype.writeInt16BE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,2,32767,-32768),this[a]=n>>>8,this[a+1]=n&255,a+2},s.prototype.writeInt32LE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,4,2147483647,-2147483648),this[a]=n&255,this[a+1]=n>>>8,this[a+2]=n>>>16,this[a+3]=n>>>24,a+4},s.prototype.writeInt32BE=function(n,a,p){return n=+n,a=a>>>0,p||oe(this,n,a,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4},s.prototype.writeBigInt64LE=Ze(function(n,a=0){return ae(this,n,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Ze(function(n,a=0){return ve(this,n,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(c,n,a,p,h,b){if(a+p>c.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function K(c,n,a,p,h){return n=+n,a=a>>>0,h||Y(c,n,a,4),t.write(c,n,a,p,23,4),a+4}s.prototype.writeFloatLE=function(n,a,p){return K(this,n,a,!0,p)},s.prototype.writeFloatBE=function(n,a,p){return K(this,n,a,!1,p)};function fe(c,n,a,p,h){return n=+n,a=a>>>0,h||Y(c,n,a,8),t.write(c,n,a,p,52,8),a+8}s.prototype.writeDoubleLE=function(n,a,p){return fe(this,n,a,!0,p)},s.prototype.writeDoubleBE=function(n,a,p){return fe(this,n,a,!1,p)},s.prototype.copy=function(n,a,p,h){if(!s.isBuffer(n))throw new TypeError("argument should be a Buffer");if(p||(p=0),!h&&h!==0&&(h=this.length),a>=n.length&&(a=n.length),a||(a=0),h>0&&h<p&&(h=p),h===p||n.length===0||this.length===0)return 0;if(a<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),n.length-a<h-p&&(h=n.length-a+p);let b=h-p;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(a,p,h):Uint8Array.prototype.set.call(n,this.subarray(p,h),a),b},s.prototype.fill=function(n,a,p,h){if(typeof n=="string"){if(typeof a=="string"?(h=a,a=0,p=this.length):typeof p=="string"&&(h=p,p=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!s.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(n.length===1){let E=n.charCodeAt(0);(h==="utf8"&&E<128||h==="latin1")&&(n=E)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(a<0||this.length<a||this.length<p)throw new RangeError("Out of range index");if(p<=a)return this;a=a>>>0,p=p===void 0?this.length:p>>>0,n||(n=0);let b;if(typeof n=="number")for(b=a;b<p;++b)this[b]=n;else{let E=s.isBuffer(n)?n:s.from(n,h),F=E.length;if(F===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(b=0;b<p-a;++b)this[b+a]=E[b%F]}return this};let Ee={};function st(c,n,a){Ee[c]=class extends a{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}st("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),st("ERR_INVALID_ARG_TYPE",function(c,n){return`The "${c}" argument must be of type number. Received type ${typeof n}`},TypeError),st("ERR_OUT_OF_RANGE",function(c,n,a){let p=`The value of "${c}" is out of range.`,h=a;return Number.isInteger(a)&&Math.abs(a)>2**32?h=wo(String(a)):typeof a=="bigint"&&(h=String(a),(a>BigInt(2)**BigInt(32)||a<-(BigInt(2)**BigInt(32)))&&(h=wo(h)),h+="n"),p+=` It must be ${n}. Received ${h}`,p},RangeError);function wo(c){let n="",a=c.length,p=c[0]==="-"?1:0;for(;a>=p+4;a-=3)n=`_${c.slice(a-3,a)}${n}`;return`${c.slice(0,a)}${n}`}function Na(c,n,a){mt(n,"offset"),(c[n]===void 0||c[n+a]===void 0)&&Ct(n,c.length-(a+1))}function Eo(c,n,a,p,h,b){if(c>a||c<n){let E=typeof n=="bigint"?"n":"",F;throw n===0||n===BigInt(0)?F=`>= 0${E} and < 2${E} ** ${(b+1)*8}${E}`:F=`>= -(2${E} ** ${(b+1)*8-1}${E}) and < 2 ** ${(b+1)*8-1}${E}`,new Ee.ERR_OUT_OF_RANGE("value",F,c)}Na(p,h,b)}function mt(c,n){if(typeof c!="number")throw new Ee.ERR_INVALID_ARG_TYPE(n,"number",c)}function Ct(c,n,a){throw Math.floor(c)!==c?(mt(c,a),new Ee.ERR_OUT_OF_RANGE("offset","an integer",c)):n<0?new Ee.ERR_BUFFER_OUT_OF_BOUNDS:new Ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,c)}let La=/[^+/0-9A-Za-z-_]/g;function za(c){if(c=c.split("=")[0],c=c.trim().replace(La,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function Br(c,n){n=n||1/0;let a,p=c.length,h=null,b=[];for(let E=0;E<p;++E){if(a=c.charCodeAt(E),a>55295&&a<57344){if(!h){if(a>56319){(n-=3)>-1&&b.push(239,191,189);continue}else if(E+1===p){(n-=3)>-1&&b.push(239,191,189);continue}h=a;continue}if(a<56320){(n-=3)>-1&&b.push(239,191,189),h=a;continue}a=(h-55296<<10|a-56320)+65536}else h&&(n-=3)>-1&&b.push(239,191,189);if(h=null,a<128){if((n-=1)<0)break;b.push(a)}else if(a<2048){if((n-=2)<0)break;b.push(a>>6|192,a&63|128)}else if(a<65536){if((n-=3)<0)break;b.push(a>>12|224,a>>6&63|128,a&63|128)}else if(a<1114112){if((n-=4)<0)break;b.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw new Error("Invalid code point")}return b}function qa(c){let n=[];for(let a=0;a<c.length;++a)n.push(c.charCodeAt(a)&255);return n}function Qa(c,n){let a,p,h,b=[];for(let E=0;E<c.length&&!((n-=2)<0);++E)a=c.charCodeAt(E),p=a>>8,h=a%256,b.push(h),b.push(p);return b}function So(c){return e.toByteArray(za(c))}function Kt(c,n,a,p){let h;for(h=0;h<p&&!(h+a>=n.length||h>=c.length);++h)n[h+a]=c[h];return h}function ke(c,n){return c instanceof n||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===n.name}function Ur(c){return c!==c}let Fa=function(){let c="0123456789abcdef",n=new Array(256);for(let a=0;a<16;++a){let p=a*16;for(let h=0;h<16;++h)n[p+h]=c[a]+c[h]}return n}();function Ze(c){return typeof BigInt>"u"?$a:c}function $a(){throw new Error("BigInt not supported")}return ct}var Mt,zi,er,qi,ct,Qi,$i=at(()=>{m();v();g();y();Mt={},zi=!1;er={},qi=!1;ct={},Qi=!1});var lt,T,Nl,Ll,Vi=at(()=>{m();v();g();y();$i();lt=Fi();lt.Buffer;lt.SlowBuffer;lt.INSPECT_MAX_BYTES;lt.kMaxLength;T=lt.Buffer,Nl=lt.INSPECT_MAX_BYTES,Ll=lt.kMaxLength});var v=at(()=>{Vi()});var da=Yt(q=>{"use strict";m();v();g();y();var to=Symbol.for("react.transitional.element"),Uc=Symbol.for("react.portal"),kc=Symbol.for("react.fragment"),Nc=Symbol.for("react.strict_mode"),Lc=Symbol.for("react.profiler"),zc=Symbol.for("react.consumer"),qc=Symbol.for("react.context"),Qc=Symbol.for("react.forward_ref"),Fc=Symbol.for("react.suspense"),$c=Symbol.for("react.memo"),sa=Symbol.for("react.lazy"),ta=Symbol.iterator;function Vc(e){return e===null||typeof e!="object"?null:(e=ta&&e[ta]||e["@@iterator"],typeof e=="function"?e:null)}var aa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ua=Object.assign,ca={};function Ot(e,t,r){this.props=e,this.context=t,this.refs=ca,this.updater=r||aa}Ot.prototype.isReactComponent={};Ot.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ot.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function la(){}la.prototype=Ot.prototype;function ro(e,t,r){this.props=e,this.context=t,this.refs=ca,this.updater=r||aa}var no=ro.prototype=new la;no.constructor=ro;ua(no,Ot.prototype);no.isPureReactComponent=!0;var ra=Array.isArray,se={H:null,A:null,T:null,S:null,V:null},fa=Object.prototype.hasOwnProperty;function oo(e,t,r,o,i,u){return r=u.ref,{$$typeof:to,type:e,key:t,ref:r!==void 0?r:null,props:u}}function Hc(e,t){return oo(e.type,t,void 0,void 0,void 0,e.props)}function io(e){return typeof e=="object"&&e!==null&&e.$$typeof===to}function Wc(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var na=/\/+/g;function eo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wc(""+e.key):t.toString(36)}function oa(){}function Gc(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(oa,oa):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function _t(e,t,r,o,i){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(u){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case to:case Uc:s=!0;break;case sa:return s=e._init,_t(s(e._payload),t,r,o,i)}}if(s)return i=i(e),s=o===""?"."+eo(e,0):o,ra(i)?(r="",s!=null&&(r=s.replace(na,"$&/")+"/"),_t(i,t,r,"",function(w){return w})):i!=null&&(io(i)&&(i=Hc(i,r+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(na,"$&/")+"/")+s)),t.push(i)),1;s=0;var l=o===""?".":o+":";if(ra(e))for(var d=0;d<e.length;d++)o=e[d],u=l+eo(o,d),s+=_t(o,t,r,u,i);else if(d=Vc(e),typeof d=="function")for(e=d.call(e),d=0;!(o=e.next()).done;)o=o.value,u=l+eo(o,d++),s+=_t(o,t,r,u,i);else if(u==="object"){if(typeof e.then=="function")return _t(Gc(e),t,r,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function Er(e,t,r){if(e==null)return e;var o=[],i=0;return _t(e,o,"","",function(u){return t.call(r,u,i++)}),o}function Kc(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ia=typeof reportError=="function"?reportError:function(e){if(typeof globalThis=="object"&&typeof globalThis.ErrorEvent=="function"){var t=new globalThis.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!globalThis.dispatchEvent(t))return}else if(typeof x=="object"&&typeof x.emit=="function"){x.emit("uncaughtException",e);return}console.error(e)};function Yc(){}q.Children={map:Er,forEach:function(e,t,r){Er(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Er(e,function(){t++}),t},toArray:function(e){return Er(e,function(t){return t})||[]},only:function(e){if(!io(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};q.Component=Ot;q.Fragment=kc;q.Profiler=Lc;q.PureComponent=ro;q.StrictMode=Nc;q.Suspense=Fc;q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=se;q.__COMPILER_RUNTIME={__proto__:null,c:function(e){return se.H.useMemoCache(e)}};q.cache=function(e){return function(){return e.apply(null,arguments)}};q.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=ua({},e.props),i=e.key,u=void 0;if(t!=null)for(s in t.ref!==void 0&&(u=void 0),t.key!==void 0&&(i=""+t.key),t)!fa.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(o[s]=t[s]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),d=0;d<s;d++)l[d]=arguments[d+2];o.children=l}return oo(e.type,i,void 0,void 0,u,o)};q.createContext=function(e){return e={$$typeof:qc,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:zc,_context:e},e};q.createElement=function(e,t,r){var o,i={},u=null;if(t!=null)for(o in t.key!==void 0&&(u=""+t.key),t)fa.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),d=0;d<s;d++)l[d]=arguments[d+2];i.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)i[o]===void 0&&(i[o]=s[o]);return oo(e,u,void 0,void 0,null,i)};q.createRef=function(){return{current:null}};q.forwardRef=function(e){return{$$typeof:Qc,render:e}};q.isValidElement=io;q.lazy=function(e){return{$$typeof:sa,_payload:{_status:-1,_result:e},_init:Kc}};q.memo=function(e,t){return{$$typeof:$c,type:e,compare:t===void 0?null:t}};q.startTransition=function(e){var t=se.T,r={};se.T=r;try{var o=e(),i=se.S;i!==null&&i(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Yc,ia)}catch(u){ia(u)}finally{se.T=t}};q.unstable_useCacheRefresh=function(){return se.H.useCacheRefresh()};q.use=function(e){return se.H.use(e)};q.useActionState=function(e,t,r){return se.H.useActionState(e,t,r)};q.useCallback=function(e,t){return se.H.useCallback(e,t)};q.useContext=function(e){return se.H.useContext(e)};q.useDebugValue=function(){};q.useDeferredValue=function(e,t){return se.H.useDeferredValue(e,t)};q.useEffect=function(e,t,r){var o=se.H;if(typeof r=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return o.useEffect(e,t)};q.useId=function(){return se.H.useId()};q.useImperativeHandle=function(e,t,r){return se.H.useImperativeHandle(e,t,r)};q.useInsertionEffect=function(e,t){return se.H.useInsertionEffect(e,t)};q.useLayoutEffect=function(e,t){return se.H.useLayoutEffect(e,t)};q.useMemo=function(e,t){return se.H.useMemo(e,t)};q.useOptimistic=function(e,t){return se.H.useOptimistic(e,t)};q.useReducer=function(e,t,r){return se.H.useReducer(e,t,r)};q.useRef=function(e){return se.H.useRef(e)};q.useState=function(e){return se.H.useState(e)};q.useSyncExternalStore=function(e,t,r){return se.H.useSyncExternalStore(e,t,r)};q.useTransition=function(){return se.H.useTransition()};q.version="19.1.0"});var Ae=Yt((Q0,pa)=>{"use strict";m();v();g();y();pa.exports=da()});var ma=Yt(Sr=>{"use strict";m();v();g();y();var Jc=Symbol.for("react.transitional.element"),Zc=Symbol.for("react.fragment");function ha(e,t,r){var o=null;if(r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),"key"in t){r={};for(var i in t)i!=="key"&&(r[i]=t[i])}else r=t;return t=r.ref,{$$typeof:Jc,type:e,key:o,ref:t!==void 0?t:null,props:r}}Sr.Fragment=Zc;Sr.jsx=ha;Sr.jsxs=ha});var xr=Yt((Z0,ya)=>{"use strict";m();v();g();y();ya.exports=ma()});m();v();g();y();m();v();g();y();(function(){try{var e=typeof globalThis<"u"||typeof globalThis<"u"||typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d2ee958-d837-44f3-baa1-2546b3419d71",e._sentryDebugIdIdentifier="sentry-dbid-5d2ee958-d837-44f3-baa1-2546b3419d71")}catch{}})();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();function ft(e){let t=BigInt(e),r=[],o=0;if(t===0n)return[0];for(;t>0;)r[o]=Number(t&127n),t>>=7n,t>0n&&(r[o]|=128),o+=1;return r}function Hi(e){let t=0n,r=0n,o=0;for(;;){if(o>=e.length)throw new Error("ULEB decode error: buffer overflow");let i=e[o];if(o+=1,t+=BigInt(i&127)<<r,!(i&128))break;r+=7n}if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("ULEB decode error: value exceeds MAX_SAFE_INTEGER");return{value:Number(t),length:o}}var Wi=class{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){let e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){let e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,{value:t,length:r}=Hi(new Uint8Array(this.dataView.buffer,e));return this.shift(r),t}readVec(e){let t=this.readULEB(),r=[];for(let o=0;o<t;o++)r.push(e(this,o,t));return r}};m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();function tu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ki(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(r=>typeof r=="string"):t.every(r=>Number.isSafeInteger(r)):!1}function qr(e,t){if(typeof t!="string")throw new Error(`${e}: string expected`);return!0}function Yi(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function Qr(e){if(!Array.isArray(e))throw new Error("array expected")}function Ji(e,t){if(!Ki(!0,t))throw new Error(`${e}: array of strings expected`)}function ru(e,t){if(!Ki(!1,t))throw new Error(`${e}: array of numbers expected`)}function nu(...e){let t=u=>u,r=(u,s)=>l=>u(s(l)),o=e.map(u=>u.encode).reduceRight(r,t),i=e.map(u=>u.decode).reduce(r,t);return{encode:o,decode:i}}function ou(e){let t=typeof e=="string"?e.split(""):e,r=t.length;Ji("alphabet",t);let o=new Map(t.map((i,u)=>[i,u]));return{encode:i=>(Qr(i),i.map(u=>{if(!Number.isSafeInteger(u)||u<0||u>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${u}". Allowed: ${e}`);return t[u]})),decode:i=>(Qr(i),i.map(u=>{qr("alphabet.decode",u);let s=o.get(u);if(s===void 0)throw new Error(`Unknown letter: "${u}". Allowed: ${e}`);return s}))}}function iu(e=""){return qr("join",e),{encode:t=>(Ji("join.decode",t),t.join(e)),decode:t=>(qr("join.decode",t),t.split(e))}}function Gi(e,t,r){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(Qr(e),!e.length)return[];let o=0,i=[],u=Array.from(e,l=>{if(Yi(l),l<0||l>=t)throw new Error(`invalid integer: ${l}`);return l}),s=u.length;for(;;){let l=0,d=!0;for(let w=o;w<s;w++){let S=u[w],A=t*l,C=A+S;if(!Number.isSafeInteger(C)||A/t!==l||C-S!==A)throw new Error("convertRadix: carry overflow");let P=C/r;l=C%r;let R=Math.floor(P);if(u[w]=R,!Number.isSafeInteger(R)||R*r+l!==C)throw new Error("convertRadix: carry overflow");if(d)R?d=!1:o=w;else continue}if(i.push(l),d)break}for(let l=0;l<e.length-1&&e[l]===0;l++)i.push(0);return i.reverse()}function su(e){Yi(e);let t=2**8;return{encode:r=>{if(!tu(r))throw new Error("radix.encode input should be Uint8Array");return Gi(Array.from(r),t,e)},decode:r=>(ru("radix.decode",r),Uint8Array.from(Gi(r,e,t)))}}var au=e=>nu(su(58),ou(e),iu("")),Fr=au("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var We=e=>Fr.encode(e),Ge=e=>Fr.decode(e);m();v();g();y();function xe(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}var $r=8192;function be(e){if(e.length<$r)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=$r){let o=e.slice(r,r+$r);t+=String.fromCharCode(...o)}return btoa(t)}m();v();g();y();function et(e){let t=e.startsWith("0x")?e.slice(2):e,r=t.length%2===0?t:`0${t}`,o=r.match(/[0-9a-fA-F]{2}/g)?.map(i=>parseInt(i,16))??[];if(o.length!==r.length/2)throw new Error(`Invalid hex string ${e}`);return Uint8Array.from(o)}function Ne(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function Vr(e,t){switch(t){case"base58":return We(e);case"base64":return be(e);case"hex":return Ne(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function Hr(e,t=["<",">"]){let[r,o]=t,i=[],u="",s=0;for(let l=0;l<e.length;l++){let d=e[l];if(d===r&&s++,d===o&&s--,s===0&&d===","){i.push(u.trim()),u="";continue}u+=d}return i.push(u.trim()),i}m();v();g();y();var Zi=class{constructor({initialSize:e=1024,maxSize:t=1/0,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){let t=this.bytePosition+e;if(t>this.size){let r=Math.min(this.maxSize,Math.max(this.size+t,this.size+this.allocateSize));if(t>r)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=r;let o=new ArrayBuffer(this.size);new Uint8Array(o).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(o)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}writeBytes(e){this.ensureSizeOrGrow(e.length);for(let t=0;t<e.length;t++)this.dataView.setUint8(this.bytePosition+t,e[t]);return this.shift(e.length)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Wr(BigInt(e),8).forEach(t=>this.write8(t)),this}write128(e){return Wr(BigInt(e),16).forEach(t=>this.write8(t)),this}write256(e){return Wr(BigInt(e),32).forEach(t=>this.write8(t)),this}writeULEB(e){return ft(e).forEach(t=>this.write8(t)),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach((r,o)=>t(this,r,o,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return Vr(this.toBytes(),e)}};function Wr(e,t){let r=new Uint8Array(t),o=0;for(;e>0;)r[o]=Number(e%BigInt(256)),e=e/BigInt(256),o+=1;return r}m();v();g();y();var Re=class Xi{#t;#e;constructor(t){this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),this.#t=t.write,this.#e=t.serialize??((r,o)=>{let i=new Zi({initialSize:this.serializedSize(r)??void 0,...o});return this.#t(r,i),i.toBytes()}),this.validate=t.validate??(()=>{})}write(t,r){this.validate(t),this.#t(t,r)}serialize(t,r){return this.validate(t),new cu(this,this.#e(t,r))}parse(t){let r=new Wi(t);return this.read(r)}fromHex(t){return this.parse(et(t))}fromBase58(t){return this.parse(Ge(t))}fromBase64(t){return this.parse(xe(t))}transform({name:t,input:r,output:o,validate:i}){return new Xi({name:t??this.name,read:u=>o?o(this.read(u)):this.read(u),write:(u,s)=>this.#t(r?r(u):u,s),serializedSize:u=>this.serializedSize(r?r(u):u),serialize:(u,s)=>this.#e(r?r(u):u,s),validate:u=>{i?.(u),this.validate(r?r(u):u)}})}},uu=Symbol.for("@mysten/serialized-bcs");var cu=class{#t;#e;get[uu](){return!0}constructor(e,t){this.#t=e,this.#e=t}toBytes(){return this.#e}toHex(){return Ne(this.#e)}toBase64(){return be(this.#e)}toBase58(){return We(this.#e)}parse(){return this.#t.parse(this.#e)}};function jt({size:e,...t}){return new Re({...t,serializedSize:()=>e})}function tr({readMethod:e,writeMethod:t,...r}){return jt({...r,read:o=>o[e](),write:(o,i)=>i[t](o),validate:o=>{if(o<0||o>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${o}. Expected value in range 0-${r.maxValue}`);r.validate?.(o)}})}function rr({readMethod:e,writeMethod:t,...r}){return jt({...r,read:o=>o[e](),write:(o,i)=>i[t](BigInt(o)),validate:o=>{let i=BigInt(o);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);r.validate?.(i)}})}function es({serialize:e,...t}){let r=new Re({...t,serialize:e,write:(o,i)=>{for(let u of r.serialize(o).toBytes())i.write8(u)}});return r}function ts({toBytes:e,fromBytes:t,...r}){return new Re({...r,read:o=>{let i=o.readULEB();return t(o.readBytes(i))},write:(o,i)=>{let u=e(o);i.writeULEB(u.length);for(let s=0;s<u.length;s++)i.write8(u[s])},serialize:o=>{let i=e(o),u=ft(i.length),s=new Uint8Array(u.length+i.length);return s.set(u,0),s.set(i,u.length),s},validate:o=>{if(typeof o!="string")throw new TypeError(`Invalid ${r.name} value: ${o}. Expected string`);r.validate?.(o)}})}function rs(e){let t=null;function r(){return t||(t=e()),t}return new Re({name:"lazy",read:o=>r().read(o),serializedSize:o=>r().serializedSize(o),write:(o,i)=>r().write(o,i),serialize:(o,i)=>r().serialize(o,i).toBytes()})}var Gr=class extends Re{constructor({name:e,fields:t,...r}){let o=Object.entries(t);super({name:e,serializedSize:i=>{let u=0;for(let[s,l]of o){let d=l.serializedSize(i[s]);if(d==null)return null;u+=d}return u},read:i=>{let u={};for(let[s,l]of o)u[s]=l.read(i);return u},write:(i,u)=>{for(let[s,l]of o)l.write(i[s],u)},...r,validate:i=>{if(r?.validate?.(i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})}},Kr=class extends Re{constructor({fields:e,...t}){let r=Object.entries(e);super({read:o=>{let i=o.readULEB(),u=r[i];if(!u)throw new TypeError(`Unknown value ${i} for enum ${t.name}`);let[s,l]=u;return{[s]:l?.read(o)??!0,$kind:s}},write:(o,i)=>{let[u,s]=Object.entries(o).filter(([l])=>Object.hasOwn(e,l))[0];for(let l=0;l<r.length;l++){let[d,w]=r[l];if(d===u){i.writeULEB(l),w?.write(s,i);return}}},...t,validate:o=>{if(t?.validate?.(o),typeof o!="object"||o==null)throw new TypeError(`Expected object, found ${typeof o}`);let i=Object.keys(o).filter(s=>o[s]!==void 0&&Object.hasOwn(e,s));if(i.length!==1)throw new TypeError(`Expected object with one key, but found ${i.length} for type ${t.name}}`);let[u]=i;if(!Object.hasOwn(e,u))throw new TypeError(`Invalid enum variant ${u}`)}})}},Yr=class extends Re{constructor({fields:e,name:t,...r}){super({name:t??`(${e.map(o=>o.name).join(", ")})`,serializedSize:o=>{let i=0;for(let u=0;u<e.length;u++){let s=e[u].serializedSize(o[u]);if(s==null)return null;i+=s}return i},read:o=>{let i=[];for(let u of e)i.push(u.read(o));return i},write:(o,i)=>{for(let u=0;u<e.length;u++)e[u].write(o[u],i)},...r,validate:o=>{if(r?.validate?.(o),!Array.isArray(o))throw new TypeError(`Expected array, found ${typeof o}`);if(o.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${o.length}`)}})}};m();v();g();y();function lu(e,t,r){return new Re({read:o=>{let i=new Array(e);for(let u=0;u<e;u++)i[u]=t.read(o);return i},write:(o,i)=>{for(let u of o)t.write(u,i)},...r,name:r?.name??`${t.name}[${e}]`,validate:o=>{if(r?.validate?.(o),!o||typeof o!="object"||!("length"in o))throw new TypeError(`Expected array, found ${typeof o}`);if(o.length!==e)throw new TypeError(`Expected array of length ${e}, found ${o.length}`)}})}function fu(e){return f.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>t.$kind==="Some"?t.Some:null})}function du(e,t){return new Re({read:r=>{let o=r.readULEB(),i=new Array(o);for(let u=0;u<o;u++)i[u]=e.read(r);return i},write:(r,o)=>{o.writeULEB(r.length);for(let i of r)e.write(i,o)},...t,name:t?.name??`vector<${e.name}>`,validate:r=>{if(t?.validate?.(r),!r||typeof r!="object"||!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})}function Jr(e,t){for(let r=0;r<Math.min(e.length,t.length);r++)if(e[r]!==t[r])return e[r]-t[r];return e.length-t.length}function pu(e,t){return new Re({name:`Map<${e.name}, ${t.name}>`,read:r=>{let o=r.readULEB(),i=new Map;for(let u=0;u<o;u++)i.set(e.read(r),t.read(r));return i},write:(r,o)=>{let i=[...r.entries()].map(([u,s])=>[e.serialize(u).toBytes(),s]);i.sort(([u],[s])=>Jr(u,s)),o.writeULEB(i.length);for(let[u,s]of i)o.writeBytes(u),t.write(s,o)}})}var f={u8(e){return tr({readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e,name:e?.name??"u8"})},u16(e){return tr({readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e,name:e?.name??"u16"})},u32(e){return tr({readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e,name:e?.name??"u32"})},u64(e){return rr({readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e,name:e?.name??"u64"})},u128(e){return rr({readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e,name:e?.name??"u128"})},u256(e){return rr({readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e,name:e?.name??"u256"})},bool(e){return jt({size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,name:e?.name??"bool",validate:t=>{if(e?.validate?.(t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return es({read:t=>t.readULEB(),serialize:t=>Uint8Array.from(ft(t)),...e,name:e?.name??"uleb128"})},bytes(e,t){return jt({size:e,read:r=>r.readBytes(e),write:(r,o)=>{o.writeBytes(new Uint8Array(r))},...t,name:t?.name??`bytes[${e}]`,validate:r=>{if(t?.validate?.(r),!r||typeof r!="object"||!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},byteVector(e){return new Re({read:t=>{let r=t.readULEB();return t.readBytes(r)},write:(t,r)=>{let o=new Uint8Array(t);r.writeULEB(o.length),r.writeBytes(o)},...e,name:e?.name??"vector<u8>",serializedSize:t=>{let r="length"in t?t.length:null;return r==null?null:ft(r).length+r},validate:t=>{if(e?.validate?.(t),!t||typeof t!="object"||!("length"in t))throw new TypeError(`Expected array, found ${typeof t}`)}})},string(e){return ts({toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e,name:e?.name??"string"})},fixedArray:lu,option:fu,vector:du,tuple(e,t){return new Yr({fields:e,...t})},struct(e,t,r){return new Gr({name:e,fields:t,...r})},enum(e,t,r){return new Kr({name:e,fields:t,...r})},map:pu,lazy(e){return rs(e)}};var nr=32;function ns(e){return hu(e)&&mu(e)===nr}function gt(e,t=!1){let r=e.toLowerCase();return!t&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(nr*2,"0")}`}function hu(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2===0}function mu(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}var yu=/^vector<(.+)>$/,gu=/^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/,Zr=class vt{static parseFromStr(t,r=!1){if(t==="address")return{address:null};if(t==="bool")return{bool:null};if(t==="u8")return{u8:null};if(t==="u16")return{u16:null};if(t==="u32")return{u32:null};if(t==="u64")return{u64:null};if(t==="u128")return{u128:null};if(t==="u256")return{u256:null};if(t==="signer")return{signer:null};let o=t.match(yu);if(o)return{vector:vt.parseFromStr(o[1],r)};let i=t.match(gu);if(i)return{struct:{address:r?gt(i[1]):i[1],module:i[2],name:i[3],typeParams:i[5]===void 0?[]:vt.parseStructTypeArgs(i[5],r)}};throw new Error(`Encountered unexpected token when parsing type args for ${t}`)}static parseStructTypeArgs(t,r=!1){return Hr(t).map(o=>vt.parseFromStr(o,r))}static tagToString(t){if("bool"in t)return"bool";if("u8"in t)return"u8";if("u16"in t)return"u16";if("u32"in t)return"u32";if("u64"in t)return"u64";if("u128"in t)return"u128";if("u256"in t)return"u256";if("address"in t)return"address";if("signer"in t)return"signer";if("vector"in t)return`vector<${vt.tagToString(t.vector)}>`;if("struct"in t){let r=t.struct,o=r.typeParams.map(vt.tagToString).join(", ");return`${r.address}::${r.module}::${r.name}${o?`<${o}>`:""}`}throw new Error("Invalid TypeTag")}};m();v();g();y();function vu(e){return f.u64({name:"unsafe_u64",...e}).transform({input:t=>t,output:t=>Number(t)})}function bu(e){return f.enum("Option",{None:null,Some:e})}var V=f.bytes(nr).transform({validate:e=>{let t=typeof e=="string"?e:Ne(e);if(!t||!ns(gt(t)))throw new Error(`Invalid Sui address ${t}`)},input:e=>typeof e=="string"?et(gt(e)):e,output:e=>gt(Ne(e))}),ge=f.byteVector().transform({name:"ObjectDigest",input:e=>Ge(e),output:e=>We(new Uint8Array(e)),validate:e=>{if(Ge(e).length!==32)throw new Error("ObjectDigest must be 32 bytes")}}),Te=f.struct("SuiObjectRef",{objectId:V,version:f.u64(),digest:ge}),Xr=f.struct("SharedObjectRef",{objectId:V,initialSharedVersion:f.u64(),mutable:f.bool()}),en=f.enum("ObjectArg",{ImmOrOwnedObject:Te,SharedObject:Xr,Receiving:Te}),Le=f.enum("Owner",{AddressOwner:V,ObjectOwner:V,Shared:f.struct("Shared",{initialSharedVersion:f.u64()}),Immutable:null,ConsensusAddressOwner:f.struct("ConsensusAddressOwner",{startVersion:f.u64(),owner:V})}),wu=f.enum("Reservation",{MaxAmountU64:f.u64()}),Eu=f.enum("WithdrawalType",{Balance:f.lazy(()=>tt)}),Su=f.enum("WithdrawFrom",{Sender:null,Sponsor:null}),xu=f.struct("FundsWithdrawal",{reservation:wu,typeArg:Eu,withdrawFrom:Su}),tn=f.enum("CallArg",{Pure:f.struct("Pure",{bytes:f.byteVector().transform({input:e=>typeof e=="string"?xe(e):e,output:e=>be(new Uint8Array(e))})}),Object:en,FundsWithdrawal:xu}),rn=f.enum("TypeTag",{bool:null,u8:null,u64:null,u128:null,address:null,signer:null,vector:f.lazy(()=>rn),struct:f.lazy(()=>or),u16:null,u32:null,u256:null}),tt=rn.transform({input:e=>typeof e=="string"?Zr.parseFromStr(e,!0):e,output:e=>Zr.tagToString(e)}),Ie=f.enum("Argument",{GasCoin:null,Input:f.u16(),Result:f.u16(),NestedResult:f.tuple([f.u16(),f.u16()])}),nn=f.struct("ProgrammableMoveCall",{package:V,module:f.string(),function:f.string(),typeArguments:f.vector(tt),arguments:f.vector(Ie)}),on=f.enum("Command",{MoveCall:nn,TransferObjects:f.struct("TransferObjects",{objects:f.vector(Ie),address:Ie}),SplitCoins:f.struct("SplitCoins",{coin:Ie,amounts:f.vector(Ie)}),MergeCoins:f.struct("MergeCoins",{destination:Ie,sources:f.vector(Ie)}),Publish:f.struct("Publish",{modules:f.vector(f.byteVector().transform({input:e=>typeof e=="string"?xe(e):e,output:e=>be(new Uint8Array(e))})),dependencies:f.vector(V)}),MakeMoveVec:f.struct("MakeMoveVec",{type:bu(tt).transform({input:e=>e===null?{None:!0}:{Some:e},output:e=>e.Some??null}),elements:f.vector(Ie)}),Upgrade:f.struct("Upgrade",{modules:f.vector(f.byteVector().transform({input:e=>typeof e=="string"?xe(e):e,output:e=>be(new Uint8Array(e))})),dependencies:f.vector(V),package:V,ticket:Ie})}),sn=f.struct("ProgrammableTransaction",{inputs:f.vector(tn),commands:f.vector(on)}),an=f.enum("TransactionKind",{ProgrammableTransaction:sn,ChangeEpoch:null,Genesis:null,ConsensusCommitPrologue:null}),Tu=f.struct("ValidDuring",{minEpoch:f.option(f.u64()),maxEpoch:f.option(f.u64()),minTimestamp:f.option(f.u64()),maxTimestamp:f.option(f.u64()),chain:ge,nonce:f.u32()}),un=f.enum("TransactionExpiration",{None:null,Epoch:vu(),ValidDuring:Tu}),or=f.struct("StructTag",{address:V,module:f.string(),name:f.string(),typeParams:f.vector(rn)}),cn=f.struct("GasData",{payment:f.vector(Te),owner:V,price:f.u64(),budget:f.u64()}),ln=f.struct("TransactionDataV1",{kind:an,sender:V,gasData:cn,expiration:un}),fn=f.enum("TransactionData",{V1:ln}),dn=f.enum("IntentScope",{TransactionData:null,TransactionEffects:null,CheckpointSummary:null,PersonalMessage:null}),pn=f.enum("IntentVersion",{V0:null}),hn=f.enum("AppId",{Sui:null}),mn=f.struct("Intent",{scope:dn,version:pn,appId:hn});function yn(e){return f.struct(`IntentMessage<${e.name}>`,{intent:mn,value:e})}var gn=f.enum("CompressedSignature",{ED25519:f.bytes(64),Secp256k1:f.bytes(64),Secp256r1:f.bytes(64),ZkLogin:f.byteVector(),Passkey:f.byteVector()}),vn=f.enum("PublicKey",{ED25519:f.bytes(32),Secp256k1:f.bytes(33),Secp256r1:f.bytes(33),ZkLogin:f.byteVector(),Passkey:f.bytes(33)}),bn=f.struct("MultiSigPkMap",{pubKey:vn,weight:f.u8()}),wn=f.struct("MultiSigPublicKey",{pk_map:f.vector(bn),threshold:f.u16()}),os=f.struct("MultiSig",{sigs:f.vector(gn),bitmap:f.u16(),multisig_pk:wn}),_u=f.byteVector().transform({input:e=>typeof e=="string"?xe(e):e,output:e=>be(new Uint8Array(e))}),En=f.struct("SenderSignedTransaction",{intentMessage:yn(fn),txSignatures:f.vector(_u)}),is=f.vector(En,{name:"SenderSignedData"}),ss=f.struct("PasskeyAuthenticator",{authenticatorData:f.byteVector(),clientDataJson:f.string(),userSignature:f.byteVector()}),Sn=f.enum("MoveObjectType",{Other:or,GasCoin:null,StakedSui:null,Coin:tt,AccumulatorBalanceWrapper:null}),xn=f.struct("TypeOrigin",{moduleName:f.string(),datatypeName:f.string(),package:V}),Tn=f.struct("UpgradeInfo",{upgradedId:V,upgradedVersion:f.u64()}),_n=f.struct("MovePackage",{id:V,version:f.u64(),moduleMap:f.map(f.string(),f.byteVector()),typeOriginTable:f.vector(xn),linkageTable:f.map(V,Tn)}),On=f.struct("MoveObject",{type:Sn,hasPublicTransfer:f.bool(),version:f.u64(),contents:f.byteVector()}),Rn=f.enum("Data",{Move:On,Package:_n}),as=f.struct("ObjectInner",{data:Rn,owner:Le,previousTransaction:ge,storageRebate:f.u64()});m();v();g();y();var Ou=f.enum("PackageUpgradeError",{UnableToFetchPackage:f.struct("UnableToFetchPackage",{packageId:V}),NotAPackage:f.struct("NotAPackage",{objectId:V}),IncompatibleUpgrade:null,DigestDoesNotMatch:f.struct("DigestDoesNotMatch",{digest:f.byteVector()}),UnknownUpgradePolicy:f.struct("UnknownUpgradePolicy",{policy:f.u8()}),PackageIDDoesNotMatch:f.struct("PackageIDDoesNotMatch",{packageId:V,ticketId:V})}),Ru=f.struct("ModuleId",{address:V,name:f.string()}),us=f.struct("MoveLocation",{module:Ru,function:f.u16(),instruction:f.u16(),functionName:f.option(f.string())}),Pu=f.enum("CommandArgumentError",{TypeMismatch:null,InvalidBCSBytes:null,InvalidUsageOfPureArg:null,InvalidArgumentToPrivateEntryFunction:null,IndexOutOfBounds:f.struct("IndexOutOfBounds",{idx:f.u16()}),SecondaryIndexOutOfBounds:f.struct("SecondaryIndexOutOfBounds",{resultIdx:f.u16(),secondaryIdx:f.u16()}),InvalidResultArity:f.struct("InvalidResultArity",{resultIdx:f.u16()}),InvalidGasCoinUsage:null,InvalidValueUsage:null,InvalidObjectByValue:null,InvalidObjectByMutRef:null,SharedObjectOperationNotAllowed:null,InvalidArgumentArity:null,InvalidTransferObject:null,InvalidMakeMoveVecNonObjectArgument:null,ArgumentWithoutValue:null,CannotMoveBorrowedValue:null,CannotWriteToExtendedReference:null,InvalidReferenceArgument:null}),Au=f.enum("TypeArgumentError",{TypeNotFound:null,ConstraintNotSatisfied:null}),Iu=f.enum("ExecutionFailureStatus",{InsufficientGas:null,InvalidGasObject:null,InvariantViolation:null,FeatureNotYetSupported:null,MoveObjectTooBig:f.struct("MoveObjectTooBig",{objectSize:f.u64(),maxObjectSize:f.u64()}),MovePackageTooBig:f.struct("MovePackageTooBig",{objectSize:f.u64(),maxObjectSize:f.u64()}),CircularObjectOwnership:f.struct("CircularObjectOwnership",{object:V}),InsufficientCoinBalance:null,CoinBalanceOverflow:null,PublishErrorNonZeroAddress:null,SuiMoveVerificationError:null,MovePrimitiveRuntimeError:f.option(us),MoveAbort:f.tuple([us,f.u64()]),VMVerificationOrDeserializationError:null,VMInvariantViolation:null,FunctionNotFound:null,ArityMismatch:null,TypeArityMismatch:null,NonEntryFunctionInvoked:null,CommandArgumentError:f.struct("CommandArgumentError",{argIdx:f.u16(),kind:Pu}),TypeArgumentError:f.struct("TypeArgumentError",{argumentIdx:f.u16(),kind:Au}),UnusedValueWithoutDrop:f.struct("UnusedValueWithoutDrop",{resultIdx:f.u16(),secondaryIdx:f.u16()}),InvalidPublicFunctionReturnType:f.struct("InvalidPublicFunctionReturnType",{idx:f.u16()}),InvalidTransferObject:null,EffectsTooLarge:f.struct("EffectsTooLarge",{currentSize:f.u64(),maxSize:f.u64()}),PublishUpgradeMissingDependency:null,PublishUpgradeDependencyDowngrade:null,PackageUpgradeError:f.struct("PackageUpgradeError",{upgradeError:Ou}),WrittenObjectsTooLarge:f.struct("WrittenObjectsTooLarge",{currentSize:f.u64(),maxSize:f.u64()}),CertificateDenied:null,SuiMoveVerificationTimedout:null,SharedObjectOperationNotAllowed:null,InputObjectDeleted:null,ExecutionCancelledDueToSharedObjectCongestion:f.struct("ExecutionCancelledDueToSharedObjectCongestion",{congested_objects:f.vector(V)}),AddressDeniedForCoin:f.struct("AddressDeniedForCoin",{address:V,coinType:f.string()}),CoinTypeGlobalPause:f.struct("CoinTypeGlobalPause",{coinType:f.string()}),ExecutionCancelledDueToRandomnessUnavailable:null,MoveVectorElemTooBig:f.struct("MoveVectorElemTooBig",{valueSize:f.u64(),maxScaledSize:f.u64()}),MoveRawValueTooBig:f.struct("MoveRawValueTooBig",{valueSize:f.u64(),maxScaledSize:f.u64()}),InvalidLinkage:null,InsufficientBalanceForWithdraw:null,NonExclusiveWriteInputObjectModified:f.struct("NonExclusiveWriteInputObjectModified",{id:V})}),cs=f.enum("ExecutionStatus",{Success:null,Failure:f.struct("Failure",{error:Iu,command:f.option(f.u64())})}),ls=f.struct("GasCostSummary",{computationCost:f.u64(),storageCost:f.u64(),storageRebate:f.u64(),nonRefundableStorageFee:f.u64()}),Cu=f.struct("TransactionEffectsV1",{status:cs,executedEpoch:f.u64(),gasUsed:ls,modifiedAtVersions:f.vector(f.tuple([V,f.u64()])),sharedObjects:f.vector(Te),transactionDigest:ge,created:f.vector(f.tuple([Te,Le])),mutated:f.vector(f.tuple([Te,Le])),unwrapped:f.vector(f.tuple([Te,Le])),deleted:f.vector(Te),unwrappedThenDeleted:f.vector(Te),wrapped:f.vector(Te),gasObject:f.tuple([Te,Le]),eventsDigest:f.option(ge),dependencies:f.vector(ge)}),Pn=f.tuple([f.u64(),ge]),Mu=f.enum("ObjectIn",{NotExist:null,Exist:f.tuple([Pn,Le])}),ju=f.struct("AccumulatorAddress",{address:V,ty:tt}),Du=f.enum("AccumulatorOperation",{Merge:null,Split:null}),Bu=f.enum("AccumulatorValue",{Integer:f.u64(),IntegerTuple:f.tuple([f.u64(),f.u64()]),EventDigest:f.vector(f.tuple([f.u64(),ge]))}),Uu=f.struct("AccumulatorWriteV1",{address:ju,operation:Du,value:Bu}),ku=f.enum("ObjectOut",{NotExist:null,ObjectWrite:f.tuple([ge,Le]),PackageWrite:Pn,AccumulatorWriteV1:Uu}),Nu=f.enum("IDOperation",{None:null,Created:null,Deleted:null}),Lu=f.struct("EffectsObjectChange",{inputState:Mu,outputState:ku,idOperation:Nu}),zu=f.enum("UnchangedConsensusKind",{ReadOnlyRoot:Pn,MutateConsensusStreamEnded:f.u64(),ReadConsensusStreamEnded:f.u64(),Cancelled:f.u64(),PerEpochConfig:null}),qu=f.struct("TransactionEffectsV2",{status:cs,executedEpoch:f.u64(),gasUsed:ls,transactionDigest:ge,gasObjectIndex:f.option(f.u32()),eventsDigest:f.option(ge),dependencies:f.vector(ge),lamportVersion:f.u64(),changedObjects:f.vector(f.tuple([V,Lu])),unchangedConsensusObjects:f.vector(f.tuple([V,zu])),auxDataDigest:f.option(ge)}),fs=f.enum("TransactionEffects",{V1:Cu,V2:qu});var An={...f,U8:f.u8(),U16:f.u16(),U32:f.u32(),U64:f.u64(),U128:f.u128(),U256:f.u256(),ULEB128:f.uleb128(),Bool:f.bool(),String:f.string(),Address:V,AppId:hn,Argument:Ie,CallArg:tn,Command:on,CompressedSignature:gn,Data:Rn,GasData:cn,Intent:mn,IntentMessage:yn,IntentScope:dn,IntentVersion:pn,MoveObject:On,MoveObjectType:Sn,MovePackage:_n,MultiSig:os,MultiSigPkMap:bn,MultiSigPublicKey:wn,Object:as,ObjectArg:en,ObjectDigest:ge,Owner:Le,PasskeyAuthenticator:ss,ProgrammableMoveCall:nn,ProgrammableTransaction:sn,PublicKey:vn,SenderSignedData:is,SenderSignedTransaction:En,SharedObjectRef:Xr,StructTag:or,SuiObjectRef:Te,TransactionData:fn,TransactionDataV1:ln,TransactionEffects:fs,TransactionExpiration:un,TransactionKind:an,TypeOrigin:xn,TypeTag:tt,UpgradeInfo:Tn};m();v();g();y();m();v();g();y();var Qu=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},Fu=function(e,t,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ir;function ds(e){let t=({register:r})=>r(e);try{globalThis.dispatchEvent(new In(t))}catch(r){console.error(`wallet-standard:register-wallet event could not be dispatched
|
|
`,r)}try{globalThis.addEventListener("wallet-standard:app-ready",({detail:r})=>t(r))}catch(r){console.error(`wallet-standard:app-ready event listener could not be added
|
|
`,r)}}var In=class extends Event{get detail(){return Qu(this,ir,"f")}get type(){return"wallet-standard:register-wallet"}constructor(t){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),ir.set(this,void 0),Fu(this,ir,t,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}};ir=new WeakMap;m();v();g();y();var bt=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},wt=function(e,t,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},sr,ar,ur,cr,lr,fr,dr=class e{get address(){return bt(this,sr,"f")}get publicKey(){return bt(this,ar,"f").slice()}get chains(){return bt(this,ur,"f").slice()}get features(){return bt(this,cr,"f").slice()}get label(){return bt(this,lr,"f")}get icon(){return bt(this,fr,"f")}constructor(t){sr.set(this,void 0),ar.set(this,void 0),ur.set(this,void 0),cr.set(this,void 0),lr.set(this,void 0),fr.set(this,void 0),new.target===e&&Object.freeze(this),wt(this,sr,t.address,"f"),wt(this,ar,t.publicKey.slice(),"f"),wt(this,ur,t.chains.slice(),"f"),wt(this,cr,t.features.slice(),"f"),wt(this,lr,t.label,"f"),wt(this,fr,t.icon,"f")}};sr=new WeakMap,ar=new WeakMap,ur=new WeakMap,cr=new WeakMap,lr=new WeakMap,fr=new WeakMap;m();v();g();y();var ps="sui:devnet",hs="sui:testnet",ms="sui:localnet",ys="sui:mainnet",pr=[ps,hs,ms,ys];function dt(e){return pr.includes(e)}m();v();g();y();m();v();g();y();var $u=Object.create,gs=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,vs=Object.getOwnPropertyNames,Hu=Object.getPrototypeOf,Wu=Object.prototype.hasOwnProperty,Ce=(e,t)=>function(){return t||(0,e[vs(e)[0]])((t={exports:{}}).exports,t),t.exports},Gu=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=vs(t),u=0,s=i.length,l;u<s;u++)l=i[u],!Wu.call(e,l)&&l!==r&&gs(e,l,{get:(d=>t[d]).bind(null,l),enumerable:!(o=Vu(t,l))||o.enumerable});return e},ee=(e,t,r)=>(r=e!=null?$u(Hu(e)):{},Gu(t||!e||!e.__esModule?gs(r,"default",{value:e,enumerable:!0}):r,e)),bs=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(o){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,r(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ku=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=bs().default;function o(i,u){if(r(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var l=s.call(i,u||"default");if(r(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(i)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),Yu=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=bs().default,o=Ku();function i(u){var s=o(u,"string");return r(s)=="symbol"?s:s+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),ze=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=Yu();function o(i,u,s){return(u=r(u))in i?Object.defineProperty(i,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[u]=s,i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),he=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=ze();function o(u,s){var l=Object.keys(u);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(u);s&&(d=d.filter(function(w){return Object.getOwnPropertyDescriptor(u,w).enumerable})),l.push.apply(l,d)}return l}function i(u){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?o(Object(l),!0).forEach(function(d){r(u,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(l)):o(Object(l)).forEach(function(d){Object.defineProperty(u,d,Object.getOwnPropertyDescriptor(l,d))})}return u}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});m();v();g();y();m();v();g();y();m();v();g();y();function Pe(e){let t={subscribe(r){let o=null,i=!1,u=!1,s=!1;function l(){if(o===null){s=!0;return}u||(u=!0,typeof o=="function"?o():o&&o.unsubscribe())}return o=e({next(d){var w;i||(w=r.next)===null||w===void 0||w.call(r,d)},error(d){var w;i||(i=!0,(w=r.error)===null||w===void 0||w.call(r,d),l())},complete(){var d;i||(i=!0,(d=r.complete)===null||d===void 0||d.call(r),l())}}),s&&l(),{unsubscribe:l}},pipe(...r){return r.reduce(Ju,t)}};return t}function Ju(e,t){return t(e)}function Cn(e){let t=new AbortController;return new Promise((o,i)=>{let u=!1;function s(){u||(u=!0,l.unsubscribe())}t.signal.addEventListener("abort",()=>{i(t.signal.reason)});let l=e.subscribe({next(d){u=!0,o(d),s()},error(d){i(d)},complete(){t.abort(),s()}})})}m();v();g();y();function Mn(e){return t=>{let r=0,o=null,i=[];function u(){o||(o=t.subscribe({next(l){for(let w of i){var d;(d=w.next)===null||d===void 0||d.call(w,l)}},error(l){for(let w of i){var d;(d=w.error)===null||d===void 0||d.call(w,l)}},complete(){for(let d of i){var l;(l=d.complete)===null||l===void 0||l.call(d)}}}))}function s(){if(r===0&&o){let l=o;o=null,l.unsubscribe()}}return Pe(l=>(r++,i.push(l),u(),{unsubscribe(){r--,s();let d=i.findIndex(w=>w===l);d>-1&&i.splice(d,1)}}))}}function jn(e){return t=>Pe(r=>t.subscribe({next(o){var i;(i=e.next)===null||i===void 0||i.call(e,o),r.next(o)},error(o){var i;(i=e.error)===null||i===void 0||i.call(e,o),r.error(o)},complete(){var o;(o=e.complete)===null||o===void 0||o.call(e),r.complete()}}))}var Gp=Symbol();function hr(e){let t=e,r=[],o=s=>{t!==void 0&&s.next(t),r.push(s)},i=s=>{r.splice(r.indexOf(s),1)},u=Pe(s=>(o(s),()=>{i(s)}));return u.next=s=>{if(t!==s){t=s;for(let l of r)l.next(s)}},u.get=()=>t,u}function ws(e){return Pe(t=>{function r(i=0,u=e.op){let s=e.links[i];if(!s)throw new Error("No more links to execute - did you forget to add an ending link?");return s({op:u,next(d){return r(i+1,d)}})}return r().subscribe(t)})}m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();var Dt={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};var Es=[Dt.BAD_GATEWAY,Dt.SERVICE_UNAVAILABLE,Dt.GATEWAY_TIMEOUT,Dt.INTERNAL_SERVER_ERROR];function Me(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}var Zu=typeof Symbol=="function"&&!!Symbol.asyncIterator;function Bt(e){return Zu&&Me(e)&&Symbol.asyncIterator in e}var Xu=Object.create,xs=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,Ts=Object.getOwnPropertyNames,tc=Object.getPrototypeOf,rc=Object.prototype.hasOwnProperty,Ut=(e,t)=>function(){return t||(0,e[Ts(e)[0]])((t={exports:{}}).exports,t),t.exports},nc=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Ts(t),u=0,s=i.length,l;u<s;u++)l=i[u],!rc.call(e,l)&&l!==r&&xs(e,l,{get:(d=>t[d]).bind(null,l),enumerable:!(o=ec(t,l))||o.enumerable});return e},kt=(e,t,r)=>(r=e!=null?Xu(tc(e)):{},nc(t||!e||!e.__esModule?xs(r,"default",{value:e,enumerable:!0}):r,e)),_s=()=>{},Ss=e=>{Object.freeze&&Object.freeze(e)};function Os(e,t,r){var o;let i=t.join(".");return(o=r[i])!==null&&o!==void 0||(r[i]=new Proxy(_s,{get(u,s){if(!(typeof s!="string"||s==="then"))return Os(e,[...t,s],r)},apply(u,s,l){let d=t[t.length-1],w={args:l,path:t};return d==="call"?w={args:l.length>=2?[l[1]]:[],path:t.slice(0,-1)}:d==="apply"&&(w={args:l.length>=2?l[1]:[],path:t.slice(0,-1)}),Ss(w.args),Ss(w.path),e(w)}})),r[i]}var rt=e=>Os(e,[],Object.create(null)),pt=e=>new Proxy(_s,{get(t,r){if(r!=="then")return e(r)}});var Rs=Ut({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(o){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,r(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),oc=Ut({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=Rs().default;function o(i,u){if(r(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var l=s.call(i,u||"default");if(r(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(i)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),ic=Ut({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=Rs().default,o=oc();function i(u){var s=o(u,"string");return r(s)=="symbol"?s:s+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Dn=Ut({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=ic();function o(i,u,s){return(u=r(u))in i?Object.defineProperty(i,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[u]=s,i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),mr=Ut({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=Dn();function o(u,s){var l=Object.keys(u);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(u);s&&(d=d.filter(function(w){return Object.getOwnPropertyDescriptor(u,w).enumerable})),l.push.apply(l,d)}return l}function i(u){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?o(Object(l),!0).forEach(function(d){r(u,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(l)):o(Object(l)).forEach(function(d){Object.defineProperty(u,d,Object.getOwnPropertyDescriptor(l,d))})}return u}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),xh=kt(mr(),1);m();v();g();y();var Ch=kt(Dn(),1);var yr=kt(mr(),1);function cc(e,t){if("error"in e){let o=t.deserialize(e.error);return{ok:!1,error:(0,yr.default)((0,yr.default)({},e),{},{error:o})}}return{ok:!0,result:(0,yr.default)((0,yr.default)({},e.result),(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)})}}var Bn=class extends Error{constructor(){super("Unable to transform response from server")}};function Un(e,t){let r;try{r=cc(e,t)}catch{throw new Bn}if(!r.ok&&(!Me(r.error.error)||typeof r.error.error.code!="number"))throw new Bn;if(r.ok&&!Me(r.result))throw new Bn;return r}var Mh=kt(mr(),1);var jh=Symbol();var gr=ee(ze(),1),Et=ee(he(),1);function Ps(e){return e instanceof Ke}function dc(e){return Me(e)&&Me(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function pc(e,t){return typeof e=="string"?e:Me(e)&&typeof e.message=="string"?e.message:t}var Ke=class vr extends Error{constructor(t,r){var o,i;let u=r?.cause;super(t,{cause:u}),(0,gr.default)(this,"cause",void 0),(0,gr.default)(this,"shape",void 0),(0,gr.default)(this,"data",void 0),(0,gr.default)(this,"meta",void 0),this.meta=r?.meta,this.cause=u,this.shape=r==null||(o=r.result)===null||o===void 0?void 0:o.error,this.data=r==null||(i=r.result)===null||i===void 0?void 0:i.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,vr.prototype)}static from(t,r={}){let o=t;return Ps(o)?(r.meta&&(o.meta=(0,Et.default)((0,Et.default)({},o.meta),r.meta)),o):dc(o)?new vr(o.error.message,(0,Et.default)((0,Et.default)({},r),{},{result:o})):new vr(pc(o,"Unknown error"),(0,Et.default)((0,Et.default)({},r),{},{cause:o}))}};m();v();g();y();m();v();g();y();function St(e){let t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}var Um=ee(he(),1);m();v();g();y();var Hm=ee(he(),1);m();v();g();y();var ty=ee(he(),1);m();v();g();y();var je=ee(he(),1);function mc(e){return typeof FormData>"u"?!1:e instanceof FormData}var kn={css:{query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},ansi:{regular:{query:["\x1B[30;46m","\x1B[97;46m"],mutation:["\x1B[30;45m","\x1B[97;45m"],subscription:["\x1B[30;42m","\x1B[97;42m"]},bold:{query:["\x1B[1;30;46m","\x1B[1;97;46m"],mutation:["\x1B[1;30;45m","\x1B[1;97;45m"],subscription:["\x1B[1;30;42m","\x1B[1;97;42m"]}}};function yc(e){let{direction:t,type:r,withContext:o,path:i,id:u,input:s}=e,l=[],d=[];if(e.colorMode==="none")l.push(t==="up"?">>":"<<",r,`#${u}`,i);else if(e.colorMode==="ansi"){let[w,S]=kn.ansi.regular[r],[A,C]=kn.ansi.bold[r];l.push(t==="up"?w:S,t==="up"?">>":"<<",r,t==="up"?A:C,`#${u}`,i,"\x1B[0m")}else{let[w,S]=kn.css[r],A=`
|
|
background-color: #${t==="up"?w:S};
|
|
color: ${t==="up"?"black":"white"};
|
|
padding: 2px;
|
|
`;l.push("%c",t==="up"?">>":"<<",r,`#${u}`,`%c${i}%c`,"%O"),d.push(A,`${A}; font-weight: bold;`,`${A}; font-weight: normal;`)}return t==="up"?d.push(o?{input:s,context:e.context}:{input:s}):d.push((0,je.default)({input:s,result:e.result,elapsedMs:e.elapsedMs},o&&{context:e.context})),{parts:l,args:d}}var gc=({c:e=console,colorMode:t="css",withContext:r})=>o=>{let i=o.input,u=mc(i)?Object.fromEntries(i):i,{parts:s,args:l}=yc((0,je.default)((0,je.default)({},o),{},{colorMode:t,input:u,withContext:r})),d=o.direction==="down"&&o.result&&(o.result instanceof Error||"error"in o.result.result&&o.result.result.error)?"error":"log";e[d].apply(null,[s.join(" ")].concat(l))};function Nn(e={}){var t,r;let{enabled:o=()=>!0}=e,i=(t=e.colorMode)!==null&&t!==void 0?t:typeof globalThis>"u"?"ansi":"css",u=(r=e.withContext)!==null&&r!==void 0?r:i==="css",{logger:s=gc({c:e.console,colorMode:i,withContext:u})}=e;return()=>({op:l,next:d})=>Pe(w=>{o((0,je.default)((0,je.default)({},l),{},{direction:"up"}))&&s((0,je.default)((0,je.default)({},l),{},{direction:"up"}));let S=Date.now();function A(C){let P=Date.now()-S;o((0,je.default)((0,je.default)({},l),{},{direction:"down",result:C}))&&s((0,je.default)((0,je.default)({},l),{},{direction:"down",elapsedMs:P,result:C}))}return d(l).pipe(jn({next(C){A(C)},error(C){A(C)}})).subscribe(w)})}m();v();g();y();var zn=(e,...t)=>typeof e=="function"?e(...t):e,vy=ee(ze(),1);function vc(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}async function bc(e){let t=await zn(e.url);if(!e.connectionParams)return t;let o=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+o}async function wc(e){let t={method:"connectionParams",data:await zn(e)};return JSON.stringify(t)}var by=ee(ze(),1);var ht=ee(ze(),1);function Ec(e){let{promise:t,resolve:r,reject:o}=vc();return e.addEventListener("open",()=>{e.removeEventListener("error",o),r()}),e.addEventListener("error",o),t}function Sc(e,{intervalMs:t,pongTimeoutMs:r}){let o,i;function u(){o=setTimeout(()=>{e.send("PING"),i=setTimeout(()=>{e.close()},r)},t)}function s(){clearTimeout(o),u()}function l(){clearTimeout(i),s()}e.addEventListener("open",u),e.addEventListener("message",({data:d})=>{clearTimeout(o),u(),d==="PONG"&&l()}),e.addEventListener("close",()=>{clearTimeout(o),clearTimeout(i)})}var xc=class Ln{constructor(t){var r;if((0,ht.default)(this,"id",++Ln.connectCount),(0,ht.default)(this,"WebSocketPonyfill",void 0),(0,ht.default)(this,"urlOptions",void 0),(0,ht.default)(this,"keepAliveOpts",void 0),(0,ht.default)(this,"wsObservable",hr(null)),(0,ht.default)(this,"openPromise",null),this.WebSocketPonyfill=(r=t.WebSocketPonyfill)!==null&&r!==void 0?r:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++Ln.connectCount;let r=bc(t.urlOptions).then(o=>new t.WebSocketPonyfill(o));t.openPromise=r.then(async o=>{t.ws=o,o.addEventListener("message",function({data:i}){i==="PING"&&this.send("PONG")}),t.keepAliveOpts.enabled&&Sc(o,t.keepAliveOpts),o.addEventListener("close",()=>{t.ws===o&&(t.ws=null)}),await Ec(o),t.urlOptions.connectionParams&&o.send(await wc(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var t=this;try{await t.openPromise}finally{var r;(r=t.ws)===null||r===void 0||r.close()}}};(0,ht.default)(xc,"connectCount",0);var wy=ee(ze(),1),Ey=ee(he(),1);var qn=ee(ze(),1),Cs=ee(he(),1),Nt=class{constructor(e){(0,qn.default)(this,"links",void 0),(0,qn.default)(this,"runtime",void 0),(0,qn.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(t=>t(this.runtime))}$request(e){var t;return ws({links:this.links,op:(0,Cs.default)((0,Cs.default)({},e),{},{context:(t=e.context)!==null&&t!==void 0?t:{},id:++this.requestId})}).pipe(Mn())}async requestAsPromise(e){var t=this;try{let r=t.$request(e);return(await Cn(r)).result.data}catch(r){throw Ke.from(r)}}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r.context,signal:r.signal}).subscribe({next(i){switch(i.result.type){case"state":{var u;(u=r.onConnectionStateChange)===null||u===void 0||u.call(r,i.result);break}case"started":{var s;(s=r.onStarted)===null||s===void 0||s.call(r,{context:i.context});break}case"stopped":{var l;(l=r.onStopped)===null||l===void 0||l.call(r);break}case"data":case void 0:{var d;(d=r.onData)===null||d===void 0||d.call(r,i.result.data);break}}},error(i){var u;(u=r.onError)===null||u===void 0||u.call(r,i)},complete(){var i;(i=r.onComplete)===null||i===void 0||i.call(r)}})}};var Ms=Symbol.for("trpc_untypedClient"),Tc={query:"query",mutate:"mutation",subscribe:"subscription"},_c=e=>Tc[e];function Qn(e){let t=rt(({path:r,args:o})=>{let i=[...r],u=_c(i.pop()),s=i.join(".");return e[u](s,...o)});return pt(r=>r===Ms?e:t[r])}function br(e){let t=new Nt(e);return Qn(t)}function wr(e){return e[Ms]}var og=ee(he(),1);var ig=ee(he(),1);var Oc=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function r(i){var u,s,l,d=2;for(typeof Symbol<"u"&&(s=Symbol.asyncIterator,l=Symbol.iterator);d--;){if(s&&(u=i[s])!=null)return u.call(i);if(l&&(u=i[l])!=null)return new o(u.call(i));s="@@asyncIterator",l="@@iterator"}throw new TypeError("Object is not async iterable")}function o(i){function u(s){if(Object(s)!==s)return Promise.reject(new TypeError(s+" is not an object."));var l=s.done;return Promise.resolve(s.value).then(function(d){return{value:d,done:l}})}return o=function(l){this.s=l,this.n=l.next},o.prototype={s:null,n:null,next:function(){return u(this.n.apply(this.s,arguments))},return:function(l){var d=this.s.return;return d===void 0?Promise.resolve({value:l,done:!0}):u(d.apply(this.s,arguments))},throw:function(l){var d=this.s.return;return d===void 0?Promise.reject(l):u(d.apply(this.s,arguments))}},new o(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),sg=ee(Oc(),1);var ag=ee(he(),1);var Rc=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function r(){var o=typeof SuppressedError=="function"?SuppressedError:function(l,d){var w=Error();return w.name="SuppressedError",w.error=l,w.suppressed=d,w},i={},u=[];function s(l,d){if(d!=null){if(Object(d)!==d)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(l)var w=d[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(w===void 0&&(w=d[Symbol.dispose||Symbol.for("Symbol.dispose")],l))var S=w;if(typeof w!="function")throw new TypeError("Object is not disposable.");S&&(w=function(){try{S.call(d)}catch(C){return Promise.reject(C)}}),u.push({v:d,d:w,a:l})}else l&&u.push({d,a:l});return d}return{e:i,u:s.bind(null,!1),a:s.bind(null,!0),d:function(){var d,w=this.e,S=0;function A(){for(;d=u.pop();)try{if(!d.a&&S===1)return S=0,u.push(d),Promise.resolve().then(A);if(d.d){var P=d.d.call(d.v);if(d.a)return S|=2,Promise.resolve(P).then(A,C)}else S|=1}catch(R){return C(R)}if(S===1)return w!==i?Promise.reject(w):Promise.resolve();if(w!==i)throw w}function C(P){return w=w!==i?new o(P,w):P,A()}return A()}}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),js=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function r(o,i){this.v=o,this.k=i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Pc=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var r=js();function o(i){return new r(i,0)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ac=Ce({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var r=js();function o(u){return function(){return new i(u.apply(this,arguments))}}function i(u){var s,l;function d(S,A){try{var C=u[S](A),P=C.value,R=P instanceof r;Promise.resolve(R?P.v:P).then(function(j){if(R){var N=S==="return"?"return":"next";if(!P.k||j.done)return d(N,j);j=u[N](j).value}w(C.done?"return":"normal",j)},function(j){d("throw",j)})}catch(j){w("throw",j)}}function w(S,A){switch(S){case"return":s.resolve({value:A,done:!0});break;case"throw":s.reject(A);break;default:s.resolve({value:A,done:!1})}(s=s.next)?d(s.key,s.arg):l=null}this._invoke=function(S,A){return new Promise(function(C,P){var R={key:S,arg:A,resolve:C,reject:P,next:null};l?l=l.next=R:(s=l=R,d(S,A))})},typeof u.return!="function"&&(this.return=void 0)}i.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(u){return this._invoke("next",u)},i.prototype.throw=function(u){return this._invoke("throw",u)},i.prototype.return=function(u){return this._invoke("return",u)},t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),ug=ee(Rc(),1),cg=ee(Pc(),1),lg=ee(Ac(),1),fg=ee(he(),1);m();v();g();y();var Ds="@trpc/request",Fn="@trpc/response";var Bs="@apps/wallet-state-changed";m();v();g();y();function Us(){let e=new Map;return{on(t,r){let o=i=>{i instanceof CustomEvent&&r(i.detail)};globalThis.addEventListener(t,o),e.has(t)||e.set(t,new Map),e.get(t).set(r,o)},off(t,r){let o=e.get(t)?.get(r);o&&globalThis.removeEventListener(t,o)},emit(t,r){globalThis.dispatchEvent(new CustomEvent(t,{detail:r}))}}}m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();m();v();g();y();var qe=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};m();v();g();y();var Qe=typeof globalThis>"u"||"Deno"in globalThis;function Ls(){}function Vn(e){return typeof e=="number"&&e>=0&&e!==1/0}function zs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Lt(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function xt(e){return JSON.stringify(e,(t,r)=>$n(r)?Object.keys(r).sort().reduce((o,i)=>(o[i]=r[i],o),{}):r)}function zt(e,t){if(e===t)return e;let r=ks(e)&&ks(t);if(r||$n(e)&&$n(t)){let o=r?e:Object.keys(e),i=o.length,u=r?t:Object.keys(t),s=u.length,l=r?[]:{},d=0;for(let w=0;w<s;w++){let S=r?w:u[w];(!r&&o.includes(S)||r)&&e[S]===void 0&&t[S]===void 0?(l[S]=void 0,d++):(l[S]=zt(e[S],t[S]),l[S]===e[S]&&e[S]!==void 0&&d++)}return i===s&&d===i?e:l}return t}function Tt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $n(e){if(!Ns(e))return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(!Ns(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ns(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hn(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(0)try{}catch(o){}return zt(e,t)}return t}function qs(e,t,r=0){let o=[...e,t];return r&&o.length>r?o.slice(1):o}function Qs(e,t,r=0){let o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}var _e=Symbol();function Fs(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===_e?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ic=class extends qe{#t;#e;#r;constructor(){super(),this.#r=e=>{if(!Qe&&globalThis.addEventListener){let t=()=>e();return globalThis.addEventListener("visibilitychange",t,!1),()=>{globalThis.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},$s=new Ic;m();v();g();y();var Cc=class extends qe{#t=!0;#e;#r;constructor(){super(),this.#r=e=>{if(!Qe&&globalThis.addEventListener){let t=()=>e(!0),r=()=>e(!1);return globalThis.addEventListener("online",t,!1),globalThis.addEventListener("offline",r,!1),()=>{globalThis.removeEventListener("online",t),globalThis.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},Vs=new Cc;m();v();g();y();function Wn(){let e,t,r=new Promise((i,u)=>{e=i,t=u});r.status="pending",r.catch(()=>{});function o(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{o({status:"fulfilled",value:i}),e(i)},r.reject=i=>{o({status:"rejected",reason:i}),t(i)},r}function Hs(e){return(e??"online")==="online"?Vs.isOnline():!0}m();v();g();y();m();v();g();y();function Mc(){let e=[],t=0,r=l=>{l()},o=l=>{l()},i=l=>setTimeout(l,0),u=l=>{t?e.push(l):i(()=>{r(l)})},s=()=>{let l=e;e=[],l.length&&i(()=>{o(()=>{l.forEach(d=>{r(d)})})})};return{batch:l=>{let d;t++;try{d=l()}finally{t--,t||s()}return d},batchCalls:l=>(...d)=>{u(()=>{l(...d)})},schedule:u,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{o=l},setScheduler:l=>{i=l}}}var Oe=Mc();function Ws(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hs(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}m();v();g();y();function Gs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}m();v();g();y();function Kn(e){return{onFetch:(t,r)=>{let o=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],s=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},d=0,w=async()=>{let S=!1,A=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(t.signal.aborted?S=!0:t.signal.addEventListener("abort",()=>{S=!0}),t.signal)})},C=Fs(t.options,t.fetchOptions),P=async(R,j,N)=>{if(S)return Promise.reject();if(j==null&&R.pages.length)return Promise.resolve(R);let J={queryKey:t.queryKey,pageParam:j,direction:N?"backward":"forward",meta:t.options.meta};A(J);let Z=await C(J),{maxPages:ue}=t.options,pe=N?Qs:qs;return{pages:pe(R.pages,Z,ue),pageParams:pe(R.pageParams,j,ue)}};if(i&&u.length){let R=i==="backward",j=R?Ks:Gn,N={pages:u,pageParams:s},J=j(o,N);l=await P(N,J,R)}else{let R=e??u.length;do{let j=d===0?s[0]??o.initialPageParam:Gn(o,l);if(d>0&&j==null)break;l=await P(l,j),d++}while(d<R)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(w,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=w}}}function Gn(e,{pages:t,pageParams:r}){let o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,r[o],r):void 0}function Ks(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function Ys(e,t){return t?Gn(e,t)!=null:!1}function Js(e,t){return!t||!e.getPreviousPageParam?!1:Ks(e,t)!=null}m();v();g();y();var Be=class extends qe{constructor(e,t){super(),this.options=t,this.#t=e,this.#s=null,this.#a=Wn(),this.options.experimental_prefetchInRender||this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#r=void 0;#n=void 0;#o;#i;#a;#s;#f;#c;#l;#u;#p;#d;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Zs(this.#e,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Yn(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Yn(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#E(),this.#e.removeObserver(this)}setOptions(e,t){let r=this.options,o=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#e.setOptions(this.options),r._defaulted&&!Tt(this.options,r)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});let i=this.hasListeners();i&&Xs(this.#e,o,this.options,r)&&this.#h(),this.updateResult(t),i&&(this.#e!==o||De(this.options.enabled,this.#e)!==De(r.enabled,this.#e)||Lt(this.options.staleTime,this.#e)!==Lt(r.staleTime,this.#e))&&this.#y();let u=this.#g();i&&(this.#e!==o||De(this.options.enabled,this.#e)!==De(r.enabled,this.#e)||u!==this.#d)&&this.#v(u)}getOptimisticResult(e){let t=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(t,e);return Dc(this,r)&&(this.#n=r,this.#i=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(e,t){let r={};return Object.keys(e).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),t?.(o),e[o])})}),r}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#h(e){this.#S();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ls)),t}#y(){this.#w();let e=Lt(this.options.staleTime,this.#e);if(Qe||this.#n.isStale||!Vn(e))return;let r=zs(this.#n.dataUpdatedAt,e)+1;this.#u=setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#E(),this.#d=e,!(Qe||De(this.options.enabled,this.#e)===!1||!Vn(this.#d)||this.#d===0)&&(this.#p=setInterval(()=>{(this.options.refetchIntervalInBackground||$s.isFocused())&&this.#h()},this.#d))}#b(){this.#y(),this.#v(this.#g())}#w(){this.#u&&(clearTimeout(this.#u),this.#u=void 0)}#E(){this.#p&&(clearInterval(this.#p),this.#p=void 0)}createResult(e,t){let r=this.#e,o=this.options,i=this.#n,u=this.#o,s=this.#i,d=e!==r?e.state:this.#r,{state:w}=e,S={...w},A=!1,C;if(t._optimisticResults){let M=this.hasListeners(),O=!M&&Zs(e,t),B=M&&Xs(e,r,t,o);(O||B)&&(S={...S,...Ws(w.data,e.options)}),t._optimisticResults==="isRestoring"&&(S.fetchStatus="idle")}let{error:P,errorUpdatedAt:R,status:j}=S;if(t.select&&S.data!==void 0)if(i&&S.data===u?.data&&t.select===this.#f)C=this.#c;else try{this.#f=t.select,C=t.select(S.data),C=Hn(i?.data,C,t),this.#c=C,this.#s=null}catch(M){this.#s=M}else C=S.data;if(t.placeholderData!==void 0&&C===void 0&&j==="pending"){let M;if(i?.isPlaceholderData&&t.placeholderData===s?.placeholderData)M=i.data;else if(M=typeof t.placeholderData=="function"?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,t.select&&M!==void 0)try{M=t.select(M),this.#s=null}catch(O){this.#s=O}M!==void 0&&(j="success",C=Hn(i?.data,M,t),A=!0)}this.#s&&(P=this.#s,C=this.#c,R=Date.now(),j="error");let N=S.fetchStatus==="fetching",J=j==="pending",Z=j==="error",ue=J&&N,pe=C!==void 0,D={status:j,fetchStatus:S.fetchStatus,isPending:J,isSuccess:j==="success",isError:Z,isInitialLoading:ue,isLoading:ue,data:C,dataUpdatedAt:S.dataUpdatedAt,error:P,errorUpdatedAt:R,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>d.dataUpdateCount||S.errorUpdateCount>d.errorUpdateCount,isFetching:N,isRefetching:N&&!J,isLoadingError:Z&&!pe,isPaused:S.fetchStatus==="paused",isPlaceholderData:A,isRefetchError:Z&&pe,isStale:Jn(e,t),refetch:this.refetch,promise:this.#a};if(this.options.experimental_prefetchInRender){let M=U=>{D.status==="error"?U.reject(D.error):D.data!==void 0&&U.resolve(D.data)},O=()=>{let U=this.#a=D.promise=Wn();M(U)},B=this.#a;switch(B.status){case"pending":e.queryHash===r.queryHash&&M(B);break;case"fulfilled":(D.status==="error"||D.data!==B.value)&&O();break;case"rejected":(D.status!=="error"||D.error!==B.reason)&&O();break}}return D}updateResult(e){let t=this.#n,r=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#i=this.options,this.#o.data!==void 0&&(this.#l=this.#e),Tt(r,t))return;this.#n=r;let o={},i=()=>{if(!t)return!0;let{notifyOnChangeProps:u}=this.options,s=typeof u=="function"?u():u;if(s==="all"||!s&&!this.#m.size)return!0;let l=new Set(s??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#n).some(d=>{let w=d;return this.#n[w]!==t[w]&&l.has(w)})};e?.listeners!==!1&&i()&&(o.listeners=!0),this.#x({...o,...e})}#S(){let e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;let t=this.#e;this.#e=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){Oe.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function jc(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zs(e,t){return jc(e,t)||e.state.data!==void 0&&Yn(e,t,t.refetchOnMount)}function Yn(e,t,r){if(De(t.enabled,e)!==!1){let o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&Jn(e,t)}return!1}function Xs(e,t,r,o){return(e!==t||De(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Jn(e,r)}function Jn(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(Lt(t.staleTime,e))}function Dc(e,t){return!Tt(e.getCurrentResult(),t)}m();v();g();y();function ea(e,t){return e.filter(r=>!t.includes(r))}function Bc(e,t,r){let o=e.slice(0);return o[t]=r,o}var Zn=class extends qe{#t;#e;#r;#n;#o;#i;#a;#s;constructor(e,t,r){super(),this.#t=e,this.#n=r,this.#r=[],this.#o=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#o.forEach(e=>{e.subscribe(t=>{this.#l(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#o.forEach(e=>{e.destroy()})}setQueries(e,t,r){this.#r=e,this.#n=t,Oe.batch(()=>{let o=this.#o,i=this.#c(this.#r);i.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions,r));let u=i.map(d=>d.observer),s=u.map(d=>d.getCurrentResult()),l=u.some((d,w)=>d!==o[w]);o.length===u.length&&!l||(this.#o=u,this.#e=s,this.hasListeners()&&(ea(o,u).forEach(d=>{d.destroy()}),ea(u,o).forEach(d=>{d.subscribe(w=>{this.#l(d,w)})}),this.#u()))})}getCurrentResult(){return this.#e}getQueries(){return this.#o.map(e=>e.getCurrentQuery())}getObservers(){return this.#o}getOptimisticResult(e,t){let r=this.#c(e),o=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>this.#f(i??o,t),()=>r.map((i,u)=>{let s=o[u];return i.defaultedQueryOptions.notifyOnChangeProps?s:i.observer.trackResult(s,l=>{r.forEach(d=>{d.observer.trackProp(l)})})})]}#f(e,t){return t?((!this.#i||this.#e!==this.#s||t!==this.#a)&&(this.#a=t,this.#s=this.#e,this.#i=zt(this.#i,t(e))),this.#i):e}#c(e){let t=new Map(this.#o.map(o=>[o.options.queryHash,o])),r=[];return e.forEach(o=>{let i=this.#t.defaultQueryOptions(o),u=t.get(i.queryHash);if(u)r.push({defaultedQueryOptions:i,observer:u});else{let s=this.#o.find(l=>l.options.queryHash===i.queryHash);r.push({defaultedQueryOptions:i,observer:s??new Be(this.#t,i)})}}),r.sort((o,i)=>e.findIndex(u=>u.queryHash===o.defaultedQueryOptions.queryHash)-e.findIndex(u=>u.queryHash===i.defaultedQueryOptions.queryHash))}#l(e,t){let r=this.#o.indexOf(e);r!==-1&&(this.#e=Bc(this.#e,r,t),this.#u())}#u(){if(this.hasListeners()){let e=this.#i,t=this.#f(this.#e,this.#n?.combine);e!==t&&Oe.batch(()=>{this.listeners.forEach(r=>{r(this.#e)})})}}};m();v();g();y();var qt=class extends Be{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Kn()},t)}getOptimisticResult(e){return e.behavior=Kn(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,o=super.createResult(e,t),{isFetching:i,isRefetching:u,isError:s,isRefetchError:l}=o,d=r.fetchMeta?.fetchMore?.direction,w=s&&d==="forward",S=i&&d==="forward",A=s&&d==="backward",C=i&&d==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Ys(t,r.data),hasPreviousPage:Js(t,r.data),isFetchNextPageError:w,isFetchingNextPage:S,isFetchPreviousPageError:A,isFetchingPreviousPage:C,isRefetchError:l&&!w&&!A,isRefetching:u&&!S&&!C}}};m();v();g();y();var Xn=class extends qe{#t;#e=void 0;#r;#n;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#t.defaultMutationOptions(e),Tt(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&xt(t.mutationKey)!==xt(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#i(e)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#i()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(e)}#o(){let e=this.#r?.state??Gs();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#i(e){Oe.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#e.variables,r=this.#e.context;e?.type==="success"?(this.#n.onSuccess?.(e.data,t,r),this.#n.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#n.onError?.(e.error,t,r),this.#n.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(t=>{t(this.#e)})})}};m();v();g();y();var $e=Se(Ae(),1);m();v();g();y();var Qt=Se(Ae(),1),Xc=Se(xr(),1),el=Qt.createContext(void 0),Fe=e=>{let t=Qt.useContext(el);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t};m();v();g();y();var Tr=Se(Ae(),1),ga=Tr.createContext(!1),_r=()=>Tr.useContext(ga),ub=ga.Provider;m();v();g();y();var Ft=Se(Ae(),1),tl=Se(xr(),1);function rl(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nl=Ft.createContext(rl()),Or=()=>Ft.useContext(nl);m();v();g();y();var va=Se(Ae(),1);m();v();g();y();function Rr(e,t){return typeof e=="function"?e(...t):!!e}function Pr(){}var Ar=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Ir=e=>{va.useEffect(()=>{e.clearReset()},[e])},Cr=({result:e,errorResetBoundary:t,throwOnError:r,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&Rr(r,[e.error,o]);m();v();g();y();var Rt=(e,t)=>t.state.data===void 0,Mr=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},jr=(e,t)=>e.isLoading&&e.isFetching&&!t,$t=(e,t)=>e?.suspense&&t.isPending,Pt=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Vt({queries:e,...t},r){let o=Fe(r),i=_r(),u=Or(),s=$e.useMemo(()=>e.map(R=>{let j=o.defaultQueryOptions(R);return j._optimisticResults=i?"isRestoring":"optimistic",j}),[e,o,i]);s.forEach(R=>{Mr(R),Ar(R,u)}),Ir(u);let[l]=$e.useState(()=>new Zn(o,s,t)),[d,w,S]=l.getOptimisticResult(s,t.combine);$e.useSyncExternalStore($e.useCallback(R=>i?()=>{}:l.subscribe(Oe.batchCalls(R)),[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),$e.useEffect(()=>{l.setQueries(s,t,{listeners:!1})},[s,t,l]);let C=d.some((R,j)=>$t(s[j],R))?d.flatMap((R,j)=>{let N=s[j];if(N){let J=new Be(o,N);if($t(N,R))return Pt(N,J,u);jr(R,i)&&Pt(N,J,u)}return[]}):[];if(C.length>0)throw Promise.all(C);let P=d.find((R,j)=>{let N=s[j];return N&&Cr({result:R,errorResetBoundary:u,throwOnError:N.throwOnError,query:o.getQueryCache().get(N.queryHash)})});if(P?.error)throw P.error;return w(S())}m();v();g();y();m();v();g();y();var nt=Se(Ae(),1);function ot(e,t,r){let o=Fe(r),i=_r(),u=Or(),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=i?"isRestoring":"optimistic",Mr(s),Ar(s,u),Ir(u);let l=!o.getQueryCache().get(s.queryHash),[d]=nt.useState(()=>new t(o,s)),w=d.getOptimisticResult(s);if(nt.useSyncExternalStore(nt.useCallback(S=>{let A=i?()=>{}:d.subscribe(Oe.batchCalls(S));return d.updateResult(),A},[d,i]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),nt.useEffect(()=>{d.setOptions(s,{listeners:!1})},[s,d]),$t(s,w))throw Pt(s,d,u);if(Cr({result:w,errorResetBoundary:u,throwOnError:s.throwOnError,query:o.getQueryCache().get(s.queryHash)}))throw w.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,w),s.experimental_prefetchInRender&&!Qe&&jr(w,i)&&(l?Pt(s,d,u):o.getQueryCache().get(s.queryHash)?.promise)?.catch(Pr).finally(()=>{d.hasListeners()||d.updateResult()}),s.notifyOnChangeProps?w:d.trackResult(w)}function so(e,t){return ot(e,Be,t)}m();v();g();y();function ao(e,t){return ot({...e,enabled:!0,suspense:!0,throwOnError:Rt,placeholderData:void 0},Be,t)}m();v();g();y();function uo(e,t){return ot({...e,enabled:!0,suspense:!0,throwOnError:Rt},qt,t)}m();v();g();y();function co(e,t){return Vt({...e,queries:e.queries.map(r=>({...r,suspense:!0,throwOnError:Rt,enabled:!0,placeholderData:void 0}))},t)}m();v();g();y();function lo(e,t){let r=Fe(t);r.getQueryState(e.queryKey)||r.prefetchQuery(e)}m();v();g();y();function fo(e,t){let r=Fe(t);r.getQueryState(e.queryKey)||r.prefetchInfiniteQuery(e)}m();v();g();y();var Ye=Se(Ae(),1);function po(e,t){let r=Fe(t),[o]=Ye.useState(()=>new Xn(r,e));Ye.useEffect(()=>{o.setOptions(e)},[o,e]);let i=Ye.useSyncExternalStore(Ye.useCallback(s=>o.subscribe(Oe.batchCalls(s)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=Ye.useCallback((s,l)=>{o.mutate(s,l).catch(Pr)},[o]);if(i.error&&Rr(o.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}m();v();g();y();function ho(e,t){return ot(e,qt,t)}var ol=Object.create,wa=Object.defineProperty,il=Object.getOwnPropertyDescriptor,Ea=Object.getOwnPropertyNames,sl=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty,Je=(e,t)=>function(){return t||(0,e[Ea(e)[0]])((t={exports:{}}).exports,t),t.exports},ul=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Ea(t),u=0,s=i.length,l;u<s;u++)l=i[u],!al.call(e,l)&&l!==r&&wa(e,l,{get:(d=>t[d]).bind(null,l),enumerable:!(o=il(t,l))||o.enumerable});return e},it=(e,t,r)=>(r=e!=null?ol(sl(e)):{},ul(t||!e||!e.__esModule?wa(r,"default",{value:e,enumerable:!0}):r,e)),cl=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function r(o,i){if(o==null)return{};var u={};for(var s in o)if({}.hasOwnProperty.call(o,s)){if(i.includes(s))continue;u[s]=o[s]}return u}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ll=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var r=cl();function o(i,u){if(i==null)return{};var s,l,d=r(i,u);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(l=0;l<w.length;l++)s=w[l],u.includes(s)||{}.propertyIsEnumerable.call(i,s)&&(d[s]=i[s])}return d}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),Sa=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(o){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,r(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),fl=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=Sa().default;function o(i,u){if(r(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var l=s.call(i,u||"default");if(r(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(i)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),dl=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=Sa().default,o=fl();function i(u){var s=o(u,"string");return r(s)=="symbol"?s:s+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),pl=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=dl();function o(i,u,s){return(u=r(u))in i?Object.defineProperty(i,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[u]=s,i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),At=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=pl();function o(u,s){var l=Object.keys(u);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(u);s&&(d=d.filter(function(w){return Object.getOwnPropertyDescriptor(u,w).enumerable})),l.push.apply(l,d)}return l}function i(u){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?o(Object(l),!0).forEach(function(d){r(u,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(l)):o(Object(l)).forEach(function(d){Object.defineProperty(u,d,Object.getOwnPropertyDescriptor(l,d))})}return u}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),hl=it(ll(),1),ba=it(At(),1),ml=["cursor","direction"];function Ue(e,t,r){let o=e.flatMap(i=>i.split("."));if(!t&&(!r||r==="any"))return o.length?[o]:[];if(r==="infinite"&&Me(t)&&("direction"in t||"cursor"in t)){let{cursor:i,direction:u}=t,s=(0,hl.default)(t,ml);return[o,{input:s,type:"infinite"}]}return[o,(0,ba.default)((0,ba.default)({},typeof t<"u"&&t!==_e&&{input:t}),r&&r!=="any"&&{type:r})]}function Ht(e){return Ue(e,void 0,"any")}m();v();g();y();var vo=Se(Ae(),1),_a=Se(Ae(),1),de=Se(Ae(),1),Oa=Se(xr(),1);function Ra(e){return rt(({path:t,args:r})=>{var o;let i=[...t],u=i.pop();if(u==="useMutation")return e[u](i,...r);if(u==="_def")return{path:i};let[s,...l]=r,d=(o=l[0])!==null&&o!==void 0?o:{};return e[u](i,s,d)})}var mo,yl=["client","ssrContext","ssrState","abortOnUnmount"],gl=(mo=vo.createContext)===null||mo===void 0?void 0:mo.call(vo,null),vl=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function bl(e){return rt(t=>{let r=[...t.path],o=r.pop(),i=[...t.args],u=i.shift(),s=vl(o),l=Ue(r,u,s);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(r,l,i[0]),queryOptions:()=>e.queryOptions(r,l,...i),fetch:()=>e.fetchQuery(l,...i),fetchInfinite:()=>e.fetchInfiniteQuery(l,i[0]),prefetch:()=>e.prefetchQuery(l,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(l,i[0]),ensureData:()=>e.ensureQueryData(l,...i),invalidate:()=>e.invalidateQueries(l,...i),reset:()=>e.resetQueries(l,...i),refetch:()=>e.refetchQueries(l,...i),cancel:()=>e.cancelQuery(l,...i),setData:()=>{e.setQueryData(l,i[0],i[1])},setQueriesData:()=>e.setQueriesData(l,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(l,i[0],i[1])},getData:()=>e.getQueryData(l),getInfiniteData:()=>e.getInfiniteQueryData(l),setMutationDefaults:()=>e.setMutationDefaults(Ht(r),u),getMutationDefaults:()=>e.getMutationDefaults(Ht(r)),isMutating:()=>e.isMutating({mutationKey:Ht(r)})}[o]()})}function Pa(e){let t=Qn(e.client),r=bl(e);return pt(o=>{let i=o;return i==="client"?t:yl.includes(i)?e[i]:r[o]})}var wl=it(At(),1);function xa(e){let t=e instanceof Nt?e:wr(e);return rt(r=>{let o=r.path,i=o.join("."),[u,s]=r.args;return(0,wl.default)({queryKey:Ue(o,u,"query"),queryFn:()=>t.query(i,u,s?.trpc)},s)})}var yo=it(At(),1);function we(e,t,r){var o;let i=e[0],u=(o=e[1])===null||o===void 0?void 0:o.input;if(r){var s;u=(0,yo.default)((0,yo.default)((0,yo.default)({},(s=u)!==null&&s!==void 0?s:{}),r.pageParam?{cursor:r.pageParam}:{}),{},{direction:r.direction})}return[i.join("."),u,t?.trpc]}var El=Je({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function r(i){var u,s,l,d=2;for(typeof Symbol<"u"&&(s=Symbol.asyncIterator,l=Symbol.iterator);d--;){if(s&&(u=i[s])!=null)return u.call(i);if(l&&(u=i[l])!=null)return new o(u.call(i));s="@@asyncIterator",l="@@iterator"}throw new TypeError("Object is not async iterable")}function o(i){function u(s){if(Object(s)!==s)return Promise.reject(new TypeError(s+" is not an object."));var l=s.done;return Promise.resolve(s.value).then(function(d){return{value:d,done:l}})}return o=function(l){this.s=l,this.n=l.next},o.prototype={s:null,n:null,next:function(){return u(this.n.apply(this.s,arguments))},return:function(l){var d=this.s.return;return d===void 0?Promise.resolve({value:l,done:!0}):u(d.apply(this.s,arguments))},throw:function(l){var d=this.s.return;return d===void 0?Promise.reject(l):u(d.apply(this.s,arguments))}},new o(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Sl=it(El(),1);function go(e){return{path:e.path.join(".")}}function Wt(e){let t=go(e);return _a.useMemo(()=>t,[t])}async function Aa(e,t,r){let i=t.getQueryCache().build(t,{queryKey:r});i.setState({data:[],status:"success"});let u=[];var s=!1,l=!1,d;try{for(var w=(0,Sl.default)(e),S;s=!(S=await w.next()).done;s=!1){let A=S.value;u.push(A),i.setState({data:[...u]})}}catch(A){l=!0,d=A}finally{try{s&&w.return!=null&&await w.return()}finally{if(l)throw d}}return u}var H=it(At(),1);function Ia(e){let{client:t,queryClient:r}=e,o=t instanceof Nt?t:wr(t);return{infiniteQueryOptions:(i,u,s)=>{var l,d;let w=((l=u[1])===null||l===void 0?void 0:l.input)===_e,S=async A=>{var C;let P=(0,H.default)((0,H.default)({},s),{},{trpc:(0,H.default)((0,H.default)({},s?.trpc),!(s==null||(C=s.trpc)===null||C===void 0)&&C.abortOnUnmount?{signal:A.signal}:{signal:null})});return await o.query(...we(u,P,{direction:A.direction,pageParam:A.pageParam}))};return Object.assign((0,H.default)((0,H.default)({},s),{},{initialData:s?.initialData,queryKey:u,queryFn:w?_e:S,initialPageParam:(d=s?.initialCursor)!==null&&d!==void 0?d:null}),{trpc:go({path:i})})},queryOptions:(i,u,s)=>{var l;let d=((l=u[1])===null||l===void 0?void 0:l.input)===_e,w=async S=>{var A;let C=(0,H.default)((0,H.default)({},s),{},{trpc:(0,H.default)((0,H.default)({},s?.trpc),!(s==null||(A=s.trpc)===null||A===void 0)&&A.abortOnUnmount?{signal:S.signal}:{signal:null})}),P=await o.query(...we(u,C));return Bt(P)?Aa(P,r,u):P};return Object.assign((0,H.default)((0,H.default)({},s),{},{initialData:s?.initialData,queryKey:u,queryFn:d?_e:w}),{trpc:go({path:i})})},fetchQuery:(i,u)=>r.fetchQuery((0,H.default)((0,H.default)({},u),{},{queryKey:i,queryFn:()=>o.query(...we(i,u))})),fetchInfiniteQuery:(i,u)=>{var s;return r.fetchInfiniteQuery((0,H.default)((0,H.default)({},u),{},{queryKey:i,queryFn:({pageParam:l,direction:d})=>o.query(...we(i,u,{pageParam:l,direction:d})),initialPageParam:(s=u?.initialCursor)!==null&&s!==void 0?s:null}))},prefetchQuery:(i,u)=>r.prefetchQuery((0,H.default)((0,H.default)({},u),{},{queryKey:i,queryFn:()=>o.query(...we(i,u))})),prefetchInfiniteQuery:(i,u)=>{var s;return r.prefetchInfiniteQuery((0,H.default)((0,H.default)({},u),{},{queryKey:i,queryFn:({pageParam:l,direction:d})=>o.query(...we(i,u,{pageParam:l,direction:d})),initialPageParam:(s=u?.initialCursor)!==null&&s!==void 0?s:null}))},ensureQueryData:(i,u)=>r.ensureQueryData((0,H.default)((0,H.default)({},u),{},{queryKey:i,queryFn:()=>o.query(...we(i,u))})),invalidateQueries:(i,u,s)=>r.invalidateQueries((0,H.default)((0,H.default)({},u),{},{queryKey:i}),s),resetQueries:(i,u,s)=>r.resetQueries((0,H.default)((0,H.default)({},u),{},{queryKey:i}),s),refetchQueries:(i,u,s)=>r.refetchQueries((0,H.default)((0,H.default)({},u),{},{queryKey:i}),s),cancelQuery:(i,u)=>r.cancelQueries({queryKey:i},u),setQueryData:(i,u,s)=>r.setQueryData(i,u,s),setQueriesData:(i,u,s,l)=>r.setQueriesData((0,H.default)((0,H.default)({},u),{},{queryKey:i}),s,l),getQueryData:i=>r.getQueryData(i),setInfiniteQueryData:(i,u,s)=>r.setQueryData(i,u,s),getInfiniteQueryData:i=>r.getQueryData(i),setMutationDefaults:(i,u)=>{let s=i[0],l=d=>o.mutation(...we([s,{input:d}],e));return r.setMutationDefaults(i,typeof u=="function"?u({canonicalMutationFn:l}):u)},getMutationDefaults:i=>r.getMutationDefaults(i),isMutating:i=>r.isMutating((0,H.default)((0,H.default)({},i),{},{exact:!0}))}}var I=it(At()),Ta=(e,t)=>new Proxy(e,{get(o,i){return t(i),o[i]}});function Ca(e){var t,r,o;let i=(t=e==null||(r=e.overrides)===null||r===void 0||(r=r.useMutation)===null||r===void 0?void 0:r.onSuccess)!==null&&t!==void 0?t:D=>D.originalFn(),u=(o=e?.context)!==null&&o!==void 0?o:gl,s=br,l=D=>{var M;let{abortOnUnmount:O=!1,queryClient:B,ssrContext:U}=D,[L,z]=de.useState((M=D.ssrState)!==null&&M!==void 0?M:!1),k=D.client instanceof Nt?D.client:wr(D.client),W=de.useMemo(()=>Ia({client:k,queryClient:B}),[k,B]),$=de.useMemo(()=>(0,I.default)({abortOnUnmount:O,queryClient:B,client:k,ssrContext:U??null,ssrState:L},W),[O,k,W,B,U,L]);return de.useEffect(()=>{z(X=>X?"mounted":!1)},[]),(0,Oa.jsx)(u.Provider,{value:$,children:D.children})};function d(){let D=de.useContext(u);if(!D)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return D}function w(D,M){var O;let{queryClient:B,ssrState:U}=d();return U&&U!=="mounted"&&((O=B.getQueryCache().find({queryKey:D}))===null||O===void 0?void 0:O.state.status)==="error"?(0,I.default)({retryOnMount:!1},M):M}function S(D,M,O){var B,U,L,z,k;let W=d(),{abortOnUnmount:$,client:X,ssrState:G,queryClient:te,prefetchQuery:ne}=W,Q=Ue(D,M,"query"),oe=te.getQueryDefaults(Q),ae=M===_e;typeof globalThis>"u"&&G==="prepass"&&(O==null||(B=O.trpc)===null||B===void 0?void 0:B.ssr)!==!1&&((U=O?.enabled)!==null&&U!==void 0?U:oe?.enabled)!==!1&&!ae&&!te.getQueryCache().find({queryKey:Q})&&ne(Q,O);let ve=w(Q,(0,I.default)((0,I.default)({},oe),O)),Y=(L=(z=O==null||(k=O.trpc)===null||k===void 0?void 0:k.abortOnUnmount)!==null&&z!==void 0?z:e?.abortOnUnmount)!==null&&L!==void 0?L:$,K=so((0,I.default)((0,I.default)({},ve),{},{queryKey:Q,queryFn:ae?M:async fe=>{let Ee=(0,I.default)((0,I.default)({},ve),{},{trpc:(0,I.default)((0,I.default)({},ve?.trpc),Y?{signal:fe.signal}:{signal:null})}),st=await X.query(...we(Q,Ee));return Bt(st)?Aa(st,te,Q):st}}),te);return K.trpc=Wt({path:D}),K}function A(D,M,O){var B,U,L;let z=d(),k=Ue(D,M,"query"),W=M===_e,$=(B=(U=O==null||(L=O.trpc)===null||L===void 0?void 0:L.abortOnUnmount)!==null&&U!==void 0?U:e?.abortOnUnmount)!==null&&B!==void 0?B:z.abortOnUnmount;lo((0,I.default)((0,I.default)({},O),{},{queryKey:k,queryFn:W?M:X=>{let G={trpc:(0,I.default)((0,I.default)({},O?.trpc),$?{signal:X.signal}:{})};return z.client.query(...we(k,G))}}))}function C(D,M,O){var B,U,L;let z=d(),k=Ue(D,M,"query"),W=(B=(U=O==null||(L=O.trpc)===null||L===void 0?void 0:L.abortOnUnmount)!==null&&U!==void 0?U:e?.abortOnUnmount)!==null&&B!==void 0?B:z.abortOnUnmount,$=ao((0,I.default)((0,I.default)({},O),{},{queryKey:k,queryFn:X=>{let G=(0,I.default)((0,I.default)({},O),{},{trpc:(0,I.default)((0,I.default)({},O?.trpc),W?{signal:X.signal}:{signal:null})});return z.client.query(...we(k,G))}}),z.queryClient);return $.trpc=Wt({path:D}),[$.data,$]}function P(D,M){let{client:O,queryClient:B}=d(),U=Ht(D),L=B.defaultMutationOptions(B.getMutationDefaults(U)),z=po((0,I.default)((0,I.default)({},M),{},{mutationKey:U,mutationFn:k=>O.mutation(...we([D,{input:k}],M)),onSuccess(...k){var W,$;return i({originalFn:()=>{var G,te,ne;return(G=M==null||(te=M.onSuccess)===null||te===void 0?void 0:te.call(M,...k))!==null&&G!==void 0?G:L==null||(ne=L.onSuccess)===null||ne===void 0?void 0:ne.call(L,...k)},queryClient:B,meta:(W=($=M?.meta)!==null&&$!==void 0?$:L?.meta)!==null&&W!==void 0?W:{}})}}),B);return z.trpc=Wt({path:D}),z}let R={data:void 0,error:null,status:"idle"},j={data:void 0,error:null,status:"connecting"};function N(D,M,O){var B;let U=(B=O?.enabled)!==null&&B!==void 0?B:M!==_e,L=xt(Ue(D,M,"any")),{client:z}=d(),k=de.useRef(O);de.useEffect(()=>{k.current=O});let[W]=de.useState(new Set([])),$=de.useCallback(ae=>{W.add(ae)},[W]),X=de.useRef(null),G=de.useCallback(ae=>{let ve=ne.current,Y=ne.current=ae(ve),K=!1;for(let fe of W)if(ve[fe]!==Y[fe]){K=!0;break}K&&oe(Ta(Y,$))},[$,W]),te=de.useCallback(()=>{var ae;if((ae=X.current)===null||ae===void 0||ae.unsubscribe(),!U){G(()=>(0,I.default)((0,I.default)({},R),{},{reset:te}));return}G(()=>(0,I.default)((0,I.default)({},j),{},{reset:te}));let ve=z.subscription(D.join("."),M??void 0,{onStarted:()=>{var Y,K;(Y=(K=k.current).onStarted)===null||Y===void 0||Y.call(K),G(fe=>(0,I.default)((0,I.default)({},fe),{},{status:"pending",error:null}))},onData:Y=>{var K,fe;(K=(fe=k.current).onData)===null||K===void 0||K.call(fe,Y),G(Ee=>(0,I.default)((0,I.default)({},Ee),{},{status:"pending",data:Y,error:null}))},onError:Y=>{var K,fe;(K=(fe=k.current).onError)===null||K===void 0||K.call(fe,Y),G(Ee=>(0,I.default)((0,I.default)({},Ee),{},{status:"error",error:Y}))},onConnectionStateChange:Y=>{G(K=>{switch(Y.state){case"idle":return(0,I.default)((0,I.default)({},K),{},{status:Y.state,error:null,data:void 0});case"connecting":return(0,I.default)((0,I.default)({},K),{},{error:Y.error,status:Y.state});case"pending":return K}})},onComplete:()=>{var Y,K;(Y=(K=k.current).onComplete)===null||Y===void 0||Y.call(K),G(fe=>(0,I.default)((0,I.default)({},fe),{},{status:"idle",error:null,data:void 0}))}});X.current=ve},[z,L,U,G]);de.useEffect(()=>(te(),()=>{var ae;(ae=X.current)===null||ae===void 0||ae.unsubscribe()}),[te]);let ne=de.useRef(U?(0,I.default)((0,I.default)({},j),{},{reset:te}):(0,I.default)((0,I.default)({},R),{},{reset:te})),[Q,oe]=de.useState(Ta(ne.current,$));return Q}function J(D,M,O){var B,U,L,z,k;let{client:W,ssrState:$,prefetchInfiniteQuery:X,queryClient:G,abortOnUnmount:te}=d(),ne=Ue(D,M,"infinite"),Q=G.getQueryDefaults(ne),oe=M===_e;typeof globalThis>"u"&&$==="prepass"&&(O==null||(B=O.trpc)===null||B===void 0?void 0:B.ssr)!==!1&&((U=O?.enabled)!==null&&U!==void 0?U:Q?.enabled)!==!1&&!oe&&!G.getQueryCache().find({queryKey:ne})&&X(ne,(0,I.default)((0,I.default)({},Q),O));let ae=w(ne,(0,I.default)((0,I.default)({},Q),O)),ve=(L=O==null||(z=O.trpc)===null||z===void 0?void 0:z.abortOnUnmount)!==null&&L!==void 0?L:te,Y=ho((0,I.default)((0,I.default)({},ae),{},{initialPageParam:(k=O.initialCursor)!==null&&k!==void 0?k:null,persister:O.persister,queryKey:ne,queryFn:oe?M:K=>{var fe;let Ee=(0,I.default)((0,I.default)({},ae),{},{trpc:(0,I.default)((0,I.default)({},ae?.trpc),ve?{signal:K.signal}:{signal:null})});return W.query(...we(ne,Ee,{pageParam:(fe=K.pageParam)!==null&&fe!==void 0?fe:O.initialCursor,direction:K.direction}))}}),G);return Y.trpc=Wt({path:D}),Y}function Z(D,M,O){var B,U,L;let z=d(),k=Ue(D,M,"infinite"),W=z.queryClient.getQueryDefaults(k),$=M===_e,X=w(k,(0,I.default)((0,I.default)({},W),O)),G=(B=O==null||(U=O.trpc)===null||U===void 0?void 0:U.abortOnUnmount)!==null&&B!==void 0?B:z.abortOnUnmount;fo((0,I.default)((0,I.default)({},O),{},{initialPageParam:(L=O.initialCursor)!==null&&L!==void 0?L:null,queryKey:k,queryFn:$?M:te=>{var ne;let Q=(0,I.default)((0,I.default)({},X),{},{trpc:(0,I.default)((0,I.default)({},X?.trpc),G?{signal:te.signal}:{})});return z.client.query(...we(k,Q,{pageParam:(ne=te.pageParam)!==null&&ne!==void 0?ne:O.initialCursor,direction:te.direction}))}}))}function ue(D,M,O){var B,U,L;let z=d(),k=Ue(D,M,"infinite"),W=z.queryClient.getQueryDefaults(k),$=w(k,(0,I.default)((0,I.default)({},W),O)),X=(B=O==null||(U=O.trpc)===null||U===void 0?void 0:U.abortOnUnmount)!==null&&B!==void 0?B:z.abortOnUnmount,G=uo((0,I.default)((0,I.default)({},O),{},{initialPageParam:(L=O.initialCursor)!==null&&L!==void 0?L:null,queryKey:k,queryFn:te=>{var ne;let Q=(0,I.default)((0,I.default)({},$),{},{trpc:(0,I.default)((0,I.default)({},$?.trpc),X?{signal:te.signal}:{})});return z.client.query(...we(k,Q,{pageParam:(ne=te.pageParam)!==null&&ne!==void 0?ne:O.initialCursor,direction:te.direction}))}}),z.queryClient);return G.trpc=Wt({path:D}),[G.data,G]}return{Provider:l,createClient:s,useContext:d,useUtils:d,useQuery:S,usePrefetchQuery:A,useSuspenseQuery:C,useQueries:(D,M)=>{let{ssrState:O,queryClient:B,prefetchQuery:U,client:L}=d(),z=xa(L),k=D(z);if(typeof globalThis>"u"&&O==="prepass")for(let $ of k){var W;let X=$;((W=X.trpc)===null||W===void 0?void 0:W.ssr)!==!1&&!B.getQueryCache().find({queryKey:X.queryKey})&&U(X.queryKey,X)}return Vt({queries:k.map($=>(0,I.default)((0,I.default)({},$),{},{queryKey:$.queryKey})),combine:M?.combine},B)},useSuspenseQueries:D=>{let{queryClient:M,client:O}=d(),B=xa(O),U=D(B),L=co({queries:U.map(z=>(0,I.default)((0,I.default)({},z),{},{queryFn:z.queryFn,queryKey:z.queryKey}))},M);return[L.map(z=>z.data),L]},useMutation:P,useSubscription:N,useInfiniteQuery:J,usePrefetchInfiniteQuery:Z,useSuspenseInfiniteQuery:ue}}var Ma=Se(Ae(),1);function xl(e){let t=Ra(e);return pt(r=>r==="useContext"||r==="useUtils"?()=>{let o=e.useUtils();return Ma.useMemo(()=>Pa(o),[o])}:e.hasOwnProperty(r)?e[r]:t[r])}function ja(e){let t=Ca(e);return xl(t)}m();v();g();y();m();v();g();y();function bo({emitter:e,...t}){let r=St(t.transformer);return()=>({op:o})=>Pe(i=>{let u=[],{id:s,type:l,path:d}=o;if(l==="subscription")throw new Error("Subscriptions are unsupported by `eventsLink`.");try{let w=r.input.serialize(o.input),S=A=>{if(!A||!("id"in A)||A.id===null||A.id===void 0||s!==A.id)return;let C=Un(A,r.output);if(!C.ok){i.error(Ke.from(C.error));return}i.next({result:C.result}),i.complete()};e.on(Fn,S),u.push(()=>e.off(Fn,S)),e.emit(Ds,{id:s,jsonrpc:void 0,method:l,params:{path:d,input:w}})}catch(w){i.error(new Ke(w instanceof Error?w.message:"Unknown error"))}return()=>{u.forEach(w=>w())}})}var wS=ja();m();v();g();y();m();v();g();y();function Da(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map(function(i){i(r)}),(o=e.get("*"))&&o.slice().map(function(i){i(t,r)})}}}m();v();g();y();var Ba={devnet:"sui:devnet",testnet:"sui:testnet",localnet:"sui:localnet",mainnet:"sui:mainnet"};var Gt=`A valid Sui chain identifier was not provided in the request. Please report this issue to the dApp developer.
|
|
|
|
Examples of valid Sui chain identifiers are 'sui:testnet' and 'sui:mainnet'. Consider using the '@mysten/dapp-kit' package, which provides this value automatically.`,Dr=class{#t;#e;#r;constructor(t){this.#t=t,this.#e=Da(),this.#r=[],this.#t.onWalletStateChanged(r=>{this.#r=r.map(this.#u),this.#e.emit("change",{accounts:this.#r})})}get version(){return"1.0.0"}get id(){return"com.mystenlabs.suiwallet"}get name(){return"Slush"}get icon(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAgMjRDMCAxMC43NDUyIDEwLjc0NTIgMCAyNCAwQzM3LjI1NDggMCA0OCAxMC43NDUyIDQ4IDI0QzQ4IDM3LjI1NDggMzcuMjU0OCA0OCAyNCA0OEMxMC43NDUyIDQ4IDAgMzcuMjU0OCAwIDI0WiIgZmlsbD0iIzBDMEExRiIvPgo8cGF0aCBkPSJNMTMuMTM1OCAzMi4xMDg1QzE0LjE3MDEgMzUuOTY4MyAxOC4wMzMxIDM5LjQ2MjQgMjYuMDI1NSAzNy4zMjA4QzMzLjY1MTUgMzUuMjc3NCAzOC40MzA5IDI5LjAwNCAzNy4xOTE2IDI0LjM3ODlDMzYuNzYzNiAyMi43ODE3IDM1LjQ3NDYgMjEuNzAwNiAzMy40ODcyIDIxLjg3NjVMMTUuNzE2NSAyMy4zNTcyQzE0LjU5NzMgMjMuNDQzIDE0LjA4NDIgMjMuMjU5NiAxMy43ODgxIDIyLjU1NDNDMTMuNTAxIDIxLjg4MjMgMTMuNjY0NiAyMS4xNjA5IDE1LjAxNjMgMjAuNDc3N0wyOC41NDAxIDEzLjUzNzRDMjkuNTc2NyAxMy4wMSAzMC4yNjcxIDEyLjc4OTMgMzAuODk4IDEzLjAxMjZDMzEuMjkzNCAxMy4xNTYzIDMxLjU1MzggMTMuNzI4NCAzMS4zMTQ3IDE0LjQzNDRMMzAuNDM3OCAxNy4wMjMyQzI5LjM2MTcgMjAuMjAwMiAzMS42NjUzIDIwLjkzODIgMzIuOTY0MSAyMC41OTAyQzM0LjkyODkgMjAuMDYzNyAzNS4zOTExIDE4LjE5MjMgMzQuNzU4MSAxNS44Mjk5QzMzLjE1MzMgOS44NDA1NCAyNi43OTkgOC45MDQxMSAyMS4wMzc4IDEwLjQ0NzhDMTUuMTc2NyAxMi4wMTgzIDEwLjA5NiAxNi43Njc2IDExLjY0NzQgMjIuNTU3M0MxMi4wMTI5IDIzLjkyMTYgMTMuMjY4NyAyNS4wMTE2IDE0LjcyMzIgMjQuOTc4NUwxNi45NDM4IDI0Ljk3MzFDMTcuNDAwNCAyNC45NjI1IDE3LjIzNiAyNSAxOC4xMTcgMjQuOTI3MUMxOC45OTggMjQuODU0MSAyMS4zNTA5IDI0LjU2NDYgMjEuMzUwOSAyNC41NjQ2TDMyLjg5NjIgMjMuMjU4TDMzLjE5MzcgMjMuMjE0OEMzMy44Njg5IDIzLjA5OTcgMzQuMzc5MiAyMy4yNzUgMzQuODEwNiAyNC4wMTgzQzM1LjQ1NjMgMjUuMTMwNCAzNC40NzEyIDI1Ljk2OTEgMzMuMjkyIDI2Ljk3MzFDMzMuMjYwNSAyNyAzMy4yMjg4IDI3LjAyNyAzMy4xOTcgMjcuMDU0MUwyMy4wNDgyIDM1LjgwMDVDMjEuMzA4NyAzNy4zMDA4IDIwLjA4NjcgMzYuNzM2NyAxOS42NTg4IDM1LjEzOTVMMTguMTQzMSAyOS40ODI5QzE3Ljc2ODcgMjguMDg1NCAxNi40MDQxIDI2Ljk4ODkgMTQuODA1NiAyNy40MTcyQzEyLjgwNzUgMjcuOTUyNiAxMi42NDU1IDMwLjI3ODQgMTMuMTM1OCAzMi4xMDg1WiIgZmlsbD0iI0ZCRkFGRiIvPgo8L3N2Zz4K"}get chains(){return pr}get features(){return{"standard:connect":{version:"1.0.0",connect:this.#n},"standard:disconnect":{version:"1.0.0",disconnect:this.#o},"standard:events":{version:"1.0.0",on:this.#i},"sui:signAndExecuteTransactionBlock":{version:"1.0.0",signAndExecuteTransactionBlock:this.#a},"sui:signTransactionBlock":{version:"1.0.0",signTransactionBlock:this.#s},"sui:signPersonalMessage":{version:"1.1.0",signPersonalMessage:this.#l},"sui:signAndExecuteTransaction":{version:"2.0.0",signAndExecuteTransaction:this.#f},"sui:signTransaction":{version:"2.0.0",signTransaction:this.#c}}}get accounts(){return this.#r}#n=async t=>{let r=await this.#t.connect({silent:t?.silent??!1});return this.#r=r.map(this.#u),this.#r.length>0&&this.#e.emit("change",{accounts:this.accounts}),{accounts:this.#r}};#o=async()=>{this.#r=[],this.#e.emit("change",{accounts:this.accounts}),await this.#t.disconnect()};#i=(t,r)=>(this.#e.on(t,r),()=>this.#e.off(t,r));#a=async t=>{if(!dt(t.chain))throw new Error(Gt);return await this.#t.signAndExecuteTransactionBlock({serializedBytes:t.transactionBlock.serialize(),accountAddress:t.account.address,requestType:t.requestType,options:t.options,chain:t.chain})};#s=async t=>{if(!dt(t.chain))throw new Error(Gt);let r=await this.#t.signTransactionBlock({serializedBytes:t.transactionBlock.serialize(),accountAddress:t.account.address,chain:t.chain});return{signature:r.signature,transactionBlockBytes:r.bytes}};#f=async t=>{if(!dt(t.chain))throw new Error(Gt);let{digest:r,rawEffects:o,rawTransaction:i}=await this.#t.signAndExecuteTransactionBlock({serializedBytes:await t.transaction.toJSON(),accountAddress:t.account.address,chain:t.chain,options:{showRawEffects:!0,showRawInput:!0}}),[{txSignatures:[u],intentMessage:{value:s}}]=An.SenderSignedData.parse(xe(i)),l=An.TransactionData.serialize(s).toBase64();return{digest:r,effects:be(new Uint8Array(o)),signature:u,bytes:l}};#c=async t=>{if(!dt(t.chain))throw new Error(Gt);let r=await this.#t.signTransactionBlock({serializedBytes:await t.transaction.toJSON(),accountAddress:t.account.address,chain:t.chain});return{signature:r.signature,bytes:r.bytes}};#l=async t=>{let r=t.chain??Ba.mainnet;if(!dt(r))throw new Error(Gt);return await this.#t.signPersonalMessage({serializedBytes:be(t.message),accountAddress:t.account.address,chain:r})};#u({address:t,nickname:r,publicKey:o,chains:i}){return new dr({address:t,label:r||void 0,publicKey:o?xe(o):new Uint8Array,chains:i,features:["sui:signTransaction","sui:signAndExecuteTransaction","sui:signTransactionBlock","sui:signAndExecuteTransactionBlock","sui:signPersonalMessage"]})}};var Ua=Us(),It=br({links:[Nn({enabled:e=>e.direction==="down"&&e.result instanceof Error||!1}),bo({emitter:Ua})]});ds(new Dr({disconnect:It.dApp.disconnect.mutate,connect:It.dApp.connect.query,signAndExecuteTransactionBlock:It.dApp.signAndExecuteTransactionBlock.mutate,signTransactionBlock:It.dApp.signTransactionBlock.mutate,signPersonalMessage:It.dApp.signPersonalMessage.mutate,onWalletStateChanged:e=>{Ua.on(Bs,async()=>{let t=await It.dApp.connect.query({silent:!0});return e(t)})}}));var ox=void 0;})();
|
|
/*! Bundled license information:
|
|
|
|
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
|
|
react/cjs/react.production.js:
|
|
(**
|
|
* @license React
|
|
* react.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
react/cjs/react-jsx-runtime.production.js:
|
|
(**
|
|
* @license React
|
|
* react-jsx-runtime.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
@scure/base/index.js:
|
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
|
|
@trpc/react-query/dist/shared-JtnEvJvB.mjs:
|
|
(* istanbul ignore next -- @preserve *)
|
|
*/
|