diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..9180554 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +benchmarks.semaphore.pse.dev \ No newline at end of file diff --git a/assets/index-43a79791.js b/assets/index-43a79791.js new file mode 100644 index 0000000..333aff8 --- /dev/null +++ b/assets/index-43a79791.js @@ -0,0 +1,465 @@ +function YL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ZL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function XL(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Sp={},JL={get exports(){return Sp},set exports(e){Sp=e}},Ge=JL.exports={},ti,ei;function Fp(){throw new Error("setTimeout has not been defined")}function Ip(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ti=setTimeout:ti=Fp}catch{ti=Fp}try{typeof clearTimeout=="function"?ei=clearTimeout:ei=Ip}catch{ei=Ip}})();function nb(e){if(ti===setTimeout)return setTimeout(e,0);if((ti===Fp||!ti)&&setTimeout)return ti=setTimeout,setTimeout(e,0);try{return ti(e,0)}catch{try{return ti.call(null,e,0)}catch{return ti.call(this,e,0)}}}function t7(e){if(ei===clearTimeout)return clearTimeout(e);if((ei===Ip||!ei)&&clearTimeout)return ei=clearTimeout,clearTimeout(e);try{return ei(e)}catch{try{return ei.call(null,e)}catch{return ei.call(this,e)}}}var Si=[],es=!1,Go,Ou=-1;function e7(){!es||!Go||(es=!1,Go.length?Si=Go.concat(Si):Ou=-1,Si.length&&rb())}function rb(){if(!es){var e=nb(e7);es=!0;for(var t=Si.length;t;){for(Go=Si,Si=[];++Ou1)for(var n=1;n0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")gm(u,this,n);else for(var l=u.length,c=db(u,l),r=0;r0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,r7(s)}return e}Se.prototype.addListener=function(t,n){return sb(this,t,n,!1)};Se.prototype.on=Se.prototype.addListener;Se.prototype.prependListener=function(t,n){return sb(this,t,n,!0)};function i7(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function lb(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=i7.bind(r);return i.listener=n,r.wrapFn=i,i}Se.prototype.once=function(t,n){return Lf(n),this.on(t,lb(this,t,n)),this};Se.prototype.prependOnceListener=function(t,n){return Lf(n),this.prependListener(t,lb(this,t,n)),this};Se.prototype.removeListener=function(t,n){var r,i,o,a,s;if(Lf(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():o7(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this};Se.prototype.off=Se.prototype.removeListener;Se.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),a;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function cb(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?a7(i):db(i,i.length)}Se.prototype.listeners=function(t){return cb(this,t,!0)};Se.prototype.rawListeners=function(t){return cb(this,t,!1)};Se.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ub.call(e,t)};Se.prototype.listenerCount=ub;function ub(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Se.prototype.eventNames=function(){return this._eventsCount>0?Ru(this._events):[]};function db(e,t){for(var n=new Array(t),r=0;r0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function d7(e){var t=pb(e),n=t[0],r=t[1];return(n+r)*3/4-r}function f7(e,t,n){return(t+n)*3/4-n}function h7(e){var t,n=pb(e),r=n[0],i=n[1],o=new c7(f7(e,r,i)),a=0,s=i>0?r-4:r,u;for(u=0;u>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=_r[e.charCodeAt(u)]<<2|_r[e.charCodeAt(u+1)]>>4,o[a++]=t&255),i===1&&(t=_r[e.charCodeAt(u)]<<10|_r[e.charCodeAt(u+1)]<<4|_r[e.charCodeAt(u+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function p7(e){return si[e>>18&63]+si[e>>12&63]+si[e>>6&63]+si[e&63]}function g7(e,t,n){for(var r,i=[],o=t;os?s:a+o));return r===1?(t=e[n-1],i.push(si[t>>2]+si[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(si[t>>10]+si[t>>4&63]+si[t<<2&63]+"=")),i.join("")}var $g={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */$g.read=function(e,t,n,r,i){var o,a,s=i*8-r-1,u=(1<>1,c=-7,h=n?i-1:0,_=n?-1:1,v=e[t+h];for(h+=_,o=v&(1<<-c)-1,v>>=-c,c+=s;c>0;o=o*256+e[t+h],h+=_,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=a*256+e[t+h],h+=_,c-=8);if(o===0)o=1-l;else{if(o===u)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(v?-1:1)*a*Math.pow(2,o-r)};$g.write=function(e,t,n,r,i,o){var a,s,u,l=o*8-i-1,c=(1<>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,P=r?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+h>=1?t+=_/u:t+=_*Math.pow(2,1-h),t*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a=a+h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+v]=s&255,v+=P,s/=256,i-=8);for(a=a<0;e[n+v]=a&255,v+=P,a/=256,l-=8);e[n+v-P]|=N*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=Cf,n=$g,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=I,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const F=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(F,y),F.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 a(F){if(F>i)throw new RangeError('The value "'+F+'" is invalid for option "size"');const y=new Uint8Array(F);return Object.setPrototypeOf(y,s.prototype),y}function s(F,y,A){if(typeof F=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(F)}return u(F,y,A)}s.poolSize=8192;function u(F,y,A){if(typeof F=="string")return _(F,y);if(ArrayBuffer.isView(F))return P(F);if(F==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F);if(Lt(F,ArrayBuffer)||F&&Lt(F.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Lt(F,SharedArrayBuffer)||F&&Lt(F.buffer,SharedArrayBuffer)))return N(F,y,A);if(typeof F=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const D=F.valueOf&&F.valueOf();if(D!=null&&D!==F)return s.from(D,y,A);const X=M(F);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof F[Symbol.toPrimitive]=="function")return s.from(F[Symbol.toPrimitive]("string"),y,A);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F)}s.from=function(F,y,A){return u(F,y,A)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(F){if(typeof F!="number")throw new TypeError('"size" argument must be of type number');if(F<0)throw new RangeError('The value "'+F+'" is invalid for option "size"')}function c(F,y,A){return l(F),F<=0?a(F):y!==void 0?typeof A=="string"?a(F).fill(y,A):a(F).fill(y):a(F)}s.alloc=function(F,y,A){return c(F,y,A)};function h(F){return l(F),a(F<0?0:z(F)|0)}s.allocUnsafe=function(F){return h(F)},s.allocUnsafeSlow=function(F){return h(F)};function _(F,y){if((typeof y!="string"||y==="")&&(y="utf8"),!s.isEncoding(y))throw new TypeError("Unknown encoding: "+y);const A=W(F,y)|0;let D=a(A);const X=D.write(F,y);return X!==A&&(D=D.slice(0,X)),D}function v(F){const y=F.length<0?0:z(F.length)|0,A=a(y);for(let D=0;D=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return F|0}function I(F){return+F!=F&&(F=0),s.alloc(+F)}s.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==s.prototype},s.compare=function(y,A){if(Lt(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),Lt(A,Uint8Array)&&(A=s.from(A,A.offset,A.byteLength)),!s.isBuffer(y)||!s.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===A)return 0;let D=y.length,X=A.length;for(let tt=0,q=Math.min(D,X);ttX.length?(s.isBuffer(q)||(q=s.from(q)),q.copy(X,tt)):Uint8Array.prototype.set.call(X,q,tt);else if(s.isBuffer(q))q.copy(X,tt);else throw new TypeError('"list" argument must be an Array of Buffers');tt+=q.length}return X};function W(F,y){if(s.isBuffer(F))return F.length;if(ArrayBuffer.isView(F)||Lt(F,ArrayBuffer))return F.byteLength;if(typeof F!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof F);const A=F.length,D=arguments.length>2&&arguments[2]===!0;if(!D&&A===0)return 0;let X=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":return Pt(F).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A*2;case"hex":return A>>>1;case"base64":return It(F).length;default:if(X)return D?-1:Pt(F).length;y=(""+y).toLowerCase(),X=!0}}s.byteLength=W;function H(F,y,A){let D=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((A===void 0||A>this.length)&&(A=this.length),A<=0)||(A>>>=0,y>>>=0,A<=y))return"";for(F||(F="utf8");;)switch(F){case"hex":return Y(this,y,A);case"utf8":case"utf-8":return g(this,y,A);case"ascii":return Q(this,y,A);case"latin1":case"binary":return T(this,y,A);case"base64":return w(this,y,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,y,A);default:if(D)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),D=!0}}s.prototype._isBuffer=!0;function it(F,y,A){const D=F[y];F[y]=F[A],F[A]=D}s.prototype.swap16=function(){const y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let A=0;AA&&(y+=" ... "),""},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(y,A,D,X,tt){if(Lt(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),!s.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(A===void 0&&(A=0),D===void 0&&(D=y?y.length:0),X===void 0&&(X=0),tt===void 0&&(tt=this.length),A<0||D>y.length||X<0||tt>this.length)throw new RangeError("out of range index");if(X>=tt&&A>=D)return 0;if(X>=tt)return-1;if(A>=D)return 1;if(A>>>=0,D>>>=0,X>>>=0,tt>>>=0,this===y)return 0;let q=tt-X,m=D-A;const b=Math.min(q,m),nt=this.slice(X,tt),ct=y.slice(A,D);for(let rt=0;rt2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,St(A)&&(A=X?0:F.length-1),A<0&&(A=F.length+A),A>=F.length){if(X)return-1;A=F.length-1}else if(A<0)if(X)A=0;else return-1;if(typeof y=="string"&&(y=s.from(y,D)),s.isBuffer(y))return y.length===0?-1:p(F,y,A,D,X);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(F,y,A):Uint8Array.prototype.lastIndexOf.call(F,y,A):p(F,[y],A,D,X);throw new TypeError("val must be string, number or Buffer")}function p(F,y,A,D,X){let tt=1,q=F.length,m=y.length;if(D!==void 0&&(D=String(D).toLowerCase(),D==="ucs2"||D==="ucs-2"||D==="utf16le"||D==="utf-16le")){if(F.length<2||y.length<2)return-1;tt=2,q/=2,m/=2,A/=2}function b(ct,rt){return tt===1?ct[rt]:ct.readUInt16BE(rt*tt)}let nt;if(X){let ct=-1;for(nt=A;ntq&&(A=q-m),nt=A;nt>=0;nt--){let ct=!0;for(let rt=0;rtX&&(D=X)):D=X;const tt=y.length;D>tt/2&&(D=tt/2);let q;for(q=0;q>>0,isFinite(D)?(D=D>>>0,X===void 0&&(X="utf8")):(X=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const tt=this.length-A;if((D===void 0||D>tt)&&(D=tt),y.length>0&&(D<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");let q=!1;for(;;)switch(X){case"hex":return L(this,y,A,D);case"utf8":case"utf-8":return Z(this,y,A,D);case"ascii":case"latin1":case"binary":return K(this,y,A,D);case"base64":return G(this,y,A,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,y,A,D);default:if(q)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),q=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(F,y,A){return y===0&&A===F.length?t.fromByteArray(F):t.fromByteArray(F.slice(y,A))}function g(F,y,A){A=Math.min(F.length,A);const D=[];let X=y;for(;X239?4:tt>223?3:tt>191?2:1;if(X+m<=A){let b,nt,ct,rt;switch(m){case 1:tt<128&&(q=tt);break;case 2:b=F[X+1],(b&192)===128&&(rt=(tt&31)<<6|b&63,rt>127&&(q=rt));break;case 3:b=F[X+1],nt=F[X+2],(b&192)===128&&(nt&192)===128&&(rt=(tt&15)<<12|(b&63)<<6|nt&63,rt>2047&&(rt<55296||rt>57343)&&(q=rt));break;case 4:b=F[X+1],nt=F[X+2],ct=F[X+3],(b&192)===128&&(nt&192)===128&&(ct&192)===128&&(rt=(tt&15)<<18|(b&63)<<12|(nt&63)<<6|ct&63,rt>65535&&rt<1114112&&(q=rt))}}q===null?(q=65533,m=1):q>65535&&(q-=65536,D.push(q>>>10&1023|55296),q=56320|q&1023),D.push(q),X+=m}return U(D)}const E=4096;function U(F){const y=F.length;if(y<=E)return String.fromCharCode.apply(String,F);let A="",D=0;for(;DD)&&(A=D);let X="";for(let tt=y;ttD&&(y=D),A<0?(A+=D,A<0&&(A=0)):A>D&&(A=D),AA)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(y,A,D){y=y>>>0,A=A>>>0,D||V(y,A,this.length);let X=this[y],tt=1,q=0;for(;++q>>0,A=A>>>0,D||V(y,A,this.length);let X=this[y+--A],tt=1;for(;A>0&&(tt*=256);)X+=this[y+--A]*tt;return X},s.prototype.readUint8=s.prototype.readUInt8=function(y,A){return y=y>>>0,A||V(y,1,this.length),this[y]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(y,A){return y=y>>>0,A||V(y,2,this.length),this[y]|this[y+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(y,A){return y=y>>>0,A||V(y,2,this.length),this[y]<<8|this[y+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(y,A){return y=y>>>0,A||V(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(y,A){return y=y>>>0,A||V(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},s.prototype.readBigUInt64LE=jt(function(y){y=y>>>0,_t(y,"offset");const A=this[y],D=this[y+7];(A===void 0||D===void 0)&&dt(y,this.length-8);const X=A+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24,tt=this[++y]+this[++y]*2**8+this[++y]*2**16+D*2**24;return BigInt(X)+(BigInt(tt)<>>0,_t(y,"offset");const A=this[y],D=this[y+7];(A===void 0||D===void 0)&&dt(y,this.length-8);const X=A*2**24+this[++y]*2**16+this[++y]*2**8+this[++y],tt=this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+D;return(BigInt(X)<>>0,A=A>>>0,D||V(y,A,this.length);let X=this[y],tt=1,q=0;for(;++q=tt&&(X-=Math.pow(2,8*A)),X},s.prototype.readIntBE=function(y,A,D){y=y>>>0,A=A>>>0,D||V(y,A,this.length);let X=A,tt=1,q=this[y+--X];for(;X>0&&(tt*=256);)q+=this[y+--X]*tt;return tt*=128,q>=tt&&(q-=Math.pow(2,8*A)),q},s.prototype.readInt8=function(y,A){return y=y>>>0,A||V(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},s.prototype.readInt16LE=function(y,A){y=y>>>0,A||V(y,2,this.length);const D=this[y]|this[y+1]<<8;return D&32768?D|4294901760:D},s.prototype.readInt16BE=function(y,A){y=y>>>0,A||V(y,2,this.length);const D=this[y+1]|this[y]<<8;return D&32768?D|4294901760:D},s.prototype.readInt32LE=function(y,A){return y=y>>>0,A||V(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},s.prototype.readInt32BE=function(y,A){return y=y>>>0,A||V(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},s.prototype.readBigInt64LE=jt(function(y){y=y>>>0,_t(y,"offset");const A=this[y],D=this[y+7];(A===void 0||D===void 0)&&dt(y,this.length-8);const X=this[y+4]+this[y+5]*2**8+this[y+6]*2**16+(D<<24);return(BigInt(X)<>>0,_t(y,"offset");const A=this[y],D=this[y+7];(A===void 0||D===void 0)&&dt(y,this.length-8);const X=(A<<24)+this[++y]*2**16+this[++y]*2**8+this[++y];return(BigInt(X)<>>0,A||V(y,4,this.length),n.read(this,y,!0,23,4)},s.prototype.readFloatBE=function(y,A){return y=y>>>0,A||V(y,4,this.length),n.read(this,y,!1,23,4)},s.prototype.readDoubleLE=function(y,A){return y=y>>>0,A||V(y,8,this.length),n.read(this,y,!0,52,8)},s.prototype.readDoubleBE=function(y,A){return y=y>>>0,A||V(y,8,this.length),n.read(this,y,!1,52,8)};function C(F,y,A,D,X,tt){if(!s.isBuffer(F))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>X||yF.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(y,A,D,X){if(y=+y,A=A>>>0,D=D>>>0,!X){const m=Math.pow(2,8*D)-1;C(this,y,A,D,m,0)}let tt=1,q=0;for(this[A]=y&255;++q>>0,D=D>>>0,!X){const m=Math.pow(2,8*D)-1;C(this,y,A,D,m,0)}let tt=D-1,q=1;for(this[A+tt]=y&255;--tt>=0&&(q*=256);)this[A+tt]=y/q&255;return A+D},s.prototype.writeUint8=s.prototype.writeUInt8=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,1,255,0),this[A]=y&255,A+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,2,65535,0),this[A]=y&255,this[A+1]=y>>>8,A+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,2,65535,0),this[A]=y>>>8,this[A+1]=y&255,A+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,4,4294967295,0),this[A+3]=y>>>24,this[A+2]=y>>>16,this[A+1]=y>>>8,this[A]=y&255,A+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,4,4294967295,0),this[A]=y>>>24,this[A+1]=y>>>16,this[A+2]=y>>>8,this[A+3]=y&255,A+4};function O(F,y,A,D,X){ot(y,D,X,F,A,7);let tt=Number(y&BigInt(4294967295));F[A++]=tt,tt=tt>>8,F[A++]=tt,tt=tt>>8,F[A++]=tt,tt=tt>>8,F[A++]=tt;let q=Number(y>>BigInt(32)&BigInt(4294967295));return F[A++]=q,q=q>>8,F[A++]=q,q=q>>8,F[A++]=q,q=q>>8,F[A++]=q,A}function lt(F,y,A,D,X){ot(y,D,X,F,A,7);let tt=Number(y&BigInt(4294967295));F[A+7]=tt,tt=tt>>8,F[A+6]=tt,tt=tt>>8,F[A+5]=tt,tt=tt>>8,F[A+4]=tt;let q=Number(y>>BigInt(32)&BigInt(4294967295));return F[A+3]=q,q=q>>8,F[A+2]=q,q=q>>8,F[A+1]=q,q=q>>8,F[A]=q,A+8}s.prototype.writeBigUInt64LE=jt(function(y,A=0){return O(this,y,A,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=jt(function(y,A=0){return lt(this,y,A,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(y,A,D,X){if(y=+y,A=A>>>0,!X){const b=Math.pow(2,8*D-1);C(this,y,A,D,b-1,-b)}let tt=0,q=1,m=0;for(this[A]=y&255;++tt>0)-m&255;return A+D},s.prototype.writeIntBE=function(y,A,D,X){if(y=+y,A=A>>>0,!X){const b=Math.pow(2,8*D-1);C(this,y,A,D,b-1,-b)}let tt=D-1,q=1,m=0;for(this[A+tt]=y&255;--tt>=0&&(q*=256);)y<0&&m===0&&this[A+tt+1]!==0&&(m=1),this[A+tt]=(y/q>>0)-m&255;return A+D},s.prototype.writeInt8=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,1,127,-128),y<0&&(y=255+y+1),this[A]=y&255,A+1},s.prototype.writeInt16LE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,2,32767,-32768),this[A]=y&255,this[A+1]=y>>>8,A+2},s.prototype.writeInt16BE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,2,32767,-32768),this[A]=y>>>8,this[A+1]=y&255,A+2},s.prototype.writeInt32LE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,4,2147483647,-2147483648),this[A]=y&255,this[A+1]=y>>>8,this[A+2]=y>>>16,this[A+3]=y>>>24,A+4},s.prototype.writeInt32BE=function(y,A,D){return y=+y,A=A>>>0,D||C(this,y,A,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[A]=y>>>24,this[A+1]=y>>>16,this[A+2]=y>>>8,this[A+3]=y&255,A+4},s.prototype.writeBigInt64LE=jt(function(y,A=0){return O(this,y,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=jt(function(y,A=0){return lt(this,y,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function S(F,y,A,D,X,tt){if(A+D>F.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function d(F,y,A,D,X){return y=+y,A=A>>>0,X||S(F,y,A,4),n.write(F,y,A,D,23,4),A+4}s.prototype.writeFloatLE=function(y,A,D){return d(this,y,A,!0,D)},s.prototype.writeFloatBE=function(y,A,D){return d(this,y,A,!1,D)};function $(F,y,A,D,X){return y=+y,A=A>>>0,X||S(F,y,A,8),n.write(F,y,A,D,52,8),A+8}s.prototype.writeDoubleLE=function(y,A,D){return $(this,y,A,!0,D)},s.prototype.writeDoubleBE=function(y,A,D){return $(this,y,A,!1,D)},s.prototype.copy=function(y,A,D,X){if(!s.isBuffer(y))throw new TypeError("argument should be a Buffer");if(D||(D=0),!X&&X!==0&&(X=this.length),A>=y.length&&(A=y.length),A||(A=0),X>0&&X=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),y.length-A>>0,D=D===void 0?this.length:D>>>0,y||(y=0);let tt;if(typeof y=="number")for(tt=A;tt2**32?X=k(String(A)):typeof A=="bigint"&&(X=String(A),(A>BigInt(2)**BigInt(32)||A<-(BigInt(2)**BigInt(32)))&&(X=k(X)),X+="n"),D+=` It must be ${y}. Received ${X}`,D},RangeError);function k(F){let y="",A=F.length;const D=F[0]==="-"?1:0;for(;A>=D+4;A-=3)y=`_${F.slice(A-3,A)}${y}`;return`${F.slice(0,A)}${y}`}function x(F,y,A){_t(y,"offset"),(F[y]===void 0||F[y+A]===void 0)&&dt(y,F.length-(A+1))}function ot(F,y,A,D,X,tt){if(F>A||F3?y===0||y===BigInt(0)?m=`>= 0${q} and < 2${q} ** ${(tt+1)*8}${q}`:m=`>= -(2${q} ** ${(tt+1)*8-1}${q}) and < 2 ** ${(tt+1)*8-1}${q}`:m=`>= ${y}${q} and <= ${A}${q}`,new f.ERR_OUT_OF_RANGE("value",m,F)}x(D,X,tt)}function _t(F,y){if(typeof F!="number")throw new f.ERR_INVALID_ARG_TYPE(y,"number",F)}function dt(F,y,A){throw Math.floor(F)!==F?(_t(F,A),new f.ERR_OUT_OF_RANGE(A||"offset","an integer",F)):y<0?new f.ERR_BUFFER_OUT_OF_BOUNDS:new f.ERR_OUT_OF_RANGE(A||"offset",`>= ${A?1:0} and <= ${y}`,F)}const bt=/[^+/0-9A-Za-z-_]/g;function Ut(F){if(F=F.split("=")[0],F=F.trim().replace(bt,""),F.length<2)return"";for(;F.length%4!==0;)F=F+"=";return F}function Pt(F,y){y=y||1/0;let A;const D=F.length;let X=null;const tt=[];for(let q=0;q55295&&A<57344){if(!X){if(A>56319){(y-=3)>-1&&tt.push(239,191,189);continue}else if(q+1===D){(y-=3)>-1&&tt.push(239,191,189);continue}X=A;continue}if(A<56320){(y-=3)>-1&&tt.push(239,191,189),X=A;continue}A=(X-55296<<10|A-56320)+65536}else X&&(y-=3)>-1&&tt.push(239,191,189);if(X=null,A<128){if((y-=1)<0)break;tt.push(A)}else if(A<2048){if((y-=2)<0)break;tt.push(A>>6|192,A&63|128)}else if(A<65536){if((y-=3)<0)break;tt.push(A>>12|224,A>>6&63|128,A&63|128)}else if(A<1114112){if((y-=4)<0)break;tt.push(A>>18|240,A>>12&63|128,A>>6&63|128,A&63|128)}else throw new Error("Invalid code point")}return tt}function Ot(F){const y=[];for(let A=0;A>8,X=A%256,tt.push(X),tt.push(D);return tt}function It(F){return t.toByteArray(Ut(F))}function Ft(F,y,A,D){let X;for(X=0;X=y.length||X>=F.length);++X)y[X+A]=F[X];return X}function Lt(F,y){return F instanceof y||F!=null&&F.constructor!=null&&F.constructor.name!=null&&F.constructor.name===y.name}function St(F){return F!==F}const Ct=function(){const F="0123456789abcdef",y=new Array(256);for(let A=0;A<16;++A){const D=A*16;for(let X=0;X<16;++X)y[D+X]=F[A]+F[X]}return y}();function jt(F){return typeof BigInt>"u"?j:F}function j(){throw new Error("BigInt not supported")}})(hb);window.Buffer=hb.Buffer;window.process=Sp;window.EventEmitter=Hl;var Kl={},y7={get exports(){return Kl},set exports(e){Kl=e}},Sf={},at={},v7={get exports(){return at},set exports(e){at=e}},se={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kc=Symbol.for("react.element"),_7=Symbol.for("react.portal"),b7=Symbol.for("react.fragment"),w7=Symbol.for("react.strict_mode"),A7=Symbol.for("react.profiler"),x7=Symbol.for("react.provider"),L7=Symbol.for("react.context"),C7=Symbol.for("react.forward_ref"),S7=Symbol.for("react.suspense"),F7=Symbol.for("react.memo"),I7=Symbol.for("react.lazy"),ym=Symbol.iterator;function E7(e){return e===null||typeof e!="object"?null:(e=ym&&e[ym]||e["@@iterator"],typeof e=="function"?e:null)}var gb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mb=Object.assign,yb={};function Os(e,t,n){this.props=e,this.context=t,this.refs=yb,this.updater=n||gb}Os.prototype.isReactComponent={};Os.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Os.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vb(){}vb.prototype=Os.prototype;function jg(e,t,n){this.props=e,this.context=t,this.refs=yb,this.updater=n||gb}var Vg=jg.prototype=new vb;Vg.constructor=jg;mb(Vg,Os.prototype);Vg.isPureReactComponent=!0;var vm=Array.isArray,_b=Object.prototype.hasOwnProperty,qg={current:null},bb={key:!0,ref:!0,__self:!0,__source:!0};function wb(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)_b.call(t,r)&&!bb.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(10?pn(Rs,--Hn):0,ys--,Ye===10&&(ys=1,If--),Ye}function nr(){return Ye=Hn2||Zl(Ye)>3?"":" "}function J7(e,t){for(;--t&&nr()&&!(Ye<48||Ye>102||Ye>57&&Ye<65||Ye>70&&Ye<97););return Pc(e,Nu()+(t<6&&ui()==32&&nr()==32))}function kp(e){for(;nr();)switch(Ye){case e:return Hn;case 34:case 39:e!==34&&e!==39&&kp(Ye);break;case 40:e===41&&kp(e);break;case 92:nr();break}return Hn}function t9(e,t){for(;nr()&&e+Ye!==47+10;)if(e+Ye===42+42&&ui()===47)break;return"/*"+Pc(t,Hn-1)+"*"+Ff(e===47?e:nr())}function e9(e){for(;!Zl(ui());)nr();return Pc(e,Hn)}function n9(e){return Ib($u("",null,null,null,[""],e=Fb(e),0,[0],e))}function $u(e,t,n,r,i,o,a,s,u){for(var l=0,c=0,h=a,_=0,v=0,P=0,N=1,M=1,z=1,I=0,W="",H=i,it=o,B=r,p=W;M;)switch(P=I,I=nr()){case 40:if(P!=108&&pn(p,h-1)==58){Bp(p+=ve(Uu(I),"&","&\f"),"&\f")!=-1&&(z=-1);break}case 34:case 39:case 91:p+=Uu(I);break;case 9:case 10:case 13:case 32:p+=X7(P);break;case 92:p+=J7(Nu()-1,7);continue;case 47:switch(ui()){case 42:case 47:eu(r9(t9(nr(),Nu()),t,n),u);break;default:p+="/"}break;case 123*N:s[l++]=ii(p)*z;case 125*N:case 59:case 0:switch(I){case 0:case 125:M=0;case 59+c:z==-1&&(p=ve(p,/\f/g,"")),v>0&&ii(p)-h&&eu(v>32?Am(p+";",r,n,h-1):Am(ve(p," ","")+";",r,n,h-2),u);break;case 59:p+=";";default:if(eu(B=wm(p,t,n,l,c,i,s,W,H=[],it=[],h),o),I===123)if(c===0)$u(p,t,B,B,H,o,h,s,it);else switch(_===99&&pn(p,3)===110?100:_){case 100:case 108:case 109:case 115:$u(e,B,B,r&&eu(wm(e,B,B,0,0,i,s,W,i,H=[],h),it),i,it,h,s,r?H:it);break;default:$u(p,B,B,B,[""],it,0,s,it)}}l=c=v=0,N=z=1,W=p="",h=a;break;case 58:h=1+ii(p),v=P;default:if(N<1){if(I==123)--N;else if(I==125&&N++==0&&Z7()==125)continue}switch(p+=Ff(I),I*N){case 38:z=c>0?1:(p+="\f",-1);break;case 44:s[l++]=(ii(p)-1)*z,z=1;break;case 64:ui()===45&&(p+=Uu(nr())),_=ui(),c=h=ii(W=p+=e9(Nu())),I++;break;case 45:P===45&&ii(p)==2&&(N=0)}}return o}function wm(e,t,n,r,i,o,a,s,u,l,c){for(var h=i-1,_=i===0?o:[""],v=Hg(_),P=0,N=0,M=0;P0?_[z]+" "+I:ve(I,/&\f/g,_[z])))&&(u[M++]=W);return Ef(e,t,n,i===0?Wg:s,u,l,c)}function r9(e,t,n){return Ef(e,t,n,xb,Ff(Y7()),Yl(e,2,-2),0)}function Am(e,t,n,r){return Ef(e,t,n,Gg,Yl(e,0,r),Yl(e,r+1,-1),r)}function rs(e,t){for(var n="",r=Hg(e),i=0;i6)switch(pn(e,t+1)){case 109:if(pn(e,t+4)!==45)break;case 102:return ve(e,/(.+:)(.+)-([^]+)/,"$1"+ye+"$2-$3$1"+Ld+(pn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Bp(e,"stretch")?Bb(ve(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(pn(e,t+1)!==115)break;case 6444:switch(pn(e,ii(e)-3-(~Bp(e,"!important")&&10))){case 107:return ve(e,":",":"+ye)+e;case 101:return ve(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ye+(pn(e,14)===45?"inline-":"")+"box$3$1"+ye+"$2$3$1"+An+"$2box$3")+e}break;case 5936:switch(pn(e,t+11)){case 114:return ye+e+An+ve(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ye+e+An+ve(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ye+e+An+ve(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ye+e+An+e+e}return e}var f9=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Gg:t.return=Bb(t.value,t.length);break;case Lb:return rs([Ks(t,{value:ve(t.value,"@","@"+ye)})],i);case Wg:if(t.length)return K7(t.props,function(o){switch(H7(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rs([Ks(t,{props:[ve(o,/:(read-\w+)/,":"+Ld+"$1")]})],i);case"::placeholder":return rs([Ks(t,{props:[ve(o,/:(plac\w+)/,":"+ye+"input-$1")]}),Ks(t,{props:[ve(o,/:(plac\w+)/,":"+Ld+"$1")]}),Ks(t,{props:[ve(o,/:(plac\w+)/,An+"input-$1")]})],i)}return""})}},h9=[f9],p9=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(N){var M=N.getAttribute("data-emotion");M.indexOf(" ")!==-1&&(document.head.appendChild(N),N.setAttribute("data-s",""))})}var i=t.stylisPlugins||h9,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(N){for(var M=N.getAttribute("data-emotion").split(" "),z=1;z=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var S9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},F9=/[A-Z]|^ms/g,I9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Rb=function(t){return t.charCodeAt(1)===45},Cm=function(t){return t!=null&&typeof t!="boolean"},j0=Eb(function(e){return Rb(e)?e:e.replace(F9,"-$&").toLowerCase()}),Sm=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(I9,function(r,i,o){return oi={name:i,styles:o,next:oi},i})}return S9[t]!==1&&!Rb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xl(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return oi={name:n.name,styles:n.styles,next:oi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)oi={name:r.name,styles:r.styles,next:oi},r=r.next;var i=n.styles+";";return i}return E9(e,t,n)}case"function":{if(e!==void 0){var o=oi,a=n(e);return oi=o,Xl(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function E9(e,t,n){var r="";if(Array.isArray(n))for(var i=0;iwt(Uf,{styles:$b}),D9=({scope:e=""})=>wt(Uf,{styles:Ub` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + margin: 0; + font-feature-settings: "kern"; + } + + ${e} :where(*, *::before, *::after) { + border-width: 0; + border-style: solid; + box-sizing: border-box; + word-wrap: break-word; + } + + main { + display: block; + } + + ${e} hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + ${e} :where(pre, code, kbd,samp) { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + ${e} a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + ${e} abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + ${e} :where(b, strong) { + font-weight: bold; + } + + ${e} small { + font-size: 80%; + } + + ${e} :where(sub,sup) { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + ${e} sub { + bottom: -0.25em; + } + + ${e} sup { + top: -0.5em; + } + + ${e} img { + border-style: none; + } + + ${e} :where(button, input, optgroup, select, textarea) { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + ${e} :where(button, input) { + overflow: visible; + } + + ${e} :where(button, select) { + text-transform: none; + } + + ${e} :where( + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner + ) { + border-style: none; + padding: 0; + } + + ${e} fieldset { + padding: 0.35em 0.75em 0.625em; + } + + ${e} legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + ${e} progress { + vertical-align: baseline; + } + + ${e} textarea { + overflow: auto; + } + + ${e} :where([type="checkbox"], [type="radio"]) { + box-sizing: border-box; + padding: 0; + } + + ${e} input[type="number"]::-webkit-inner-spin-button, + ${e} input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + ${e} input[type="number"] { + -moz-appearance: textfield; + } + + ${e} input[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + ${e} input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ${e} ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + ${e} details { + display: block; + } + + ${e} summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + ${e} :where( + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre + ) { + margin: 0; + } + + ${e} button { + background: transparent; + padding: 0; + } + + ${e} fieldset { + margin: 0; + padding: 0; + } + + ${e} :where(ol, ul) { + margin: 0; + padding: 0; + } + + ${e} textarea { + resize: vertical; + } + + ${e} :where(button, [role="button"]) { + cursor: pointer; + } + + ${e} button::-moz-focus-inner { + border: 0 !important; + } + + ${e} table { + border-collapse: collapse; + } + + ${e} :where(h1, h2, h3, h4, h5, h6) { + font-size: inherit; + font-weight: inherit; + } + + ${e} :where(button, input, optgroup, select, textarea) { + padding: 0; + line-height: inherit; + color: inherit; + } + + ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) { + display: block; + } + + ${e} :where(img, video) { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] + :focus:not([data-focus-visible-added]):not( + [data-focus-visible-disabled] + ) { + outline: none; + box-shadow: none; + } + + ${e} select::-ms-expand { + display: none; + } + + ${$b} + `});function N9(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function cr(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=e,s=at.createContext(a);s.displayName=t;function u(){var l;const c=at.useContext(s);if(!c&&n){const h=new Error(o??N9(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,u),h}return c}return[s.Provider,u,s]}var[U9,$9]=cr({strict:!1,name:"PortalManagerContext"});function jb(e){const{children:t,zIndex:n}=e;return wt(U9,{value:{zIndex:n},children:t})}jb.displayName="PortalManager";var vs=Boolean(globalThis==null?void 0:globalThis.document)?at.useLayoutEffect:at.useEffect,tc={},j9={get exports(){return tc},set exports(e){tc=e}},ur={},Mp={},V9={get exports(){return Mp},set exports(e){Mp=e}},Vb={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(T,Y){var J=T.length;T.push(Y);t:for(;0>>1,C=T[V];if(0>>1;Vi(S,J))di($,S)?(T[V]=$,T[d]=J,V=d):(T[V]=S,T[lt]=J,V=lt);else if(di($,J))T[V]=$,T[d]=J,V=d;else break t}}return Y}function i(T,Y){var J=T.sortIndex-Y.sortIndex;return J!==0?J:T.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,h=null,_=3,v=!1,P=!1,N=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function W(T){for(var Y=n(l);Y!==null;){if(Y.callback===null)r(l);else if(Y.startTime<=T)r(l),Y.sortIndex=Y.expirationTime,t(u,Y);else break;Y=n(l)}}function H(T){if(N=!1,W(T),!P)if(n(u)!==null)P=!0,U(it);else{var Y=n(l);Y!==null&&Q(H,Y.startTime-T)}}function it(T,Y){P=!1,N&&(N=!1,z(L),L=-1),v=!0;var J=_;try{for(W(Y),h=n(u);h!==null&&(!(h.expirationTime>Y)||T&&!G());){var V=h.callback;if(typeof V=="function"){h.callback=null,_=h.priorityLevel;var C=V(h.expirationTime<=Y);Y=e.unstable_now(),typeof C=="function"?h.callback=C:h===n(u)&&r(u),W(Y)}else r(u);h=n(u)}if(h!==null)var O=!0;else{var lt=n(l);lt!==null&&Q(H,lt.startTime-Y),O=!1}return O}finally{h=null,_=J,v=!1}}var B=!1,p=null,L=-1,Z=5,K=-1;function G(){return!(e.unstable_now()-KT||125V?(T.sortIndex=J,t(l,T),n(u)===null&&T===n(l)&&(N?(z(L),L=-1):N=!0,Q(H,J-V))):(T.sortIndex=C,t(u,T),P||v||(P=!0,U(it))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var Y=_;return function(){var J=_;_=Y;try{return T.apply(this,arguments)}finally{_=J}}}})(Vb);(function(e){e.exports=Vb})(V9);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qb=at,or=Mp;function Rt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tp=Object.prototype.hasOwnProperty,q9=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Em={},Bm={};function Q9(e){return Tp.call(Bm,e)?!0:Tp.call(Em,e)?!1:q9.test(e)?Bm[e]=!0:(Em[e]=!0,!1)}function W9(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function G9(e,t,n,r){if(t===null||typeof t>"u"||W9(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zn(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vn[e]=new zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){vn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jg=/[\-:]([a-z])/g;function t1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Jg,t1);vn[t]=new zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Jg,t1);vn[t]=new zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Jg,t1);vn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});vn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function e1(e,t,n,r){var i=vn.hasOwnProperty(t)?vn[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var u=` +`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{q0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hl(e):""}function H9(e){switch(e.tag){case 5:return hl(e.type);case 16:return hl("Lazy");case 13:return hl("Suspense");case 19:return hl("SuspenseList");case 0:case 2:case 15:return e=Q0(e.type,!1),e;case 11:return e=Q0(e.type.render,!1),e;case 1:return e=Q0(e.type,!0),e;default:return""}}function Dp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ra:return"Fragment";case Oa:return"Portal";case Op:return"Profiler";case n1:return"StrictMode";case Rp:return"Suspense";case zp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gb:return(e.displayName||"Context")+".Consumer";case Wb:return(e._context.displayName||"Context")+".Provider";case r1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i1:return t=e.displayName||null,t!==null?t:Dp(e.type)||"Memo";case io:t=e._payload,e=e._init;try{return Dp(e(t))}catch{}}return null}function K9(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dp(t);case 8:return t===n1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function So(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Y9(e){var t=Kb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ru(e){e._valueTracker||(e._valueTracker=Y9(e))}function Yb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Np(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=So(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zb(e,t){t=t.checked,t!=null&&e1(e,"checked",t,!1)}function Up(e,t){Zb(e,t);var n=So(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$p(e,t.type,n):t.hasOwnProperty("defaultValue")&&$p(e,t.type,So(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $p(e,t,n){(t!=="number"||Sd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pl=Array.isArray;function is(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z9=["Webkit","ms","Moz","O"];Object.keys(Cl).forEach(function(e){Z9.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cl[t]=Cl[e]})});function e8(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cl.hasOwnProperty(e)&&Cl[e]?(""+t).trim():t+"px"}function n8(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=e8(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var X9=je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qp(e,t){if(t){if(X9[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Rt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Rt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Rt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Rt(62))}}function Qp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wp=null;function o1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gp=null,os=null,as=null;function Rm(e){if(e=Oc(e)){if(typeof Gp!="function")throw Error(Rt(280));var t=e.stateNode;t&&(t=Qf(t),Gp(e.stateNode,e.type,t))}}function r8(e){os?as?as.push(e):as=[e]:os=e}function i8(){if(os){var e=os,t=as;if(as=os=null,Rm(e),t)for(e=0;e>>=0,e===0?32:31-(cC(e)/uC|0)|0}var ou=64,au=4194304;function gl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=gl(s):(o&=a,o!==0&&(r=gl(o)))}else a=n&~i,a!==0?r=gl(a):o!==0&&(r=gl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Mc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qr(t),e[t]=n}function pC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Fl),Qm=String.fromCharCode(32),Wm=!1;function L8(e,t){switch(e){case"keyup":return jC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var za=!1;function qC(e,t){switch(e){case"compositionend":return C8(t);case"keypress":return t.which!==32?null:(Wm=!0,Qm);case"textInput":return e=t.data,e===Qm&&Wm?null:e;default:return null}}function QC(e,t){if(za)return e==="compositionend"||!h1&&L8(e,t)?(e=A8(),Vu=u1=fo=null,za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Ym(n)}}function E8(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?E8(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function B8(){for(var e=window,t=Sd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sd(e.document)}return t}function p1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function tS(e){var t=B8(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&E8(n.ownerDocument.documentElement,n)){if(r!==null&&p1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Zm(n,o);var a=Zm(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Da=null,Jp=null,El=null,t2=!1;function Xm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;t2||Da==null||Da!==Sd(r)||(r=Da,"selectionStart"in r&&p1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),El&&lc(El,r)||(El=r,r=Md(Jp,"onSelect"),0$a||(e.current=a2[$a],a2[$a]=null,$a--)}function Ee(e,t){$a++,a2[$a]=e.current,e.current=t}var Fo={},Ln=Bo(Fo),Vn=Bo(!1),ua=Fo;function bs(e,t){var n=e.type.contextTypes;if(!n)return Fo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qn(e){return e=e.childContextTypes,e!=null}function Od(){Me(Vn),Me(Ln)}function oy(e,t,n){if(Ln.current!==Fo)throw Error(Rt(168));Ee(Ln,t),Ee(Vn,n)}function N8(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Rt(108,K9(e)||"Unknown",i));return je({},n,r)}function Rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fo,ua=Ln.current,Ee(Ln,e),Ee(Vn,Vn.current),!0}function ay(e,t,n){var r=e.stateNode;if(!r)throw Error(Rt(169));n?(e=N8(e,t,ua),r.__reactInternalMemoizedMergedChildContext=e,Me(Vn),Me(Ln),Ee(Ln,e)):Me(Vn),Ee(Vn,n)}var Ai=null,Wf=!1,oh=!1;function U8(e){Ai===null?Ai=[e]:Ai.push(e)}function fS(e){Wf=!0,U8(e)}function ko(){if(!oh&&Ai!==null){oh=!0;var e=0,t=xe;try{var n=Ai;for(xe=1;e>=a,i-=a,Fi=1<<32-Qr(t)+i|n<L?(Z=p,p=null):Z=p.sibling;var K=_(z,p,W[L],H);if(K===null){p===null&&(p=Z);break}e&&p&&K.alternate===null&&t(z,p),I=o(K,I,L),B===null?it=K:B.sibling=K,B=K,p=Z}if(L===W.length)return n(z,p),Re&&No(z,L),it;if(p===null){for(;LL?(Z=p,p=null):Z=p.sibling;var G=_(z,p,K.value,H);if(G===null){p===null&&(p=Z);break}e&&p&&G.alternate===null&&t(z,p),I=o(G,I,L),B===null?it=G:B.sibling=G,B=G,p=Z}if(K.done)return n(z,p),Re&&No(z,L),it;if(p===null){for(;!K.done;L++,K=W.next())K=h(z,K.value,H),K!==null&&(I=o(K,I,L),B===null?it=K:B.sibling=K,B=K);return Re&&No(z,L),it}for(p=r(z,p);!K.done;L++,K=W.next())K=v(p,z,L,K.value,H),K!==null&&(e&&K.alternate!==null&&p.delete(K.key===null?L:K.key),I=o(K,I,L),B===null?it=K:B.sibling=K,B=K);return e&&p.forEach(function(et){return t(z,et)}),Re&&No(z,L),it}function M(z,I,W,H){if(typeof W=="object"&&W!==null&&W.type===Ra&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case nu:t:{for(var it=W.key,B=I;B!==null;){if(B.key===it){if(it=W.type,it===Ra){if(B.tag===7){n(z,B.sibling),I=i(B,W.props.children),I.return=z,z=I;break t}}else if(B.elementType===it||typeof it=="object"&&it!==null&&it.$$typeof===io&&hy(it)===B.type){n(z,B.sibling),I=i(B,W.props),I.ref=el(z,B,W),I.return=z,z=I;break t}n(z,B);break}else t(z,B);B=B.sibling}W.type===Ra?(I=na(W.props.children,z.mode,H,W.key),I.return=z,z=I):(H=Zu(W.type,W.key,W.props,null,z.mode,H),H.ref=el(z,I,W),H.return=z,z=H)}return a(z);case Oa:t:{for(B=W.key;I!==null;){if(I.key===B)if(I.tag===4&&I.stateNode.containerInfo===W.containerInfo&&I.stateNode.implementation===W.implementation){n(z,I.sibling),I=i(I,W.children||[]),I.return=z,z=I;break t}else{n(z,I);break}else t(z,I);I=I.sibling}I=hh(W,z.mode,H),I.return=z,z=I}return a(z);case io:return B=W._init,M(z,I,B(W._payload),H)}if(pl(W))return P(z,I,W,H);if(Ys(W))return N(z,I,W,H);hu(z,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,I!==null&&I.tag===6?(n(z,I.sibling),I=i(I,W),I.return=z,z=I):(n(z,I),I=fh(W,z.mode,H),I.return=z,z=I),a(z)):n(z,I)}return M}var As=H8(!0),K8=H8(!1),Rc={},fi=Bo(Rc),fc=Bo(Rc),hc=Bo(Rc);function Yo(e){if(e===Rc)throw Error(Rt(174));return e}function x1(e,t){switch(Ee(hc,t),Ee(fc,e),Ee(fi,Rc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vp(t,e)}Me(fi),Ee(fi,t)}function xs(){Me(fi),Me(fc),Me(hc)}function Y8(e){Yo(hc.current);var t=Yo(fi.current),n=Vp(t,e.type);t!==n&&(Ee(fc,e),Ee(fi,n))}function L1(e){fc.current===e&&(Me(fi),Me(fc))}var Ne=Bo(0);function jd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ah=[];function C1(){for(var e=0;en?n:4,e(!0);var r=sh.transition;sh.transition={};try{e(!1),t()}finally{xe=n,sh.transition=r}}function f6(){return Br().memoizedState}function mS(e,t,n){var r=wo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},h6(e))p6(t,n);else if(n=q8(e,t,n,r),n!==null){var i=Mn();Wr(n,e,r,i),g6(n,t,r)}}function yS(e,t,n){var r=wo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(h6(e))p6(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Gr(s,a)){var u=t.interleaved;u===null?(i.next=i,w1(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=q8(e,t,i,r),n!==null&&(i=Mn(),Wr(n,e,r,i),g6(n,t,r))}}function h6(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function p6(e,t){Bl=Vd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function g6(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s1(e,n)}}var qd={readContext:Er,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},vS={readContext:Er,useCallback:function(e,t){return Xr().memoizedState=[e,t===void 0?null:t],e},useContext:Er,useEffect:gy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gu(4194308,4,s6.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gu(4,2,e,t)},useMemo:function(e,t){var n=Xr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mS.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=Xr();return e={current:e},t.memoizedState=e},useState:py,useDebugValue:B1,useDeferredValue:function(e){return Xr().memoizedState=e},useTransition:function(){var e=py(!1),t=e[0];return e=gS.bind(null,e[1]),Xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,i=Xr();if(Re){if(n===void 0)throw Error(Rt(407));n=n()}else{if(n=t(),sn===null)throw Error(Rt(349));fa&30||J8(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gy(e6.bind(null,r,o,e),[e]),r.flags|=2048,mc(9,t6.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Xr(),t=sn.identifierPrefix;if(Re){var n=Ii,r=Fi;n=(r&~(1<<32-Qr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[li]=t,e[dc]=r,L6(e,t,!1,!1),t.stateNode=e;t:{switch(a=Qp(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;iCs&&(t.flags|=128,r=!0,nl(o,!1),t.lanes=4194304)}else{if(!r)if(e=jd(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Re)return wn(t),null}else 2*Qe()-o.renderingStartTime>Cs&&n!==1073741824&&(t.flags|=128,r=!0,nl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=Ne.current,Ee(Ne,r?n&1|2:n&1),t):(wn(t),null);case 22:case 23:return R1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tr&1073741824&&(wn(t),t.subtreeFlags&6&&(t.flags|=8192)):wn(t),null;case 24:return null;case 25:return null}throw Error(Rt(156,t.tag))}function SS(e,t){switch(m1(t),t.tag){case 1:return qn(t.type)&&Od(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xs(),Me(Vn),Me(Ln),C1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return L1(t),null;case 13:if(Me(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Rt(340));ws()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Ne),null;case 4:return xs(),null;case 10:return b1(t.type._context),null;case 22:case 23:return R1(),null;case 24:return null;default:return null}}var gu=!1,xn=!1,FS=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function Qa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ve(e,t,r)}else n.current=null}function v2(e,t,n){try{n()}catch(r){Ve(e,t,r)}}var Ly=!1;function IS(e,t){if(e2=kd,e=B8(),p1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else t:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break t}var a=0,s=-1,u=-1,l=0,c=0,h=e,_=null;e:for(;;){for(var v;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(u=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(v=h.firstChild)!==null;)_=h,h=v;for(;;){if(h===e)break e;if(_===n&&++l===i&&(s=a),_===o&&++c===r&&(u=a),(v=h.nextSibling)!==null)break;h=_,_=h.parentNode}h=v}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(n2={focusedElem:e,selectionRange:n},kd=!1,Wt=t;Wt!==null;)if(t=Wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Wt=e;else for(;Wt!==null;){t=Wt;try{var P=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var N=P.memoizedProps,M=P.memoizedState,z=t.stateNode,I=z.getSnapshotBeforeUpdate(t.elementType===t.type?N:Nr(t.type,N),M);z.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var W=t.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Rt(163))}}catch(H){Ve(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,Wt=e;break}Wt=t.return}return P=Ly,Ly=!1,P}function kl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&v2(t,n,o)}i=i.next}while(i!==r)}}function Kf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function F6(e){var t=e.alternate;t!==null&&(e.alternate=null,F6(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[li],delete t[dc],delete t[o2],delete t[uS],delete t[dS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function I6(e){return e.tag===5||e.tag===3||e.tag===4}function Cy(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||I6(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function b2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Td));else if(r!==4&&(e=e.child,e!==null))for(b2(e,t,n),e=e.sibling;e!==null;)b2(e,t,n),e=e.sibling}function w2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(w2(e,t,n),e=e.sibling;e!==null;)w2(e,t,n),e=e.sibling}var fn=null,jr=!1;function Zi(e,t,n){for(n=n.child;n!==null;)E6(e,t,n),n=n.sibling}function E6(e,t,n){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount($f,n)}catch{}switch(n.tag){case 5:xn||Qa(n,t);case 6:var r=fn,i=jr;fn=null,Zi(e,t,n),fn=r,jr=i,fn!==null&&(jr?(e=fn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fn.removeChild(n.stateNode));break;case 18:fn!==null&&(jr?(e=fn,n=n.stateNode,e.nodeType===8?ih(e.parentNode,n):e.nodeType===1&&ih(e,n),ac(e)):ih(fn,n.stateNode));break;case 4:r=fn,i=jr,fn=n.stateNode.containerInfo,jr=!0,Zi(e,t,n),fn=r,jr=i;break;case 0:case 11:case 14:case 15:if(!xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&v2(n,t,a),i=i.next}while(i!==r)}Zi(e,t,n);break;case 1:if(!xn&&(Qa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ve(n,t,s)}Zi(e,t,n);break;case 21:Zi(e,t,n);break;case 22:n.mode&1?(xn=(r=xn)||n.memoizedState!==null,Zi(e,t,n),xn=r):Zi(e,t,n);break;default:Zi(e,t,n)}}function Sy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new FS),t.forEach(function(r){var i=zS.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Or(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*BS(r/1960))-r,10e?16:e,ho===null)var r=!1;else{if(e=ho,ho=null,Gd=0,de&6)throw Error(Rt(331));var i=de;for(de|=4,Wt=e.current;Wt!==null;){var o=Wt,a=o.child;if(Wt.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uQe()-T1?ea(e,0):M1|=n),Qn(e,t)}function z6(e,t){t===0&&(e.mode&1?(t=au,au<<=1,!(au&130023424)&&(au=4194304)):t=1);var n=Mn();e=Ni(e,t),e!==null&&(Mc(e,t,n),Qn(e,n))}function RS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),z6(e,n)}function zS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Rt(314))}r!==null&&r.delete(t),z6(e,n)}var D6;D6=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Vn.current)jn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jn=!1,LS(e,t,n);jn=!!(e.flags&131072)}else jn=!1,Re&&t.flags&1048576&&$8(t,Dd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hu(e,t),e=t.pendingProps;var i=bs(t,Ln.current);ls(t,n),i=F1(null,t,r,e,i,n);var o=I1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qn(r)?(o=!0,Rd(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,A1(t),i.updater=Gf,t.stateNode=i,i._reactInternals=t,d2(t,r,e,n),t=p2(null,t,r,!0,o,n)):(t.tag=0,Re&&o&&g1(t),Bn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;t:{switch(Hu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=NS(r),e=Nr(r,e),i){case 0:t=h2(null,t,r,e,n);break t;case 1:t=wy(null,t,r,e,n);break t;case 11:t=_y(null,t,r,e,n);break t;case 14:t=by(null,t,r,Nr(r.type,e),n);break t}throw Error(Rt(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nr(r,i),h2(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nr(r,i),wy(e,t,r,i,n);case 3:t:{if(w6(t),e===null)throw Error(Rt(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Q8(e,t),$d(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ls(Error(Rt(423)),t),t=Ay(e,t,r,n,i);break t}else if(r!==i){i=Ls(Error(Rt(424)),t),t=Ay(e,t,r,n,i);break t}else for(er=vo(t.stateNode.containerInfo.firstChild),rr=t,Re=!0,Vr=null,n=K8(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ws(),r===i){t=Ui(e,t,n);break t}Bn(e,t,r,n)}t=t.child}return t;case 5:return Y8(t),e===null&&l2(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,r2(r,i)?a=null:o!==null&&r2(r,o)&&(t.flags|=32),b6(e,t),Bn(e,t,a,n),t.child;case 6:return e===null&&l2(t),null;case 13:return A6(e,t,n);case 4:return x1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=As(t,null,r,n):Bn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nr(r,i),_y(e,t,r,i,n);case 7:return Bn(e,t,t.pendingProps,n),t.child;case 8:return Bn(e,t,t.pendingProps.children,n),t.child;case 12:return Bn(e,t,t.pendingProps.children,n),t.child;case 10:t:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Ee(Nd,r._currentValue),r._currentValue=a,o!==null)if(Gr(o.value,a)){if(o.children===i.children&&!Vn.current){t=Ui(e,t,n);break t}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ki(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),c2(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Rt(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),c2(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ls(t,n),i=Er(i),r=r(i),t.flags|=1,Bn(e,t,r,n),t.child;case 14:return r=t.type,i=Nr(r,t.pendingProps),i=Nr(r.type,i),by(e,t,r,i,n);case 15:return v6(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nr(r,i),Hu(e,t),t.tag=1,qn(r)?(e=!0,Rd(t)):e=!1,ls(t,n),G8(t,r,i),d2(t,r,i,n),p2(null,t,r,!0,e,n);case 19:return x6(e,t,n);case 22:return _6(e,t,n)}throw Error(Rt(156,t.tag))};function N6(e,t){return d8(e,t)}function DS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ar(e,t,n,r){return new DS(e,t,n,r)}function D1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NS(e){if(typeof e=="function")return D1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r1)return 11;if(e===i1)return 14}return 2}function Ao(e,t){var n=e.alternate;return n===null?(n=Ar(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zu(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")D1(e)&&(a=1);else if(typeof e=="string")a=5;else t:switch(e){case Ra:return na(n.children,i,o,t);case n1:a=8,i|=8;break;case Op:return e=Ar(12,n,t,i|2),e.elementType=Op,e.lanes=o,e;case Rp:return e=Ar(13,n,t,i),e.elementType=Rp,e.lanes=o,e;case zp:return e=Ar(19,n,t,i),e.elementType=zp,e.lanes=o,e;case Hb:return Zf(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wb:a=10;break t;case Gb:a=9;break t;case r1:a=11;break t;case i1:a=14;break t;case io:a=16,r=null;break t}throw Error(Rt(130,e==null?e:typeof e,""))}return t=Ar(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function na(e,t,n,r){return e=Ar(7,e,r,t),e.lanes=n,e}function Zf(e,t,n,r){return e=Ar(22,e,r,t),e.elementType=Hb,e.lanes=n,e.stateNode={isHidden:!1},e}function fh(e,t,n){return e=Ar(6,e,null,t),e.lanes=n,e}function hh(e,t,n){return t=Ar(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function US(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=G0(0),this.expirationTimes=G0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=G0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function N1(e,t,n,r,i,o,a,s,u){return e=new US(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ar(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},A1(o),e}function $S(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ur})(j9);var[V6,WS]=cr({strict:!1,name:"PortalContext"}),V1="chakra-portal",GS=".chakra-portal",HS=e=>wt("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),KS=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=at.useState(null),o=at.useRef(null),[,a]=at.useState({});at.useEffect(()=>a({}),[]);const s=WS(),u=$9();vs(()=>{if(!r)return;const c=r.ownerDocument,h=t?s??c.body:c.body;if(!h)return;o.current=c.createElement("div"),o.current.className=V1,h.appendChild(o.current),a({});const _=o.current;return()=>{h.contains(_)&&h.removeChild(_)}},[r]);const l=u!=null&&u.zIndex?wt(HS,{zIndex:u==null?void 0:u.zIndex,children:n}):n;return o.current?tc.createPortal(wt(V6,{value:o.current,children:l}),o.current):wt("span",{ref:c=>{c&&i(c)}})},YS=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=at.useMemo(()=>{const u=i==null?void 0:i.ownerDocument.createElement("div");return u&&(u.className=V1),u},[i]),[,s]=at.useState({});return vs(()=>s({}),[]),vs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?tc.createPortal(wt(V6,{value:r?a:null,children:t}),a):null};function zc(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?wt(YS,{containerRef:n,...r}):wt(KS,{...r})}zc.className=V1;zc.selector=GS;zc.displayName="Portal";function q1(){const e=at.useContext(Jl);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var Q1=at.createContext({});Q1.displayName="ColorModeContext";function W1(){const e=at.useContext(Q1);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var vu={light:"chakra-ui-light",dark:"chakra-ui-dark"};function ZS(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?vu.dark:vu.light),document.body.classList.remove(r?vu.light:vu.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var XS="chakra-ui-color-mode";function JS(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var tF=JS(XS),Ty=()=>{};function Oy(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function q6(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=tF}=e,s=i==="dark"?"dark":"light",[u,l]=at.useState(()=>Oy(a,s)),[c,h]=at.useState(()=>Oy(a)),{getSystemTheme:_,setClassName:v,setDataset:P,addListener:N}=at.useMemo(()=>ZS({preventTransition:o}),[o]),M=i==="system"&&!u?c:u,z=at.useCallback(H=>{const it=H==="system"?_():H;l(it),v(it==="dark"),P(it),a.set(it)},[a,_,v,P]);vs(()=>{i==="system"&&h(_())},[]),at.useEffect(()=>{const H=a.get();if(H){z(H);return}if(i==="system"){z("system");return}z(s)},[a,s,i,z]);const I=at.useCallback(()=>{z(M==="dark"?"light":"dark")},[M,z]);at.useEffect(()=>{if(r)return N(z)},[r,N,z]);const W=at.useMemo(()=>({colorMode:t??M,toggleColorMode:t?Ty:I,setColorMode:t?Ty:z,forced:t!==void 0}),[M,I,z,t]);return wt(Q1.Provider,{value:W,children:n})}q6.displayName="ColorModeProvider";function eF(){const e=W1(),t=q1();return{...e,theme:t}}var Cn=(...e)=>e.filter(Boolean).join(" ");function Sr(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function po(e,...t){return nF(e)?e(...t):e}var nF=e=>typeof e=="function",Ga=e=>e?"":void 0,ph=e=>e?!0:void 0;function hn(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Yd={},rF={get exports(){return Yd},set exports(e){Yd=e}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",_="[object Error]",v="[object Function]",P="[object GeneratorFunction]",N="[object Map]",M="[object Number]",z="[object Null]",I="[object Object]",W="[object Proxy]",H="[object RegExp]",it="[object Set]",B="[object String]",p="[object Undefined]",L="[object WeakMap]",Z="[object ArrayBuffer]",K="[object DataView]",G="[object Float32Array]",et="[object Float64Array]",w="[object Int8Array]",g="[object Int16Array]",E="[object Int32Array]",U="[object Uint8Array]",Q="[object Uint8ClampedArray]",T="[object Uint16Array]",Y="[object Uint32Array]",J=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,O={};O[G]=O[et]=O[w]=O[g]=O[E]=O[U]=O[Q]=O[T]=O[Y]=!0,O[s]=O[u]=O[Z]=O[c]=O[K]=O[h]=O[_]=O[v]=O[N]=O[M]=O[I]=O[H]=O[it]=O[B]=O[L]=!1;var lt=typeof ci=="object"&&ci&&ci.Object===Object&&ci,S=typeof self=="object"&&self&&self.Object===Object&&self,d=lt||S||Function("return this")(),$=t&&!t.nodeType&&t,f=$&&!0&&e&&!e.nodeType&&e,R=f&&f.exports===$,k=R&<.process,x=function(){try{var st=f&&f.require&&f.require("util").types;return st||k&&k.binding&&k.binding("util")}catch{}}(),ot=x&&x.isTypedArray;function _t(st,ht,At){switch(At.length){case 0:return st.call(ht);case 1:return st.call(ht,At[0]);case 2:return st.call(ht,At[0],At[1]);case 3:return st.call(ht,At[0],At[1],At[2])}return st.apply(ht,At)}function dt(st,ht){for(var At=-1,qt=Array(st);++At-1}function ne(st,ht){var At=this.__data__,qt=Ki(At,st);return qt<0?(++this.size,At.push([st,ht])):At[qt][1]=ht,this}Nt.prototype.clear=Qt,Nt.prototype.delete=Ht,Nt.prototype.get=$t,Nt.prototype.has=Dt,Nt.prototype.set=ne;function te(st){var ht=-1,At=st==null?0:st.length;for(this.clear();++ht1?At[ue-1]:void 0,Te=ue>2?At[2]:void 0;for(Fe=st.length>3&&typeof Fe=="function"?(ue--,Fe):void 0,Te&&OL(At[0],At[1],Te)&&(Fe=ue<3?void 0:Fe,ue=1),ht=Object(ht);++qt-1&&st%1==0&&st0){if(++ht>=i)return arguments[0]}else ht=0;return st.apply(void 0,arguments)}}function VL(st){if(st!=null){try{return Lt.call(st)}catch{}try{return st+""}catch{}}return""}function Jc(st,ht){return st===ht||st!==st&&ht!==ht}var T0=xa(function(){return arguments}())?xa:function(st){return Gs(st)&&St.call(st,"callee")&&!m.call(st,"callee")},O0=Array.isArray;function R0(st){return st!=null&&um(st.length)&&!z0(st)}function qL(st){return Gs(st)&&R0(st)}var cm=rt||KL;function z0(st){if(!Ro(st))return!1;var ht=Yi(st);return ht==v||ht==P||ht==l||ht==W}function um(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=a}function Ro(st){var ht=typeof st;return st!=null&&(ht=="object"||ht=="function")}function Gs(st){return st!=null&&typeof st=="object"}function QL(st){if(!Gs(st)||Yi(st)!=I)return!1;var ht=tt(st);if(ht===null)return!0;var At=St.call(ht,"constructor")&&ht.constructor;return typeof At=="function"&&At instanceof At&&Lt.call(At)==j}var dm=ot?bt(ot):js;function WL(st){return BL(st,fm(st))}function fm(st){return R0(st)?Kr(st,!0):Vs(st)}var GL=kL(function(st,ht,At,qt){La(st,ht,At,qt)});function HL(st){return function(){return st}}function hm(st){return st}function KL(){return!1}e.exports=GL})(rF,Yd);const xr=Yd;var iF=e=>/!(important)?$/.test(e),Ry=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,oF=(e,t)=>n=>{const r=String(t),i=iF(r),o=Ry(r),a=e?`${e}.${o}`:o;let s=Sr(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Ry(s),i?`${s} !important`:s};function G1(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var s;const u=oF(t,o)(a);let l=(s=n==null?void 0:n(u,a))!=null?s:u;return r&&(l=r(l,a)),l}}var _u=(...e)=>t=>e.reduce((n,r)=>r(n),t);function gr(e,t){return n=>{const r={property:n,scale:e};return r.transform=G1({scale:e,transform:t}),r}}var aF=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function sF(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:aF(t),transform:n?G1({scale:n,compose:r}):r}}var Q6=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function lF(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Q6].join(" ")}function cF(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Q6].join(" ")}var uF={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},dF={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function fF(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var hF={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},S2={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},pF=new Set(Object.values(S2)),F2=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),gF=e=>e.trim();function mF(e,t){if(e==null||F2.has(e))return e;if(!(I2(e)||F2.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[u,...l]=a.split(",").map(gF).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const c=u in S2?S2[u]:u;l.unshift(c);const h=l.map(_=>{if(pF.has(_))return _;const v=_.indexOf(" "),[P,N]=v!==-1?[_.substr(0,v),_.substr(v+1)]:[_],M=I2(N)?N:N&&N.split(" "),z=`colors.${P}`,I=z in t.__cssMap?t.__cssMap[z].varRef:P;return M?[I,...Array.isArray(M)?M:[M]].join(" "):I});return`${s}(${h.join(", ")})`}var I2=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),yF=(e,t)=>mF(e,t??{});function vF(e){return/^var\(--.+\)$/.test(e)}var _F=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Zr=e=>t=>`${e}(${t})`,fe={filter(e){return e!=="auto"?e:uF},backdropFilter(e){return e!=="auto"?e:dF},ring(e){return fF(fe.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?lF():e==="auto-gpu"?cF():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=_F(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(vF(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:yF,blur:Zr("blur"),opacity:Zr("opacity"),brightness:Zr("brightness"),contrast:Zr("contrast"),dropShadow:Zr("drop-shadow"),grayscale:Zr("grayscale"),hueRotate:Zr("hue-rotate"),invert:Zr("invert"),saturate:Zr("saturate"),sepia:Zr("sepia"),bgImage(e){return e==null||I2(e)||F2.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=hF[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},pt={borderWidths:gr("borderWidths"),borderStyles:gr("borderStyles"),colors:gr("colors"),borders:gr("borders"),gradients:gr("gradients",fe.gradient),radii:gr("radii",fe.px),space:gr("space",_u(fe.vh,fe.px)),spaceT:gr("space",_u(fe.vh,fe.px)),degreeT(e){return{property:e,transform:fe.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:G1({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:gr("sizes",_u(fe.vh,fe.px)),sizesT:gr("sizes",_u(fe.vh,fe.fraction)),shadows:gr("shadows"),logical:sF,blur:gr("blur",fe.blur)},Xu={background:pt.colors("background"),backgroundColor:pt.colors("backgroundColor"),backgroundImage:pt.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:fe.bgClip},bgSize:pt.prop("backgroundSize"),bgPosition:pt.prop("backgroundPosition"),bg:pt.colors("background"),bgColor:pt.colors("backgroundColor"),bgPos:pt.prop("backgroundPosition"),bgRepeat:pt.prop("backgroundRepeat"),bgAttachment:pt.prop("backgroundAttachment"),bgGradient:pt.gradients("backgroundImage"),bgClip:{transform:fe.bgClip}};Object.assign(Xu,{bgImage:Xu.backgroundImage,bgImg:Xu.backgroundImage});var me={border:pt.borders("border"),borderWidth:pt.borderWidths("borderWidth"),borderStyle:pt.borderStyles("borderStyle"),borderColor:pt.colors("borderColor"),borderRadius:pt.radii("borderRadius"),borderTop:pt.borders("borderTop"),borderBlockStart:pt.borders("borderBlockStart"),borderTopLeftRadius:pt.radii("borderTopLeftRadius"),borderStartStartRadius:pt.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:pt.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:pt.radii("borderTopRightRadius"),borderStartEndRadius:pt.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:pt.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:pt.borders("borderRight"),borderInlineEnd:pt.borders("borderInlineEnd"),borderBottom:pt.borders("borderBottom"),borderBlockEnd:pt.borders("borderBlockEnd"),borderBottomLeftRadius:pt.radii("borderBottomLeftRadius"),borderBottomRightRadius:pt.radii("borderBottomRightRadius"),borderLeft:pt.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:pt.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:pt.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:pt.borders(["borderLeft","borderRight"]),borderInline:pt.borders("borderInline"),borderY:pt.borders(["borderTop","borderBottom"]),borderBlock:pt.borders("borderBlock"),borderTopWidth:pt.borderWidths("borderTopWidth"),borderBlockStartWidth:pt.borderWidths("borderBlockStartWidth"),borderTopColor:pt.colors("borderTopColor"),borderBlockStartColor:pt.colors("borderBlockStartColor"),borderTopStyle:pt.borderStyles("borderTopStyle"),borderBlockStartStyle:pt.borderStyles("borderBlockStartStyle"),borderBottomWidth:pt.borderWidths("borderBottomWidth"),borderBlockEndWidth:pt.borderWidths("borderBlockEndWidth"),borderBottomColor:pt.colors("borderBottomColor"),borderBlockEndColor:pt.colors("borderBlockEndColor"),borderBottomStyle:pt.borderStyles("borderBottomStyle"),borderBlockEndStyle:pt.borderStyles("borderBlockEndStyle"),borderLeftWidth:pt.borderWidths("borderLeftWidth"),borderInlineStartWidth:pt.borderWidths("borderInlineStartWidth"),borderLeftColor:pt.colors("borderLeftColor"),borderInlineStartColor:pt.colors("borderInlineStartColor"),borderLeftStyle:pt.borderStyles("borderLeftStyle"),borderInlineStartStyle:pt.borderStyles("borderInlineStartStyle"),borderRightWidth:pt.borderWidths("borderRightWidth"),borderInlineEndWidth:pt.borderWidths("borderInlineEndWidth"),borderRightColor:pt.colors("borderRightColor"),borderInlineEndColor:pt.colors("borderInlineEndColor"),borderRightStyle:pt.borderStyles("borderRightStyle"),borderInlineEndStyle:pt.borderStyles("borderInlineEndStyle"),borderTopRadius:pt.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:pt.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:pt.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:pt.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(me,{rounded:me.borderRadius,roundedTop:me.borderTopRadius,roundedTopLeft:me.borderTopLeftRadius,roundedTopRight:me.borderTopRightRadius,roundedTopStart:me.borderStartStartRadius,roundedTopEnd:me.borderStartEndRadius,roundedBottom:me.borderBottomRadius,roundedBottomLeft:me.borderBottomLeftRadius,roundedBottomRight:me.borderBottomRightRadius,roundedBottomStart:me.borderEndStartRadius,roundedBottomEnd:me.borderEndEndRadius,roundedLeft:me.borderLeftRadius,roundedRight:me.borderRightRadius,roundedStart:me.borderInlineStartRadius,roundedEnd:me.borderInlineEndRadius,borderStart:me.borderInlineStart,borderEnd:me.borderInlineEnd,borderTopStartRadius:me.borderStartStartRadius,borderTopEndRadius:me.borderStartEndRadius,borderBottomStartRadius:me.borderEndStartRadius,borderBottomEndRadius:me.borderEndEndRadius,borderStartRadius:me.borderInlineStartRadius,borderEndRadius:me.borderInlineEndRadius,borderStartWidth:me.borderInlineStartWidth,borderEndWidth:me.borderInlineEndWidth,borderStartColor:me.borderInlineStartColor,borderEndColor:me.borderInlineEndColor,borderStartStyle:me.borderInlineStartStyle,borderEndStyle:me.borderInlineEndStyle});var bF={color:pt.colors("color"),textColor:pt.colors("color"),fill:pt.colors("fill"),stroke:pt.colors("stroke")},E2={boxShadow:pt.shadows("boxShadow"),mixBlendMode:!0,blendMode:pt.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:pt.prop("backgroundBlendMode"),opacity:!0};Object.assign(E2,{shadow:E2.boxShadow});var wF={filter:{transform:fe.filter},blur:pt.blur("--chakra-blur"),brightness:pt.propT("--chakra-brightness",fe.brightness),contrast:pt.propT("--chakra-contrast",fe.contrast),hueRotate:pt.degreeT("--chakra-hue-rotate"),invert:pt.propT("--chakra-invert",fe.invert),saturate:pt.propT("--chakra-saturate",fe.saturate),dropShadow:pt.propT("--chakra-drop-shadow",fe.dropShadow),backdropFilter:{transform:fe.backdropFilter},backdropBlur:pt.blur("--chakra-backdrop-blur"),backdropBrightness:pt.propT("--chakra-backdrop-brightness",fe.brightness),backdropContrast:pt.propT("--chakra-backdrop-contrast",fe.contrast),backdropHueRotate:pt.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:pt.propT("--chakra-backdrop-invert",fe.invert),backdropSaturate:pt.propT("--chakra-backdrop-saturate",fe.saturate)},Zd={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:fe.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:pt.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:pt.space("gap"),rowGap:pt.space("rowGap"),columnGap:pt.space("columnGap")};Object.assign(Zd,{flexDir:Zd.flexDirection});var W6={gridGap:pt.space("gridGap"),gridColumnGap:pt.space("gridColumnGap"),gridRowGap:pt.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},AF={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:fe.outline},outlineOffset:!0,outlineColor:pt.colors("outlineColor")},vr={width:pt.sizesT("width"),inlineSize:pt.sizesT("inlineSize"),height:pt.sizes("height"),blockSize:pt.sizes("blockSize"),boxSize:pt.sizes(["width","height"]),minWidth:pt.sizes("minWidth"),minInlineSize:pt.sizes("minInlineSize"),minHeight:pt.sizes("minHeight"),minBlockSize:pt.sizes("minBlockSize"),maxWidth:pt.sizes("maxWidth"),maxInlineSize:pt.sizes("maxInlineSize"),maxHeight:pt.sizes("maxHeight"),maxBlockSize:pt.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:pt.propT("float",fe.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(vr,{w:vr.width,h:vr.height,minW:vr.minWidth,maxW:vr.maxWidth,minH:vr.minHeight,maxH:vr.maxHeight,overscroll:vr.overscrollBehavior,overscrollX:vr.overscrollBehaviorX,overscrollY:vr.overscrollBehaviorY});var xF={listStyleType:!0,listStylePosition:!0,listStylePos:pt.prop("listStylePosition"),listStyleImage:!0,listStyleImg:pt.prop("listStyleImage")};function LF(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const u=e(r,i,o,a);return s.set(i,u),u}},SF=CF(LF),FF={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},IF={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gh=(e,t,n)=>{const r={},i=SF(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},EF={srOnly:{transform(e){return e===!0?FF:e==="focusable"?IF:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gh(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gh(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gh(t,e,n)}},Tl={position:!0,pos:pt.prop("position"),zIndex:pt.prop("zIndex","zIndices"),inset:pt.spaceT("inset"),insetX:pt.spaceT(["left","right"]),insetInline:pt.spaceT("insetInline"),insetY:pt.spaceT(["top","bottom"]),insetBlock:pt.spaceT("insetBlock"),top:pt.spaceT("top"),insetBlockStart:pt.spaceT("insetBlockStart"),bottom:pt.spaceT("bottom"),insetBlockEnd:pt.spaceT("insetBlockEnd"),left:pt.spaceT("left"),insetInlineStart:pt.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:pt.spaceT("right"),insetInlineEnd:pt.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Tl,{insetStart:Tl.insetInlineStart,insetEnd:Tl.insetInlineEnd});var BF={ring:{transform:fe.ring},ringColor:pt.colors("--chakra-ring-color"),ringOffset:pt.prop("--chakra-ring-offset-width"),ringOffsetColor:pt.colors("--chakra-ring-offset-color"),ringInset:pt.prop("--chakra-ring-inset")},Pe={margin:pt.spaceT("margin"),marginTop:pt.spaceT("marginTop"),marginBlockStart:pt.spaceT("marginBlockStart"),marginRight:pt.spaceT("marginRight"),marginInlineEnd:pt.spaceT("marginInlineEnd"),marginBottom:pt.spaceT("marginBottom"),marginBlockEnd:pt.spaceT("marginBlockEnd"),marginLeft:pt.spaceT("marginLeft"),marginInlineStart:pt.spaceT("marginInlineStart"),marginX:pt.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:pt.spaceT("marginInline"),marginY:pt.spaceT(["marginTop","marginBottom"]),marginBlock:pt.spaceT("marginBlock"),padding:pt.space("padding"),paddingTop:pt.space("paddingTop"),paddingBlockStart:pt.space("paddingBlockStart"),paddingRight:pt.space("paddingRight"),paddingBottom:pt.space("paddingBottom"),paddingBlockEnd:pt.space("paddingBlockEnd"),paddingLeft:pt.space("paddingLeft"),paddingInlineStart:pt.space("paddingInlineStart"),paddingInlineEnd:pt.space("paddingInlineEnd"),paddingX:pt.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:pt.space("paddingInline"),paddingY:pt.space(["paddingTop","paddingBottom"]),paddingBlock:pt.space("paddingBlock")};Object.assign(Pe,{m:Pe.margin,mt:Pe.marginTop,mr:Pe.marginRight,me:Pe.marginInlineEnd,marginEnd:Pe.marginInlineEnd,mb:Pe.marginBottom,ml:Pe.marginLeft,ms:Pe.marginInlineStart,marginStart:Pe.marginInlineStart,mx:Pe.marginX,my:Pe.marginY,p:Pe.padding,pt:Pe.paddingTop,py:Pe.paddingY,px:Pe.paddingX,pb:Pe.paddingBottom,pl:Pe.paddingLeft,ps:Pe.paddingInlineStart,paddingStart:Pe.paddingInlineStart,pr:Pe.paddingRight,pe:Pe.paddingInlineEnd,paddingEnd:Pe.paddingInlineEnd});var kF={textDecorationColor:pt.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:pt.shadows("textShadow")},PF={clipPath:!0,transform:pt.propT("transform",fe.transform),transformOrigin:!0,translateX:pt.spaceT("--chakra-translate-x"),translateY:pt.spaceT("--chakra-translate-y"),skewX:pt.degreeT("--chakra-skew-x"),skewY:pt.degreeT("--chakra-skew-y"),scaleX:pt.prop("--chakra-scale-x"),scaleY:pt.prop("--chakra-scale-y"),scale:pt.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:pt.degreeT("--chakra-rotate")},MF={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:pt.prop("transitionDuration","transition.duration"),transitionProperty:pt.prop("transitionProperty","transition.property"),transitionTimingFunction:pt.prop("transitionTimingFunction","transition.easing")},TF={fontFamily:pt.prop("fontFamily","fonts"),fontSize:pt.prop("fontSize","fontSizes",fe.px),fontWeight:pt.prop("fontWeight","fontWeights"),lineHeight:pt.prop("lineHeight","lineHeights"),letterSpacing:pt.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},OF={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:pt.spaceT("scrollMargin"),scrollMarginTop:pt.spaceT("scrollMarginTop"),scrollMarginBottom:pt.spaceT("scrollMarginBottom"),scrollMarginLeft:pt.spaceT("scrollMarginLeft"),scrollMarginRight:pt.spaceT("scrollMarginRight"),scrollMarginX:pt.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:pt.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:pt.spaceT("scrollPadding"),scrollPaddingTop:pt.spaceT("scrollPaddingTop"),scrollPaddingBottom:pt.spaceT("scrollPaddingBottom"),scrollPaddingLeft:pt.spaceT("scrollPaddingLeft"),scrollPaddingRight:pt.spaceT("scrollPaddingRight"),scrollPaddingX:pt.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:pt.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function G6(e){return Sr(e)&&e.reference?e.reference:String(e)}var n0=(e,...t)=>t.map(G6).join(` ${e} `).replace(/calc/g,""),zy=(...e)=>`calc(${n0("+",...e)})`,Dy=(...e)=>`calc(${n0("-",...e)})`,B2=(...e)=>`calc(${n0("*",...e)})`,Ny=(...e)=>`calc(${n0("/",...e)})`,Uy=e=>{const t=G6(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:B2(t,-1)},Qo=Object.assign(e=>({add:(...t)=>Qo(zy(e,...t)),subtract:(...t)=>Qo(Dy(e,...t)),multiply:(...t)=>Qo(B2(e,...t)),divide:(...t)=>Qo(Ny(e,...t)),negate:()=>Qo(Uy(e)),toString:()=>e.toString()}),{add:zy,subtract:Dy,multiply:B2,divide:Ny,negate:Uy});function RF(e,t="-"){return e.replace(/\s+/g,t)}function zF(e){const t=RF(e.toString());return NF(DF(t))}function DF(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function NF(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function UF(e,t=""){return[t,e].filter(Boolean).join("-")}function $F(e,t){return`var(${e}${t?`, ${t}`:""})`}function jF(e,t=""){return zF(`--${UF(e,t)}`)}function Jt(e,t,n){const r=jF(e,n);return{variable:r,reference:$F(r,t)}}function VF(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=Jt(`${e}-${i}`,o);continue}n[r]=Jt(`${e}-${r}`)}return n}function qF(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function QF(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function k2(e){if(e==null)return e;const{unitless:t}=QF(e);return t||typeof e=="number"?`${e}px`:e}var H6=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,H1=e=>Object.fromEntries(Object.entries(e).sort(H6));function $y(e){const t=H1(e);return Object.assign(Object.values(t),t)}function WF(e){const t=Object.keys(H1(e));return new Set(t)}function jy(e){var t;if(!e)return e;e=(t=k2(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function yl(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${k2(e)})`),t&&n.push("and",`(max-width: ${k2(t)})`),n.join(" ")}function GF(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=$y(e),r=Object.entries(e).sort(H6).map(([a,s],u,l)=>{var c;let[,h]=(c=l[u+1])!=null?c:[];return h=parseFloat(h)>0?jy(h):void 0,{_minW:jy(s),breakpoint:a,minW:s,maxW:h,maxWQuery:yl(null,h),minWQuery:yl(s),minMaxQuery:yl(s,h)}}),i=WF(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(u=>i.has(u))},asObject:H1(e),asArray:$y(e),details:r,get(a){return r.find(s=>s.breakpoint===a)},media:[null,...n.map(a=>yl(a)).slice(1)],toArrayValue(a){if(!Sr(a))throw new Error("toArrayValue: value must be an object");const s=o.map(u=>{var l;return(l=a[u])!=null?l:null});for(;qF(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,u,l)=>{const c=o[l];return c!=null&&u!=null&&(s[c]=u),s},{})}}}var cn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Xi=e=>K6(t=>e(t,"&"),"[role=group]","[data-group]",".group"),_i=e=>K6(t=>e(t,"~ &"),"[data-peer]",".peer"),K6=(e,...t)=>t.map(e).join(", "),r0={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Xi(cn.hover),_peerHover:_i(cn.hover),_groupFocus:Xi(cn.focus),_peerFocus:_i(cn.focus),_groupFocusVisible:Xi(cn.focusVisible),_peerFocusVisible:_i(cn.focusVisible),_groupActive:Xi(cn.active),_peerActive:_i(cn.active),_groupDisabled:Xi(cn.disabled),_peerDisabled:_i(cn.disabled),_groupInvalid:Xi(cn.invalid),_peerInvalid:_i(cn.invalid),_groupChecked:Xi(cn.checked),_peerChecked:_i(cn.checked),_groupFocusWithin:Xi(cn.focusWithin),_peerFocusWithin:_i(cn.focusWithin),_peerPlaceholderShown:_i(cn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Y6=Object.keys(r0);function Vy(e,t){return Jt(String(e).replace(/\./g,"-"),void 0,t)}function HF(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:u,reference:l}=Vy(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const _=i.split("."),[v,...P]=_,N=`${v}.-${P.join(".")}`,M=Qo.negate(s),z=Qo.negate(l);r[N]={value:M,var:u,varRef:z}}n[u]=s,r[i]={value:s,var:u,varRef:l};continue}const c=_=>{const P=[String(i).split(".")[0],_].join(".");if(!e[P])return _;const{reference:M}=Vy(P,t==null?void 0:t.cssVarPrefix);return M},h=Sr(s)?s:{default:s};n=xr(n,Object.entries(h).reduce((_,[v,P])=>{var N,M;if(!P)return _;const z=c(`${P}`);if(v==="default")return _[u]=z,_;const I=(M=(N=r0)==null?void 0:N[v])!=null?M:v;return _[I]={[u]:z},_},{})),r[i]={value:l,var:u,varRef:l}}return{cssVars:n,cssMap:r}}function KF(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function YF(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function ZF(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function qy(e,t,n={}){const{stop:r,getKey:i}=n;function o(a,s=[]){var u;if(ZF(a)||Array.isArray(a)){const l={};for(const[c,h]of Object.entries(a)){const _=(u=i==null?void 0:i(c))!=null?u:c,v=[...s,_];if(r!=null&&r(a,v))return t(a,s);l[_]=o(h,v)}return l}return t(a,s)}return o(e)}var XF=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function JF(e){return YF(e,XF)}function tI(e){return e.semanticTokens}function eI(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var nI=e=>Y6.includes(e)||e==="default";function rI({tokens:e,semanticTokens:t}){const n={};return qy(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),qy(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(nI)}),n}function iI(e){var t;const n=eI(e),r=JF(n),i=tI(n),o=rI({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:u}=HF(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...u},__cssMap:s,__breakpoints:GF(n.breakpoints)}),n}var K1=xr({},Xu,me,bF,Zd,vr,wF,BF,AF,W6,EF,Tl,E2,Pe,OF,TF,kF,PF,xF,MF);Object.assign({},Pe,vr,Zd,W6,Tl);var oI=[...Object.keys(K1),...Y6],aI={...K1,...r0},sI=e=>e in aI,lI=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=po(e[a],t);if(s==null)continue;if(s=Sr(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const u=s.slice(0,i.length).length;for(let l=0;le.startsWith("--")&&typeof t=="string"&&!uI(t),fI=(e,t)=>{var n,r;if(t==null)return t;const i=u=>{var l,c;return(c=(l=e.__cssMap)==null?void 0:l[u])==null?void 0:c.varRef},o=u=>{var l;return(l=i(u))!=null?l:u},[a,s]=cI(t);return t=(r=(n=i(a))!=null?n:o(s))!=null?r:o(t),t};function hI(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s,u,l;const c=po(o,r),h=lI(c)(r);let _={};for(let v in h){const P=h[v];let N=po(P,r);v in n&&(v=n[v]),dI(v,N)&&(N=fI(r,N));let M=t[v];if(M===!0&&(M={property:v}),Sr(N)){_[v]=(s=_[v])!=null?s:{},_[v]=xr({},_[v],i(N,!0));continue}let z=(l=(u=M==null?void 0:M.transform)==null?void 0:u.call(M,N,r,c))!=null?l:N;z=M!=null&&M.processResult?i(z,!0):z;const I=po(M==null?void 0:M.property,r);if(!a&&(M!=null&&M.static)){const W=po(M.static,r);_=xr({},_,W)}if(I&&Array.isArray(I)){for(const W of I)_[W]=z;continue}if(I){I==="&"&&Sr(z)?_=xr({},_,z):_[I]=z;continue}if(Sr(z)){_=xr({},_,z);continue}_[v]=z}return _};return i}var Z6=e=>t=>hI({theme:t,pseudos:r0,configs:K1})(e);function Be(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function pI(e,t){if(Array.isArray(e))return e;if(Sr(e))return t(e);if(e!=null)return[e]}function gI(e,t){for(let n=t+1;n{xr(l,{[W]:_?I[W]:{[z]:I[W]}})});continue}if(!v){_?xr(l,I):l[z]=I;continue}l[z]=I}}return l}}function yI(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,a=mI(o);return xr({},po((n=e.baseStyle)!=null?n:{},t),a(e,"sizes",i,t),a(e,"variants",r,t))}}function vI(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function Hr(e){return KF(e,["styleConfig","size","variant","colorScheme"])}var _I=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function bI(e){return Sr(e)?_I.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var wI={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},AI={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},xI={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},LI={property:wI,easing:AI,duration:xI},CI=LI,SI={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},FI=SI,II={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},EI=II,BI={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},kI=BI,PI={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},MI=PI,TI={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},OI=TI,RI={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},zI=RI,DI={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},NI=DI,UI={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},X6=UI,J6={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},$I={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},jI={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},VI={...J6,...$I,container:jI},t5=VI,qI={breakpoints:kI,zIndices:FI,radii:OI,blur:NI,colors:MI,...X6,sizes:t5,shadows:zI,space:J6,borders:EI,transition:CI},{defineMultiStyleConfig:QI,definePartsStyle:vl}=Be(["stepper","step","title","description","indicator","separator","icon","number"]),xi=Jt("stepper-indicator-size"),Ha=Jt("stepper-icon-size"),Ka=Jt("stepper-title-font-size"),_l=Jt("stepper-description-font-size"),il=Jt("stepper-accent-color"),WI=vl(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[il.variable]:`colors.${e}.500`,_dark:{[il.variable]:`colors.${e}.200`}},title:{fontSize:Ka.reference,fontWeight:"medium"},description:{fontSize:_l.reference,color:"chakra-subtle-text"},number:{fontSize:Ka.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Ha.reference,height:Ha.reference},indicator:{flexShrink:0,borderRadius:"full",width:xi.reference,height:xi.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:il.reference},"&[data-status=complete]":{bg:il.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:il.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${xi.reference} - 8px)`,top:`calc(${xi.reference} + 4px)`,insetStart:`calc(${xi.reference} / 2 - 1px)`}}})),GI=QI({baseStyle:WI,sizes:{xs:vl({stepper:{[xi.variable]:"sizes.4",[Ha.variable]:"sizes.3",[Ka.variable]:"fontSizes.xs",[_l.variable]:"fontSizes.xs"}}),sm:vl({stepper:{[xi.variable]:"sizes.6",[Ha.variable]:"sizes.4",[Ka.variable]:"fontSizes.sm",[_l.variable]:"fontSizes.xs"}}),md:vl({stepper:{[xi.variable]:"sizes.8",[Ha.variable]:"sizes.5",[Ka.variable]:"fontSizes.md",[_l.variable]:"fontSizes.sm"}}),lg:vl({stepper:{[xi.variable]:"sizes.10",[Ha.variable]:"sizes.6",[Ka.variable]:"fontSizes.lg",[_l.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Ae(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){r();for(const h of c)t[h]=u(h);return Ae(e,t)}function o(...c){for(const h of c)h in t||(t[h]=u(h));return Ae(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([h,_])=>[h,_.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([h,_])=>[h,_.className]))}function u(c){const v=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>c}}return{parts:i,toPart:u,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var HI=Ae("accordion").parts("root","container","button","panel").extend("icon"),KI=Ae("alert").parts("title","description","container").extend("icon","spinner"),YI=Ae("avatar").parts("label","badge","container").extend("excessLabel","group"),ZI=Ae("breadcrumb").parts("link","item","container").extend("separator");Ae("button").parts();var XI=Ae("checkbox").parts("control","icon","container").extend("label");Ae("progress").parts("track","filledTrack").extend("label");var JI=Ae("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),tE=Ae("editable").parts("preview","input","textarea"),eE=Ae("form").parts("container","requiredIndicator","helperText"),nE=Ae("formError").parts("text","icon"),rE=Ae("input").parts("addon","field","element"),iE=Ae("list").parts("container","item","icon"),oE=Ae("menu").parts("button","list","item").extend("groupTitle","command","divider"),aE=Ae("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),sE=Ae("numberinput").parts("root","field","stepperGroup","stepper");Ae("pininput").parts("field");var lE=Ae("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),cE=Ae("progress").parts("label","filledTrack","track"),uE=Ae("radio").parts("container","control","label"),dE=Ae("select").parts("field","icon"),fE=Ae("slider").parts("container","track","thumb","filledTrack","mark"),hE=Ae("stat").parts("container","label","helpText","number","icon"),pE=Ae("switch").parts("container","track","thumb"),gE=Ae("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),mE=Ae("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),yE=Ae("tag").parts("container","label","closeButton"),vE=Ae("card").parts("container","header","body","footer");function Zo(e,t,n){return Math.min(Math.max(e,n),t)}class _E extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var bl=_E;function Y1(e){if(typeof e!="string")throw new bl(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=FE.test(e)?AE(e):e;const n=xE.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(vc(s,2),16)),parseInt(vc(a[3]||"f",2),16)/255]}const r=LE.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=CE.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=SE.exec(t);if(o){const[a,s,u,l]=Array.from(o).slice(1).map(parseFloat);if(Zo(0,100,s)!==s)throw new bl(e);if(Zo(0,100,u)!==u)throw new bl(e);return[...IE(a,s,u),Number.isNaN(l)?1:l]}throw new bl(e)}function bE(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const Qy=e=>parseInt(e.replace(/_/g,""),36),wE="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=Qy(t.substring(0,3)),r=Qy(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function AE(e){const t=e.toLowerCase().trim(),n=wE[bE(t)];if(!n)throw new bl(e);return`#${n}`}const vc=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),xE=new RegExp(`^#${vc("([a-f0-9])",3)}([a-f0-9])?$`,"i"),LE=new RegExp(`^#${vc("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),CE=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${vc(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),SE=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,FE=/^[a-z]+$/i,Wy=e=>Math.round(e*255),IE=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(Wy);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,u=0,l=0;i>=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,l=a):i>=3&&i<4?(u=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);const c=r-o/2,h=s+c,_=u+c,v=l+c;return[h,_,v].map(Wy)};function EE(e,t,n,r){return`rgba(${Zo(0,255,e).toFixed()}, ${Zo(0,255,t).toFixed()}, ${Zo(0,255,n).toFixed()}, ${parseFloat(Zo(0,1,r).toFixed(3))})`}function BE(e,t){const[n,r,i,o]=Y1(e);return EE(n,r,i,o-t)}function kE(e){const[t,n,r,i]=Y1(e);let o=a=>{const s=Zo(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function PE(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,kn=(e,t,n)=>{const r=PE(e,`colors.${t}`,t);try{return kE(r),r}catch{return n??"#000000"}},TE=e=>{const[t,n,r]=Y1(e);return(t*299+n*587+r*114)/1e3},OE=e=>t=>{const n=kn(t,e);return TE(n)<128?"dark":"light"},RE=e=>t=>OE(e)(t)==="dark",Ss=(e,t)=>n=>{const r=kn(n,e);return BE(r,1-t)};function Gy(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}var zE=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function DE(e){const t=zE();return!e||ME(e)?t:e.string&&e.colors?UE(e.string,e.colors):e.string&&!e.colors?NE(e.string):e.colors&&!e.string?$E(e.colors):t}function NE(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function UE(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function Z1(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function e5(e){return Sr(e)&&e.reference?e.reference:String(e)}var i0=(e,...t)=>t.map(e5).join(` ${e} `).replace(/calc/g,""),Hy=(...e)=>`calc(${i0("+",...e)})`,Ky=(...e)=>`calc(${i0("-",...e)})`,P2=(...e)=>`calc(${i0("*",...e)})`,Yy=(...e)=>`calc(${i0("/",...e)})`,Zy=e=>{const t=e5(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:P2(t,-1)},Li=Object.assign(e=>({add:(...t)=>Li(Hy(e,...t)),subtract:(...t)=>Li(Ky(e,...t)),multiply:(...t)=>Li(P2(e,...t)),divide:(...t)=>Li(Yy(e,...t)),negate:()=>Li(Zy(e)),toString:()=>e.toString()}),{add:Hy,subtract:Ky,multiply:P2,divide:Yy,negate:Zy});function jE(e){return!Number.isInteger(parseFloat(e.toString()))}function VE(e,t="-"){return e.replace(/\s+/g,t)}function n5(e){const t=VE(e.toString());return t.includes("\\.")?e:jE(e)?t.replace(".","\\."):e}function qE(e,t=""){return[t,n5(e)].filter(Boolean).join("-")}function QE(e,t){return`var(${n5(e)}${t?`, ${t}`:""})`}function WE(e,t=""){return`--${qE(e,t)}`}function rn(e,t){const n=WE(e,t==null?void 0:t.prefix);return{variable:n,reference:QE(n,GE(t==null?void 0:t.fallback))}}function GE(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:HE,definePartsStyle:Ju}=Be(pE.keys),Ol=rn("switch-track-width"),ra=rn("switch-track-height"),mh=rn("switch-track-diff"),KE=Li.subtract(Ol,ra),M2=rn("switch-thumb-x"),ol=rn("switch-bg"),YE=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Ol.reference],height:[ra.reference],transitionProperty:"common",transitionDuration:"fast",[ol.variable]:"colors.gray.300",_dark:{[ol.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[ol.variable]:`colors.${t}.500`,_dark:{[ol.variable]:`colors.${t}.200`}},bg:ol.reference}},ZE={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[ra.reference],height:[ra.reference],_checked:{transform:`translateX(${M2.reference})`}},XE=Ju(e=>({container:{[mh.variable]:KE,[M2.variable]:mh.reference,_rtl:{[M2.variable]:Li(mh).negate().toString()}},track:YE(e),thumb:ZE})),JE={sm:Ju({container:{[Ol.variable]:"1.375rem",[ra.variable]:"sizes.3"}}),md:Ju({container:{[Ol.variable]:"1.875rem",[ra.variable]:"sizes.4"}}),lg:Ju({container:{[Ol.variable]:"2.875rem",[ra.variable]:"sizes.6"}})},tB=HE({baseStyle:XE,sizes:JE,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:eB,definePartsStyle:us}=Be(gE.keys),nB=us({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Xd={"&[data-is-numeric=true]":{textAlign:"end"}},rB=us(e=>{const{colorScheme:t}=e;return{th:{color:Yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Yt(`${t}.100`,`${t}.700`)(e),...Xd},td:{borderBottom:"1px",borderColor:Yt(`${t}.100`,`${t}.700`)(e),...Xd},caption:{color:Yt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),iB=us(e=>{const{colorScheme:t}=e;return{th:{color:Yt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Yt(`${t}.100`,`${t}.700`)(e),...Xd},td:{borderBottom:"1px",borderColor:Yt(`${t}.100`,`${t}.700`)(e),...Xd},caption:{color:Yt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Yt(`${t}.100`,`${t}.700`)(e)},td:{background:Yt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),oB={simple:rB,striped:iB,unstyled:{}},aB={sm:us({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:us({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:us({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},sB=eB({baseStyle:nB,variants:oB,sizes:aB,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Un=Jt("tabs-color"),qr=Jt("tabs-bg"),bu=Jt("tabs-border-color"),{defineMultiStyleConfig:lB,definePartsStyle:hi}=Be(mE.keys),cB=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},uB=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},dB=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},fB={p:4},hB=hi(e=>({root:cB(e),tab:uB(e),tablist:dB(e),tabpanel:fB})),pB={sm:hi({tab:{py:1,px:4,fontSize:"sm"}}),md:hi({tab:{fontSize:"md",py:2,px:4}}),lg:hi({tab:{fontSize:"lg",py:3,px:4}})},gB=hi(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Un.variable]:`colors.${t}.600`,_dark:{[Un.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[qr.variable]:"colors.gray.200",_dark:{[qr.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Un.reference,bg:qr.reference}}}),mB=hi(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[bu.variable]:"transparent",_selected:{[Un.variable]:`colors.${t}.600`,[bu.variable]:"colors.white",_dark:{[Un.variable]:`colors.${t}.300`,[bu.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:bu.reference},color:Un.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),yB=hi(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[qr.variable]:"colors.gray.50",_dark:{[qr.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[qr.variable]:"colors.white",[Un.variable]:`colors.${t}.600`,_dark:{[qr.variable]:"colors.gray.800",[Un.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Un.reference,bg:qr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),vB=hi(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:kn(n,`${t}.700`),bg:kn(n,`${t}.100`)}}}}),_B=hi(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Un.variable]:"colors.gray.600",_dark:{[Un.variable]:"inherit"},_selected:{[Un.variable]:"colors.white",[qr.variable]:`colors.${t}.600`,_dark:{[Un.variable]:"colors.gray.800",[qr.variable]:`colors.${t}.300`}},color:Un.reference,bg:qr.reference}}}),bB=hi({}),wB={line:gB,enclosed:mB,"enclosed-colored":yB,"soft-rounded":vB,"solid-rounded":_B,unstyled:bB},AB=lB({baseStyle:hB,sizes:pB,variants:wB,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),We=VF("badge",["bg","color","shadow"]),xB={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:We.bg.reference,color:We.color.reference,boxShadow:We.shadow.reference},LB=e=>{const{colorScheme:t,theme:n}=e,r=Ss(`${t}.500`,.6)(n);return{[We.bg.variable]:`colors.${t}.500`,[We.color.variable]:"colors.white",_dark:{[We.bg.variable]:r,[We.color.variable]:"colors.whiteAlpha.800"}}},CB=e=>{const{colorScheme:t,theme:n}=e,r=Ss(`${t}.200`,.16)(n);return{[We.bg.variable]:`colors.${t}.100`,[We.color.variable]:`colors.${t}.800`,_dark:{[We.bg.variable]:r,[We.color.variable]:`colors.${t}.200`}}},SB=e=>{const{colorScheme:t,theme:n}=e,r=Ss(`${t}.200`,.8)(n);return{[We.color.variable]:`colors.${t}.500`,_dark:{[We.color.variable]:r},[We.shadow.variable]:`inset 0 0 0px 1px ${We.color.reference}`}},FB={solid:LB,subtle:CB,outline:SB},Rl={baseStyle:xB,variants:FB,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:IB,definePartsStyle:ia}=Be(yE.keys),Xy=Jt("tag-bg"),Jy=Jt("tag-color"),yh=Jt("tag-shadow"),td=Jt("tag-min-height"),ed=Jt("tag-min-width"),nd=Jt("tag-font-size"),rd=Jt("tag-padding-inline"),EB={fontWeight:"medium",lineHeight:1.2,outline:0,[Jy.variable]:We.color.reference,[Xy.variable]:We.bg.reference,[yh.variable]:We.shadow.reference,color:Jy.reference,bg:Xy.reference,boxShadow:yh.reference,borderRadius:"md",minH:td.reference,minW:ed.reference,fontSize:nd.reference,px:rd.reference,_focusVisible:{[yh.variable]:"shadows.outline"}},BB={lineHeight:1.2,overflow:"visible"},kB={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},PB=ia({container:EB,label:BB,closeButton:kB}),MB={sm:ia({container:{[td.variable]:"sizes.5",[ed.variable]:"sizes.5",[nd.variable]:"fontSizes.xs",[rd.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:ia({container:{[td.variable]:"sizes.6",[ed.variable]:"sizes.6",[nd.variable]:"fontSizes.sm",[rd.variable]:"space.2"}}),lg:ia({container:{[td.variable]:"sizes.8",[ed.variable]:"sizes.8",[nd.variable]:"fontSizes.md",[rd.variable]:"space.3"}})},TB={subtle:ia(e=>{var t;return{container:(t=Rl.variants)==null?void 0:t.subtle(e)}}),solid:ia(e=>{var t;return{container:(t=Rl.variants)==null?void 0:t.solid(e)}}),outline:ia(e=>{var t;return{container:(t=Rl.variants)==null?void 0:t.outline(e)}})},OB=IB({variants:TB,baseStyle:PB,sizes:MB,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Ei,defineMultiStyleConfig:RB}=Be(rE.keys),zB=Ei({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Ji={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},DB={lg:Ei({field:Ji.lg,addon:Ji.lg}),md:Ei({field:Ji.md,addon:Ji.md}),sm:Ei({field:Ji.sm,addon:Ji.sm}),xs:Ei({field:Ji.xs,addon:Ji.xs})};function X1(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Yt("blue.500","blue.300")(e),errorBorderColor:n||Yt("red.500","red.300")(e)}}var NB=Ei(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=X1(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Yt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:kn(t,r),boxShadow:`0 0 0 1px ${kn(t,r)}`},_focusVisible:{zIndex:1,borderColor:kn(t,n),boxShadow:`0 0 0 1px ${kn(t,n)}`}},addon:{border:"1px solid",borderColor:Yt("inherit","whiteAlpha.50")(e),bg:Yt("gray.100","whiteAlpha.300")(e)}}}),UB=Ei(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=X1(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Yt("gray.100","whiteAlpha.50")(e),_hover:{bg:Yt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:kn(t,r)},_focusVisible:{bg:"transparent",borderColor:kn(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Yt("gray.100","whiteAlpha.50")(e)}}}),$B=Ei(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=X1(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:kn(t,r),boxShadow:`0px 1px 0px 0px ${kn(t,r)}`},_focusVisible:{borderColor:kn(t,n),boxShadow:`0px 1px 0px 0px ${kn(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),jB=Ei({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),VB={outline:NB,filled:UB,flushed:$B,unstyled:jB},_e=RB({baseStyle:zB,sizes:DB,variants:VB,defaultProps:{size:"md",variant:"outline"}}),tv,qB={...(tv=_e.baseStyle)==null?void 0:tv.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},ev,nv,QB={outline:e=>{var t,n;return(n=(t=_e.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=_e.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=_e.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(nv=(ev=_e.variants)==null?void 0:ev.unstyled.field)!=null?nv:{}},rv,iv,ov,av,sv,lv,cv,uv,WB={xs:(iv=(rv=_e.sizes)==null?void 0:rv.xs.field)!=null?iv:{},sm:(av=(ov=_e.sizes)==null?void 0:ov.sm.field)!=null?av:{},md:(lv=(sv=_e.sizes)==null?void 0:sv.md.field)!=null?lv:{},lg:(uv=(cv=_e.sizes)==null?void 0:cv.lg.field)!=null?uv:{}},GB={baseStyle:qB,sizes:WB,variants:QB,defaultProps:{size:"md",variant:"outline"}},wu=rn("tooltip-bg"),vh=rn("tooltip-fg"),HB=rn("popper-arrow-bg"),KB={bg:wu.reference,color:vh.reference,[wu.variable]:"colors.gray.700",[vh.variable]:"colors.whiteAlpha.900",_dark:{[wu.variable]:"colors.gray.300",[vh.variable]:"colors.gray.900"},[HB.variable]:wu.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},YB={baseStyle:KB},{defineMultiStyleConfig:ZB,definePartsStyle:wl}=Be(cE.keys),XB=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Yt(Gy(),Gy("1rem","rgba(0,0,0,0.1)"))(e),a=Yt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${kn(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},JB={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},tk=e=>({bg:Yt("gray.100","whiteAlpha.300")(e)}),ek=e=>({transitionProperty:"common",transitionDuration:"slow",...XB(e)}),nk=wl(e=>({label:JB,filledTrack:ek(e),track:tk(e)})),rk={xs:wl({track:{h:"1"}}),sm:wl({track:{h:"2"}}),md:wl({track:{h:"3"}}),lg:wl({track:{h:"4"}})},ik=ZB({sizes:rk,baseStyle:nk,defaultProps:{size:"md",colorScheme:"blue"}}),ok=e=>typeof e=="function";function Tn(e,...t){return ok(e)?e(...t):e}var{definePartsStyle:id,defineMultiStyleConfig:ak}=Be(XI.keys),zl=Jt("checkbox-size"),sk=e=>{const{colorScheme:t}=e;return{w:zl.reference,h:zl.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Yt(`${t}.500`,`${t}.200`)(e),borderColor:Yt(`${t}.500`,`${t}.200`)(e),color:Yt("white","gray.900")(e),_hover:{bg:Yt(`${t}.600`,`${t}.300`)(e),borderColor:Yt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Yt("gray.200","transparent")(e),bg:Yt("gray.200","whiteAlpha.300")(e),color:Yt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Yt(`${t}.500`,`${t}.200`)(e),borderColor:Yt(`${t}.500`,`${t}.200`)(e),color:Yt("white","gray.900")(e)},_disabled:{bg:Yt("gray.100","whiteAlpha.100")(e),borderColor:Yt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Yt("red.500","red.300")(e)}}},lk={_disabled:{cursor:"not-allowed"}},ck={userSelect:"none",_disabled:{opacity:.4}},uk={transitionProperty:"transform",transitionDuration:"normal"},dk=id(e=>({icon:uk,container:lk,control:Tn(sk,e),label:ck})),fk={sm:id({control:{[zl.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:id({control:{[zl.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:id({control:{[zl.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Jd=ak({baseStyle:dk,sizes:fk,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:hk,definePartsStyle:od}=Be(uE.keys),pk=e=>{var t;const n=(t=Tn(Jd.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},gk=od(e=>{var t,n,r,i;return{label:(n=(t=Jd).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=Jd).baseStyle)==null?void 0:i.call(r,e).container,control:pk(e)}}),mk={md:od({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:od({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:od({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},yk=hk({baseStyle:gk,sizes:mk,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vk,definePartsStyle:_k}=Be(dE.keys),Au=Jt("select-bg"),dv,bk={...(dv=_e.baseStyle)==null?void 0:dv.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Au.reference,[Au.variable]:"colors.white",_dark:{[Au.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Au.reference}},wk={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ak=_k({field:bk,icon:wk}),xu={paddingInlineEnd:"8"},fv,hv,pv,gv,mv,yv,vv,_v,xk={lg:{...(fv=_e.sizes)==null?void 0:fv.lg,field:{...(hv=_e.sizes)==null?void 0:hv.lg.field,...xu}},md:{...(pv=_e.sizes)==null?void 0:pv.md,field:{...(gv=_e.sizes)==null?void 0:gv.md.field,...xu}},sm:{...(mv=_e.sizes)==null?void 0:mv.sm,field:{...(yv=_e.sizes)==null?void 0:yv.sm.field,...xu}},xs:{...(vv=_e.sizes)==null?void 0:vv.xs,field:{...(_v=_e.sizes)==null?void 0:_v.xs.field,...xu},icon:{insetEnd:"1"}}},Lk=vk({baseStyle:Ak,sizes:xk,variants:_e.variants,defaultProps:_e.defaultProps}),_h=Jt("skeleton-start-color"),bh=Jt("skeleton-end-color"),Ck={[_h.variable]:"colors.gray.100",[bh.variable]:"colors.gray.400",_dark:{[_h.variable]:"colors.gray.800",[bh.variable]:"colors.gray.600"},background:_h.reference,borderColor:bh.reference,opacity:.7,borderRadius:"sm"},Sk={baseStyle:Ck},wh=Jt("skip-link-bg"),Fk={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[wh.variable]:"colors.white",_dark:{[wh.variable]:"colors.gray.700"},bg:wh.reference}},Ik={baseStyle:Fk},{defineMultiStyleConfig:Ek,definePartsStyle:o0}=Be(fE.keys),_c=Jt("slider-thumb-size"),bc=Jt("slider-track-size"),uo=Jt("slider-bg"),Bk=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...Z1({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},kk=e=>({...Z1({orientation:e.orientation,horizontal:{h:bc.reference},vertical:{w:bc.reference}}),overflow:"hidden",borderRadius:"sm",[uo.variable]:"colors.gray.200",_dark:{[uo.variable]:"colors.whiteAlpha.200"},_disabled:{[uo.variable]:"colors.gray.300",_dark:{[uo.variable]:"colors.whiteAlpha.300"}},bg:uo.reference}),Pk=e=>{const{orientation:t}=e;return{...Z1({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:_c.reference,h:_c.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Mk=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[uo.variable]:`colors.${t}.500`,_dark:{[uo.variable]:`colors.${t}.200`},bg:uo.reference}},Tk=o0(e=>({container:Bk(e),track:kk(e),thumb:Pk(e),filledTrack:Mk(e)})),Ok=o0({container:{[_c.variable]:"sizes.4",[bc.variable]:"sizes.1"}}),Rk=o0({container:{[_c.variable]:"sizes.3.5",[bc.variable]:"sizes.1"}}),zk=o0({container:{[_c.variable]:"sizes.2.5",[bc.variable]:"sizes.0.5"}}),Dk={lg:Ok,md:Rk,sm:zk},Nk=Ek({baseStyle:Tk,sizes:Dk,defaultProps:{size:"md",colorScheme:"blue"}}),Wo=rn("spinner-size"),Uk={width:[Wo.reference],height:[Wo.reference]},$k={xs:{[Wo.variable]:"sizes.3"},sm:{[Wo.variable]:"sizes.4"},md:{[Wo.variable]:"sizes.6"},lg:{[Wo.variable]:"sizes.8"},xl:{[Wo.variable]:"sizes.12"}},jk={baseStyle:Uk,sizes:$k,defaultProps:{size:"md"}},{defineMultiStyleConfig:Vk,definePartsStyle:r5}=Be(hE.keys),qk={fontWeight:"medium"},Qk={opacity:.8,marginBottom:"2"},Wk={verticalAlign:"baseline",fontWeight:"semibold"},Gk={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Hk=r5({container:{},label:qk,helpText:Qk,number:Wk,icon:Gk}),Kk={md:r5({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Yk=Vk({baseStyle:Hk,sizes:Kk,defaultProps:{size:"md"}}),Ah=Jt("kbd-bg"),Zk={[Ah.variable]:"colors.gray.100",_dark:{[Ah.variable]:"colors.whiteAlpha.100"},bg:Ah.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Xk={baseStyle:Zk},Jk={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},tP={baseStyle:Jk},{defineMultiStyleConfig:eP,definePartsStyle:nP}=Be(iE.keys),rP={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},iP=nP({icon:rP}),oP=eP({baseStyle:iP}),{defineMultiStyleConfig:aP,definePartsStyle:sP}=Be(oE.keys),ni=Jt("menu-bg"),xh=Jt("menu-shadow"),lP={[ni.variable]:"#fff",[xh.variable]:"shadows.sm",_dark:{[ni.variable]:"colors.gray.700",[xh.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:ni.reference,boxShadow:xh.reference},cP={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[ni.variable]:"colors.gray.100",_dark:{[ni.variable]:"colors.whiteAlpha.100"}},_active:{[ni.variable]:"colors.gray.200",_dark:{[ni.variable]:"colors.whiteAlpha.200"}},_expanded:{[ni.variable]:"colors.gray.100",_dark:{[ni.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:ni.reference},uP={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},dP={opacity:.6},fP={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},hP={transitionProperty:"common",transitionDuration:"normal"},pP=sP({button:hP,list:lP,item:cP,groupTitle:uP,command:dP,divider:fP}),gP=aP({baseStyle:pP}),{defineMultiStyleConfig:mP,definePartsStyle:T2}=Be(aE.keys),Lh=Jt("modal-bg"),Ch=Jt("modal-shadow"),yP={bg:"blackAlpha.600",zIndex:"modal"},vP=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},_P=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[Lh.variable]:"colors.white",[Ch.variable]:"shadows.lg",_dark:{[Lh.variable]:"colors.gray.700",[Ch.variable]:"shadows.dark-lg"},bg:Lh.reference,boxShadow:Ch.reference}},bP={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},wP={position:"absolute",top:"2",insetEnd:"3"},AP=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},xP={px:"6",py:"4"},LP=T2(e=>({overlay:yP,dialogContainer:Tn(vP,e),dialog:Tn(_P,e),header:bP,closeButton:wP,body:Tn(AP,e),footer:xP}));function Rr(e){return T2(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var CP={xs:Rr("xs"),sm:Rr("sm"),md:Rr("md"),lg:Rr("lg"),xl:Rr("xl"),"2xl":Rr("2xl"),"3xl":Rr("3xl"),"4xl":Rr("4xl"),"5xl":Rr("5xl"),"6xl":Rr("6xl"),full:Rr("full")},SP=mP({baseStyle:LP,sizes:CP,defaultProps:{size:"md"}}),{defineMultiStyleConfig:FP,definePartsStyle:i5}=Be(sE.keys),J1=rn("number-input-stepper-width"),o5=rn("number-input-input-padding"),IP=Li(J1).add("0.5rem").toString(),Sh=rn("number-input-bg"),Fh=rn("number-input-color"),Ih=rn("number-input-border-color"),EP={[J1.variable]:"sizes.6",[o5.variable]:IP},BP=e=>{var t,n;return(n=(t=Tn(_e.baseStyle,e))==null?void 0:t.field)!=null?n:{}},kP={width:J1.reference},PP={borderStart:"1px solid",borderStartColor:Ih.reference,color:Fh.reference,bg:Sh.reference,[Fh.variable]:"colors.chakra-body-text",[Ih.variable]:"colors.chakra-border-color",_dark:{[Fh.variable]:"colors.whiteAlpha.800",[Ih.variable]:"colors.whiteAlpha.300"},_active:{[Sh.variable]:"colors.gray.200",_dark:{[Sh.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},MP=i5(e=>{var t;return{root:EP,field:(t=Tn(BP,e))!=null?t:{},stepperGroup:kP,stepper:PP}});function Lu(e){var t,n,r;const i=(t=_e.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",s=X6.fontSizes[a];return i5({field:{...i.field,paddingInlineEnd:o5.reference,verticalAlign:"top"},stepper:{fontSize:Li(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var TP={xs:Lu("xs"),sm:Lu("sm"),md:Lu("md"),lg:Lu("lg")},OP=FP({baseStyle:MP,sizes:TP,variants:_e.variants,defaultProps:_e.defaultProps}),bv,RP={...(bv=_e.baseStyle)==null?void 0:bv.field,textAlign:"center"},zP={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},wv,Av,DP={outline:e=>{var t,n,r;return(r=(n=Tn((t=_e.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Tn((t=_e.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Tn((t=_e.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(Av=(wv=_e.variants)==null?void 0:wv.unstyled.field)!=null?Av:{}},NP={baseStyle:RP,sizes:zP,variants:DP,defaultProps:_e.defaultProps},{defineMultiStyleConfig:UP,definePartsStyle:$P}=Be(lE.keys),Cu=rn("popper-bg"),jP=rn("popper-arrow-bg"),xv=rn("popper-arrow-shadow-color"),VP={zIndex:10},qP={[Cu.variable]:"colors.white",bg:Cu.reference,[jP.variable]:Cu.reference,[xv.variable]:"colors.gray.200",_dark:{[Cu.variable]:"colors.gray.700",[xv.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},QP={px:3,py:2,borderBottomWidth:"1px"},WP={px:3,py:2},GP={px:3,py:2,borderTopWidth:"1px"},HP={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},KP=$P({popper:VP,content:qP,header:QP,body:WP,footer:GP,closeButton:HP}),YP=UP({baseStyle:KP}),{definePartsStyle:O2,defineMultiStyleConfig:ZP}=Be(JI.keys),Eh=Jt("drawer-bg"),Bh=Jt("drawer-box-shadow");function Fa(e){return O2(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var XP={bg:"blackAlpha.600",zIndex:"overlay"},JP={display:"flex",zIndex:"modal",justifyContent:"center"},tM=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Eh.variable]:"colors.white",[Bh.variable]:"shadows.lg",_dark:{[Eh.variable]:"colors.gray.700",[Bh.variable]:"shadows.dark-lg"},bg:Eh.reference,boxShadow:Bh.reference}},eM={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},nM={position:"absolute",top:"2",insetEnd:"3"},rM={px:"6",py:"2",flex:"1",overflow:"auto"},iM={px:"6",py:"4"},oM=O2(e=>({overlay:XP,dialogContainer:JP,dialog:Tn(tM,e),header:eM,closeButton:nM,body:rM,footer:iM})),aM={xs:Fa("xs"),sm:Fa("md"),md:Fa("lg"),lg:Fa("2xl"),xl:Fa("4xl"),full:Fa("full")},sM=ZP({baseStyle:oM,sizes:aM,defaultProps:{size:"xs"}}),{definePartsStyle:lM,defineMultiStyleConfig:cM}=Be(tE.keys),uM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},dM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},fM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},hM=lM({preview:uM,input:dM,textarea:fM}),pM=cM({baseStyle:hM}),{definePartsStyle:gM,defineMultiStyleConfig:mM}=Be(eE.keys),ds=Jt("form-control-color"),yM={marginStart:"1",[ds.variable]:"colors.red.500",_dark:{[ds.variable]:"colors.red.300"},color:ds.reference},vM={mt:"2",[ds.variable]:"colors.gray.600",_dark:{[ds.variable]:"colors.whiteAlpha.600"},color:ds.reference,lineHeight:"normal",fontSize:"sm"},_M=gM({container:{width:"100%",position:"relative"},requiredIndicator:yM,helperText:vM}),bM=mM({baseStyle:_M}),{definePartsStyle:wM,defineMultiStyleConfig:AM}=Be(nE.keys),fs=Jt("form-error-color"),xM={[fs.variable]:"colors.red.500",_dark:{[fs.variable]:"colors.red.300"},color:fs.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},LM={marginEnd:"0.5em",[fs.variable]:"colors.red.500",_dark:{[fs.variable]:"colors.red.300"},color:fs.reference},CM=wM({text:xM,icon:LM}),SM=AM({baseStyle:CM}),FM={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},IM={baseStyle:FM},EM={fontFamily:"heading",fontWeight:"bold"},BM={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},kM={baseStyle:EM,sizes:BM,defaultProps:{size:"xl"}},{defineMultiStyleConfig:PM,definePartsStyle:MM}=Be(ZI.keys),kh=Jt("breadcrumb-link-decor"),TM={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:kh.reference,[kh.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[kh.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},OM=MM({link:TM}),RM=PM({baseStyle:OM}),zM={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},a5=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Yt("inherit","whiteAlpha.900")(e),_hover:{bg:Yt("gray.100","whiteAlpha.200")(e)},_active:{bg:Yt("gray.200","whiteAlpha.300")(e)}};const r=Ss(`${t}.200`,.12)(n),i=Ss(`${t}.200`,.24)(n);return{color:Yt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Yt(`${t}.50`,r)(e)},_active:{bg:Yt(`${t}.100`,i)(e)}}},DM=e=>{const{colorScheme:t}=e,n=Yt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Tn(a5,e)}},NM={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},UM=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const u=Yt("gray.100","whiteAlpha.200")(e);return{bg:u,_hover:{bg:Yt("gray.200","whiteAlpha.300")(e),_disabled:{bg:u}},_active:{bg:Yt("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:a=`${n}.700`}=(t=NM[n])!=null?t:{},s=Yt(r,`${n}.200`)(e);return{bg:s,color:Yt(i,"gray.800")(e),_hover:{bg:Yt(o,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:Yt(a,`${n}.400`)(e)}}},$M=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Yt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Yt(`${t}.700`,`${t}.500`)(e)}}},jM={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},VM={ghost:a5,outline:DM,solid:UM,link:$M,unstyled:jM},qM={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},QM={baseStyle:zM,variants:VM,sizes:qM,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:oa,defineMultiStyleConfig:WM}=Be(vE.keys),tf=Jt("card-bg"),Pi=Jt("card-padding"),s5=Jt("card-shadow"),ad=Jt("card-radius"),l5=Jt("card-border-width","0"),c5=Jt("card-border-color"),GM=oa({container:{[tf.variable]:"colors.chakra-body-bg",backgroundColor:tf.reference,boxShadow:s5.reference,borderRadius:ad.reference,color:"chakra-body-text",borderWidth:l5.reference,borderColor:c5.reference},body:{padding:Pi.reference,flex:"1 1 0%"},header:{padding:Pi.reference},footer:{padding:Pi.reference}}),HM={sm:oa({container:{[ad.variable]:"radii.base",[Pi.variable]:"space.3"}}),md:oa({container:{[ad.variable]:"radii.md",[Pi.variable]:"space.5"}}),lg:oa({container:{[ad.variable]:"radii.xl",[Pi.variable]:"space.7"}})},KM={elevated:oa({container:{[s5.variable]:"shadows.base",_dark:{[tf.variable]:"colors.gray.700"}}}),outline:oa({container:{[l5.variable]:"1px",[c5.variable]:"colors.chakra-border-color"}}),filled:oa({container:{[tf.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Pi.variable]:0},header:{[Pi.variable]:0},footer:{[Pi.variable]:0}}},YM=WM({baseStyle:GM,variants:KM,sizes:HM,defaultProps:{variant:"elevated",size:"md"}}),Dl=rn("close-button-size"),al=rn("close-button-bg"),ZM={w:[Dl.reference],h:[Dl.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[al.variable]:"colors.blackAlpha.100",_dark:{[al.variable]:"colors.whiteAlpha.100"}},_active:{[al.variable]:"colors.blackAlpha.200",_dark:{[al.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:al.reference},XM={lg:{[Dl.variable]:"sizes.10",fontSize:"md"},md:{[Dl.variable]:"sizes.8",fontSize:"xs"},sm:{[Dl.variable]:"sizes.6",fontSize:"2xs"}},JM={baseStyle:ZM,sizes:XM,defaultProps:{size:"md"}},{variants:tT,defaultProps:eT}=Rl,nT={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:We.bg.reference,color:We.color.reference,boxShadow:We.shadow.reference},rT={baseStyle:nT,variants:tT,defaultProps:eT},iT={w:"100%",mx:"auto",maxW:"prose",px:"4"},oT={baseStyle:iT},aT={opacity:.6,borderColor:"inherit"},sT={borderStyle:"solid"},lT={borderStyle:"dashed"},cT={solid:sT,dashed:lT},uT={baseStyle:aT,variants:cT,defaultProps:{variant:"solid"}},{definePartsStyle:dT,defineMultiStyleConfig:fT}=Be(HI.keys),hT={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},pT={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},gT={pt:"2",px:"4",pb:"5"},mT={fontSize:"1.25em"},yT=dT({container:hT,button:pT,panel:gT,icon:mT}),vT=fT({baseStyle:yT}),{definePartsStyle:Dc,defineMultiStyleConfig:_T}=Be(KI.keys),ir=Jt("alert-fg"),$i=Jt("alert-bg"),bT=Dc({container:{bg:$i.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ir.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ir.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function t3(e){const{theme:t,colorScheme:n}=e,r=Ss(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var wT=Dc(e=>{const{colorScheme:t}=e,n=t3(e);return{container:{[ir.variable]:`colors.${t}.500`,[$i.variable]:n.light,_dark:{[ir.variable]:`colors.${t}.200`,[$i.variable]:n.dark}}}}),AT=Dc(e=>{const{colorScheme:t}=e,n=t3(e);return{container:{[ir.variable]:`colors.${t}.500`,[$i.variable]:n.light,_dark:{[ir.variable]:`colors.${t}.200`,[$i.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ir.reference}}}),xT=Dc(e=>{const{colorScheme:t}=e,n=t3(e);return{container:{[ir.variable]:`colors.${t}.500`,[$i.variable]:n.light,_dark:{[ir.variable]:`colors.${t}.200`,[$i.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ir.reference}}}),LT=Dc(e=>{const{colorScheme:t}=e;return{container:{[ir.variable]:"colors.white",[$i.variable]:`colors.${t}.500`,_dark:{[ir.variable]:"colors.gray.900",[$i.variable]:`colors.${t}.200`},color:ir.reference}}}),CT={subtle:wT,"left-accent":AT,"top-accent":xT,solid:LT},ST=_T({baseStyle:bT,variants:CT,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:u5,defineMultiStyleConfig:FT}=Be(YI.keys),hs=Jt("avatar-border-color"),Ph=Jt("avatar-bg"),IT={borderRadius:"full",border:"0.2em solid",[hs.variable]:"white",_dark:{[hs.variable]:"colors.gray.800"},borderColor:hs.reference},ET={[Ph.variable]:"colors.gray.200",_dark:{[Ph.variable]:"colors.whiteAlpha.400"},bgColor:Ph.reference},Lv=Jt("avatar-background"),BT=e=>{const{name:t,theme:n}=e,r=t?DE({string:t}):"colors.gray.400",i=RE(r)(n);let o="white";return i||(o="gray.800"),{bg:Lv.reference,"&:not([data-loaded])":{[Lv.variable]:r},color:o,[hs.variable]:"colors.white",_dark:{[hs.variable]:"colors.gray.800"},borderColor:hs.reference,verticalAlign:"top"}},kT=u5(e=>({badge:Tn(IT,e),excessLabel:Tn(ET,e),container:Tn(BT,e)}));function to(e){const t=e!=="100%"?t5[e]:void 0;return u5({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var PT={"2xs":to(4),xs:to(6),sm:to(8),md:to(12),lg:to(16),xl:to(24),"2xl":to(32),full:to("100%")},MT=FT({baseStyle:kT,sizes:PT,defaultProps:{size:"md"}}),TT={Accordion:vT,Alert:ST,Avatar:MT,Badge:Rl,Breadcrumb:RM,Button:QM,Checkbox:Jd,CloseButton:JM,Code:rT,Container:oT,Divider:uT,Drawer:sM,Editable:pM,Form:bM,FormError:SM,FormLabel:IM,Heading:kM,Input:_e,Kbd:Xk,Link:tP,List:oP,Menu:gP,Modal:SP,NumberInput:OP,PinInput:NP,Popover:YP,Progress:ik,Radio:yk,Select:Lk,Skeleton:Sk,SkipLink:Ik,Slider:Nk,Spinner:jk,Stat:Yk,Switch:tB,Table:sB,Tabs:AB,Tag:OB,Textarea:GB,Tooltip:YB,Card:YM,Stepper:GI},OT={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},RT={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},zT="ltr",DT={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},d5={semanticTokens:OT,direction:zT,...qI,components:TT,styles:RT,config:DT};function Al(e){return typeof e=="function"}function NT(...e){return t=>e.reduce((n,r)=>r(n),t)}var UT=e=>function(...n){let r=[...n],i=n[n.length-1];return bI(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,NT(...r.map(o=>a=>Al(o)?o(a):jT(a,o)))(i)},$T=UT(d5);function jT(...e){return xr({},...e,f5)}function f5(e,t,n,r){if((Al(e)||Al(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=Al(e)?e(...i):e,a=Al(t)?t(...i):t;return xr({},o,a,f5)}}function VT(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function qT(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const u=e(r,i,o,a);return s.set(i,u),u}},h5=QT(qT);function p5(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var g5=e=>p5(e,t=>t!=null);function WT(e){return typeof e=="function"}function m5(e,...t){return WT(e)?e(...t):e}const y5=1/60*1e3,GT=typeof performance<"u"?()=>performance.now():()=>Date.now(),v5=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(GT()),y5);function HT(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const h=c&&i,_=h?t:n;return l&&a.add(u),_.indexOf(u)===-1&&(_.push(u),h&&i&&(r=t.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),a.delete(u)},process:u=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let l=0;l(e[t]=HT(()=>wc=!0),e),{}),YT=Nc.reduce((e,t)=>{const n=a0[t];return e[t]=(r,i=!1,o=!1)=>(wc||JT(),n.schedule(r,i,o)),e},{}),ZT=Nc.reduce((e,t)=>(e[t]=a0[t].cancel,e),{});Nc.reduce((e,t)=>(e[t]=()=>a0[t].process(ps),e),{});const XT=e=>a0[e].process(ps),_5=e=>{wc=!1,ps.delta=R2?y5:Math.max(Math.min(e-ps.timestamp,KT),1),ps.timestamp=e,z2=!0,Nc.forEach(XT),z2=!1,wc&&(R2=!1,v5(_5))},JT=()=>{wc=!0,R2=!0,z2||v5(_5)},Cv=()=>ps;var tO=typeof Element<"u",eO=typeof Map=="function",nO=typeof Set=="function",rO=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function sd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!sd(e[r],t[r]))return!1;return!0}var o;if(eO&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!sd(r.value[1],t.get(r.value[0])))return!1;return!0}if(nO&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(rO&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(tO&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!sd(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var iO=function(t,n){try{return sd(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function b5(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:a}=eF(),s=e?h5(o,`components.${e}`):void 0,u=r||s,l=xr({theme:o,colorMode:a},(n=u==null?void 0:u.defaultProps)!=null?n:{},g5(VT(i,["children"]))),c=at.useRef({});if(u){const _=yI(u)(l);iO(c.current,_)||(c.current=_)}return c.current}function _a(e,t={}){return b5(e,t)}function Uc(e,t={}){return b5(e,t)}var oO=new Set([...oI,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aO=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function sO(e){return aO.has(e)||!oO.has(e)}function lO(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function cO(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var uO=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,dO=Eb(function(e){return uO.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),fO=dO,hO=function(t){return t!=="theme"},Sv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?fO:hO},Fv=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},pO=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Tb(n,r,i),k9(function(){return Ob(n,r,i)}),null},gO=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=Fv(t,n,r),u=s||Sv(i),l=!u("as");return function(){var c=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)h.push.apply(h,c);else{h.push(c[0][0]);for(var _=c.length,v=1;v<_;v++)h.push(c[v],c[0][v])}var P=Nb(function(N,M,z){var I=l&&N.as||i,W="",H=[],it=N;if(N.theme==null){it={};for(var B in N)it[B]=N[B];it.theme=at.useContext(Jl)}typeof N.className=="string"?W=L9(M.registered,H,N.className):N.className!=null&&(W=N.className+" ");var p=Xg(h.concat(H),M.registered,it);W+=M.key+"-"+p.name,a!==void 0&&(W+=" "+a);var L=l&&s===void 0?Sv(I):u,Z={};for(var K in N)l&&K==="as"||L(K)&&(Z[K]=N[K]);return Z.className=W,Z.ref=z,at.createElement(at.Fragment,null,at.createElement(pO,{cache:M,serialized:p,isStringTag:typeof I=="string"}),at.createElement(I,Z))});return P.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",P.defaultProps=t.defaultProps,P.__emotion_real=P,P.__emotion_base=i,P.__emotion_styles=h,P.__emotion_forwardProp=s,Object.defineProperty(P,"toString",{value:function(){return"."+a}}),P.withComponent=function(N,M){return e(N,Cd({},n,M,{shouldForwardProp:Fv(P,M,!0)})).apply(void 0,h)},P}},mO=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ef=gO.bind();mO.forEach(function(e){ef[e]=ef(e)});var Iv,yO=(Iv=ef.default)!=null?Iv:ef,vO=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=p5(a,(h,_)=>sI(_)),u=m5(e,t),l=lO({},i,u,g5(s),o),c=Z6(l)(t.theme);return r?[c,r]:c};function Mh(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sO);const i=vO({baseStyle:n}),o=yO(e,r)(i);return Lr.forwardRef(function(u,l){const{colorMode:c,forced:h}=W1();return Lr.createElement(o,{ref:l,"data-theme":h?c:void 0,...u})})}function _O(){const e=new Map;return new Proxy(Mh,{apply(t,n,r){return Mh(...r)},get(t,n){return e.has(n)||e.set(n,Mh(n)),e.get(n)}})}var ee=_O();function ce(e){return at.forwardRef(e)}function bO(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=at.createContext(void 0);i.displayName=r;function o(){var a;const s=at.useContext(i);if(!s&&t){const u=new Error(n);throw u.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,u,o),u}return s}return[i.Provider,o,i]}function wO(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=at.useMemo(()=>iI(n),[n]);return ze(T9,{theme:i,children:[wt(AO,{root:t}),r]})}function AO({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return wt(Uf,{styles:n=>({[t]:n.__cssVars})})}bO({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function xO(){const{colorMode:e}=W1();return wt(Uf,{styles:t=>{const n=h5(t,"styles.global"),r=m5(n,{theme:t,colorMode:e});return r?Z6(r)(t):void 0}})}var w5=at.createContext({getDocument(){return document},getWindow(){return window}});w5.displayName="EnvironmentContext";function A5(e){const{children:t,environment:n,disabled:r}=e,i=at.useRef(null),o=at.useMemo(()=>n||{getDocument:()=>{var s,u;return(u=(s=i.current)==null?void 0:s.ownerDocument)!=null?u:document},getWindow:()=>{var s,u;return(u=(s=i.current)==null?void 0:s.ownerDocument.defaultView)!=null?u:window}},[n]),a=!r||!n;return ze(w5.Provider,{value:o,children:[t,a&&wt("span",{id:"__chakra_env",hidden:!0,ref:i})]})}A5.displayName="EnvironmentProvider";var LO=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:a={},environment:s,cssVarsRoot:u,disableEnvironment:l}=e,c=wt(A5,{environment:s,disabled:l,children:t});return wt(wO,{theme:a,cssVarsRoot:u,children:ze(q6,{colorModeManager:n,options:a.config,children:[o?wt(D9,{scope:i}):wt(z9,{}),wt(xO,{}),r?wt(jb,{zIndex:r,children:c}):c]})})},CO=(e,t)=>e.find(n=>n.id===t);function Ev(e,t){const n=x5(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function x5(e,t){for(const[n,r]of Object.entries(e))if(CO(r,t))return n}function SO(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function FO(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}function mn(e,t=[]){const n=at.useRef(e);return at.useEffect(()=>{n.current=e}),at.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function IO(e,t){const n=mn(e);at.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function nf(e,t){const n=at.useRef(!1),r=at.useRef(!1);at.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),at.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const L5=at.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),s0=at.createContext({}),$c=at.createContext(null),l0=typeof document<"u",rf=l0?at.useLayoutEffect:at.useEffect,C5=at.createContext({strict:!1});function EO(e,t,n,r){const{visualElement:i}=at.useContext(s0),o=at.useContext(C5),a=at.useContext($c),s=at.useContext(L5).reducedMotion,u=at.useRef();r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const l=u.current;return at.useInsertionEffect(()=>{l&&l.update(n,a)}),rf(()=>{l&&l.render()}),at.useEffect(()=>{l&&l.updateFeatures()}),(window.HandoffAppearAnimations?rf:at.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function Ya(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function BO(e,t,n){return at.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ya(n)&&(n.current=r))},[t])}function Ac(e){return typeof e=="string"||Array.isArray(e)}function c0(e){return typeof e=="object"&&typeof e.start=="function"}const e3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n3=["initial",...e3];function u0(e){return c0(e.animate)||n3.some(t=>Ac(e[t]))}function S5(e){return Boolean(u0(e)||e.variants)}function kO(e,t){if(u0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ac(n)?n:void 0,animate:Ac(r)?r:void 0}}return e.inherit!==!1?t:{}}function PO(e){const{initial:t,animate:n}=kO(e,at.useContext(s0));return at.useMemo(()=>({initial:t,animate:n}),[Bv(t),Bv(n)])}function Bv(e){return Array.isArray(e)?e.join(" "):e}const kv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xc={};for(const e in kv)xc[e]={isEnabled:t=>kv[e].some(n=>!!t[n])};function MO(e){for(const t in e)xc[t]={...xc[t],...e[t]}}const r3=at.createContext({}),F5=at.createContext({}),TO=Symbol.for("motionComponentSymbol");function OO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&MO(e);function o(s,u){let l;const c={...at.useContext(L5),...s,layoutId:RO(s)},{isStatic:h}=c,_=PO(s),v=r(s,h);if(!h&&l0){_.visualElement=EO(i,v,c,t);const P=at.useContext(F5),N=at.useContext(C5).strict;_.visualElement&&(l=_.visualElement.loadFeatures(c,N,e,P))}return at.createElement(s0.Provider,{value:_},l&&_.visualElement?at.createElement(l,{visualElement:_.visualElement,...c}):null,n(i,s,BO(v,_.visualElement,u),v,h,_.visualElement))}const a=at.forwardRef(o);return a[TO]=i,a}function RO({layoutId:e}){const t=at.useContext(r3).id;return t&&e!==void 0?t+"-"+e:e}function zO(e){function t(r,i={}){return OO(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const DO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function i3(e){return typeof e!="string"||e.includes("-")?!1:!!(DO.indexOf(e)>-1||/[A-Z]/.test(e))}const of={};function NO(e){Object.assign(of,e)}const jc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ba=new Set(jc);function I5(e,{layout:t,layoutId:n}){return ba.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!of[e]||e==="opacity")}const Kn=e=>Boolean(e&&e.getVelocity),UO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$O=jc.length;function jO(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let a=0;a<$O;a++){const s=jc[a];if(e[s]!==void 0){const u=UO[s]||s;o+=`${u}(${e[s]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const E5=e=>t=>typeof t=="string"&&t.startsWith(e),B5=E5("--"),D2=E5("var(--"),VO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,qO=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ga=(e,t,n)=>Math.min(Math.max(n,e),t),wa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Nl={...wa,transform:e=>ga(0,1,e)},Su={...wa,default:1},Ul=e=>Math.round(e*1e5)/1e5,d0=/(-)?([\d]*\.?[\d])+/g,k5=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,QO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Vc(e){return typeof e=="string"}const qc=e=>({test:t=>Vc(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),no=qc("deg"),pi=qc("%"),Zt=qc("px"),WO=qc("vh"),GO=qc("vw"),Pv={...pi,parse:e=>pi.parse(e)/100,transform:e=>pi.transform(e*100)},Mv={...wa,transform:Math.round},P5={borderWidth:Zt,borderTopWidth:Zt,borderRightWidth:Zt,borderBottomWidth:Zt,borderLeftWidth:Zt,borderRadius:Zt,radius:Zt,borderTopLeftRadius:Zt,borderTopRightRadius:Zt,borderBottomRightRadius:Zt,borderBottomLeftRadius:Zt,width:Zt,maxWidth:Zt,height:Zt,maxHeight:Zt,size:Zt,top:Zt,right:Zt,bottom:Zt,left:Zt,padding:Zt,paddingTop:Zt,paddingRight:Zt,paddingBottom:Zt,paddingLeft:Zt,margin:Zt,marginTop:Zt,marginRight:Zt,marginBottom:Zt,marginLeft:Zt,rotate:no,rotateX:no,rotateY:no,rotateZ:no,scale:Su,scaleX:Su,scaleY:Su,scaleZ:Su,skew:no,skewX:no,skewY:no,distance:Zt,translateX:Zt,translateY:Zt,translateZ:Zt,x:Zt,y:Zt,z:Zt,perspective:Zt,transformPerspective:Zt,opacity:Nl,originX:Pv,originY:Pv,originZ:Zt,zIndex:Mv,fillOpacity:Nl,strokeOpacity:Nl,numOctaves:Mv};function o3(e,t,n,r){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let u=!1,l=!1,c=!0;for(const h in t){const _=t[h];if(B5(h)){o[h]=_;continue}const v=P5[h],P=qO(_,v);if(ba.has(h)){if(u=!0,a[h]=P,!c)continue;_!==(v.default||0)&&(c=!1)}else h.startsWith("origin")?(l=!0,s[h]=P):i[h]=P}if(t.transform||(u||r?i.transform=jO(e.transform,n,c,r):i.transform&&(i.transform="none")),l){const{originX:h="50%",originY:_="50%",originZ:v=0}=s;i.transformOrigin=`${h} ${_} ${v}`}}const a3=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function M5(e,t,n){for(const r in t)!Kn(t[r])&&!I5(r,n)&&(e[r]=t[r])}function HO({transformTemplate:e},t,n){return at.useMemo(()=>{const r=a3();return o3(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function KO(e,t,n){const r=e.style||{},i={};return M5(i,r,e),Object.assign(i,HO(e,t,n)),e.transformValues?e.transformValues(i):i}function YO(e,t,n){const r={},i=KO(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const ZO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function af(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||ZO.has(e)}let T5=e=>!af(e);function XO(e){e&&(T5=t=>t.startsWith("on")?!af(t):e(t))}try{XO(require("@emotion/is-prop-valid").default)}catch{}function JO(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(T5(i)||n===!0&&af(i)||!t&&!af(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Tv(e,t,n){return typeof e=="string"?e:Zt.transform(t+n*e)}function tR(e,t,n){const r=Tv(t,e.x,e.width),i=Tv(n,e.y,e.height);return`${r} ${i}`}const eR={offset:"stroke-dashoffset",array:"stroke-dasharray"},nR={offset:"strokeDashoffset",array:"strokeDasharray"};function rR(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?eR:nR;e[o.offset]=Zt.transform(-r);const a=Zt.transform(t),s=Zt.transform(n);e[o.array]=`${a} ${s}`}function s3(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:u=0,...l},c,h,_){if(o3(e,l,c,_),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:P,dimensions:N}=e;v.transform&&(N&&(P.transform=v.transform),delete v.transform),N&&(i!==void 0||o!==void 0||P.transform)&&(P.transformOrigin=tR(N,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(v.x=t),n!==void 0&&(v.y=n),r!==void 0&&(v.scale=r),a!==void 0&&rR(v,a,s,u,!1)}const O5=()=>({...a3(),attrs:{}}),l3=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iR(e,t,n,r){const i=at.useMemo(()=>{const o=O5();return s3(o,t,{enableHardwareAcceleration:!1},l3(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};M5(o,e.style,e),i.style={...o,...i.style}}return i}function oR(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(i3(n)?iR:YO)(r,o,a,n),c={...JO(r,typeof n=="string",e),...u,ref:i},{children:h}=r,_=at.useMemo(()=>Kn(h)?h.get():h,[h]);return at.createElement(n,{...c,children:_})}}const c3=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function R5(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const z5=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function D5(e,t,n,r){R5(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(z5.has(i)?i:c3(i),t.attrs[i])}function u3(e,t){const{style:n}=e,r={};for(const i in n)(Kn(n[i])||t.style&&Kn(t.style[i])||I5(i,e))&&(r[i]=n[i]);return r}function N5(e,t){const n=u3(e,t);for(const r in e)if(Kn(e[r])||Kn(t[r])){const i=jc.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function d3(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function U5(e){const t=at.useRef(null);return t.current===null&&(t.current=e()),t.current}const sf=e=>Array.isArray(e),aR=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),sR=e=>sf(e)?e[e.length-1]||0:e;function ld(e){const t=Kn(e)?e.get():e;return aR(t)?t.toValue():t}function lR({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:cR(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const $5=e=>(t,n)=>{const r=at.useContext(s0),i=at.useContext($c),o=()=>lR(e,t,r,i);return n?o():U5(o)};function cR(e,t,n,r){const i={},o=r(e,{});for(const _ in o)i[_]=ld(o[_]);let{initial:a,animate:s}=e;const u=u0(e),l=S5(e);t&&l&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const h=c?s:a;return h&&typeof h!="boolean"&&!c0(h)&&(Array.isArray(h)?h:[h]).forEach(v=>{const P=d3(e,v);if(!P)return;const{transitionEnd:N,transition:M,...z}=P;for(const I in z){let W=z[I];if(Array.isArray(W)){const H=c?W.length-1:0;W=W[H]}W!==null&&(i[I]=W)}for(const I in N)i[I]=N[I]}),i}const uR={useVisualState:$5({scrapeMotionValuesFromProps:N5,createRenderState:O5,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}s3(n,r,{enableHardwareAcceleration:!1},l3(t.tagName),e.transformTemplate),D5(t,n)}})},dR={useVisualState:$5({scrapeMotionValuesFromProps:u3,createRenderState:a3})};function fR(e,{forwardMotionProps:t=!1},n,r){return{...i3(e)?uR:dR,preloadedFeatures:n,useRender:oR(t),createVisualElement:r,Component:e}}function Bi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const j5=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function f0(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const hR=e=>t=>j5(t)&&e(t,f0(t));function Mi(e,t,n,r){return Bi(e,t,hR(n),r)}const pR=(e,t)=>n=>t(e(n)),xo=(...e)=>e.reduce(pR);function V5(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Ov=V5("dragHorizontal"),Rv=V5("dragVertical");function q5(e){let t=!1;if(e==="y")t=Rv();else if(e==="x")t=Ov();else{const n=Ov(),r=Rv();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Q5(){const e=q5(!0);return e?(e(),!1):!0}class Po{constructor(t){this.isMounted=!1,this.node=t}update(){}}function gR(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const h=c&&i,_=h?t:n;return l&&a.add(u),_.indexOf(u)===-1&&(_.push(u),h&&i&&(r=t.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),a.delete(u)},process:u=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let l=0;l(e[t]=gR(()=>Lc=!0),e),{}),yR=e=>gs[e].process(an),W5=e=>{Lc=!1,an.delta=N2?1e3/60:Math.max(Math.min(e-an.timestamp,mR),1),an.timestamp=e,an.isProcessing=!0,h0.forEach(yR),an.isProcessing=!1,Lc&&(N2=!1,requestAnimationFrame(W5))},vR=()=>{Lc=!0,N2=!0,an.isProcessing||requestAnimationFrame(W5)},De=h0.reduce((e,t)=>{const n=gs[t];return e[t]=(r,i=!1,o=!1)=>(Lc||vR(),n.schedule(r,i,o)),e},{});function ji(e){h0.forEach(t=>gs[t].cancel(e))}function zv(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||Q5())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&De.update(()=>s[r](o,a))};return Mi(e.current,n,i,{passive:!e.getProps()[r]})}class _R extends Po{mount(){this.unmount=xo(zv(this.node,!0),zv(this.node,!1))}unmount(){}}class bR extends Po{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xo(Bi(this.node.current,"focus",()=>this.onFocus()),Bi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const G5=(e,t)=>t?e===t?!0:G5(e,t.parentElement):!1,tn=e=>e;function Th(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,f0(n))}class wR extends Po{constructor(){super(...arguments),this.removeStartListeners=tn,this.removeEndListeners=tn,this.removeAccessibleListeners=tn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Mi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c}=this.node.getProps();De.update(()=>{G5(this.node.current,s.target)?l&&l(s,u):c&&c(s,u)})},{passive:!(r.onTap||r.onPointerUp)}),a=Mi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xo(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||Th("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&De.update(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=Bi(this.node.current,"keyup",a),Th("down",(s,u)=>{this.startPress(s,u)})},n=Bi(this.node.current,"keydown",t),r=()=>{this.isPressing&&Th("cancel",(o,a)=>this.cancelPress(o,a))},i=Bi(this.node.current,"blur",r);this.removeAccessibleListeners=xo(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Q5()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Mi(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Bi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xo(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const U2=new WeakMap,Oh=new WeakMap,AR=e=>{const t=U2.get(e.target);t&&t(e)},xR=e=>{e.forEach(AR)};function LR({root:e,...t}){const n=e||document;Oh.has(n)||Oh.set(n,{});const r=Oh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xR,{root:e,...t})),r[i]}function CR(e,t,n){const r=LR(t);return U2.set(e,n),r.observe(e),()=>{U2.delete(e),r.unobserve(e)}}const SR={some:0,all:1};class FR extends Po{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:SR[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),_=l?c:h;_&&_(u)};return CR(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(IR(t,n))&&this.startObserver()}unmount(){}}function IR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ER={inView:{Feature:FR},tap:{Feature:wR},focus:{Feature:bR},hover:{Feature:_R}};function H5(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function kR(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function p0(e,t,n){const r=e.getProps();return d3(r,t,n!==void 0?n:r.custom,BR(e),kR(e))}const PR="framerAppearId",MR="data-"+c3(PR);let TR=tn,f3=tn;const Lo=e=>e*1e3,Ti=e=>e/1e3,OR={current:!1},K5=e=>Array.isArray(e)&&typeof e[0]=="number";function Y5(e){return Boolean(!e||typeof e=="string"&&Z5[e]||K5(e)||Array.isArray(e)&&e.every(Y5))}const xl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Z5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xl([0,.65,.55,1]),circOut:xl([.55,0,1,.45]),backIn:xl([.31,.01,.66,-.59]),backOut:xl([.33,1.53,.69,.99])};function X5(e){if(e)return K5(e)?xl(e):Array.isArray(e)?e.map(X5):Z5[e]}function RR(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=X5(s);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const Dv={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Rh={},J5={};for(const e in Dv)J5[e]=()=>(Rh[e]===void 0&&(Rh[e]=Dv[e]()),Rh[e]);function zR(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const tw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DR=1e-7,NR=12;function UR(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=tw(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>DR&&++sUR(o,0,1,e,n);return o=>o===0||o===1?o:tw(i(o),t,r)}const $R=Qc(.42,0,1,1),jR=Qc(0,0,.58,1),ew=Qc(.42,0,.58,1),VR=e=>Array.isArray(e)&&typeof e[0]!="number",nw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rw=e=>t=>1-e(1-t),iw=e=>1-Math.sin(Math.acos(e)),h3=rw(iw),qR=nw(h3),ow=Qc(.33,1.53,.69,.99),p3=rw(ow),QR=nw(p3),WR=e=>(e*=2)<1?.5*p3(e):.5*(2-Math.pow(2,-10*(e-1))),GR={linear:tn,easeIn:$R,easeInOut:ew,easeOut:jR,circIn:iw,circInOut:qR,circOut:h3,backIn:p3,backInOut:QR,backOut:ow,anticipate:WR},Nv=e=>{if(Array.isArray(e)){f3(e.length===4);const[t,n,r,i]=e;return Qc(t,n,r,i)}else if(typeof e=="string")return GR[e];return e},g3=(e,t)=>n=>Boolean(Vc(n)&&QO.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),aw=(e,t,n)=>r=>{if(!Vc(r))return r;const[i,o,a,s]=r.match(d0);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},HR=e=>ga(0,255,e),zh={...wa,transform:e=>Math.round(HR(e))},Xo={test:g3("rgb","red"),parse:aw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zh.transform(e)+", "+zh.transform(t)+", "+zh.transform(n)+", "+Ul(Nl.transform(r))+")"};function KR(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const $2={test:g3("#"),parse:KR,transform:Xo.transform},Za={test:g3("hsl","hue"),parse:aw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pi.transform(Ul(t))+", "+pi.transform(Ul(n))+", "+Ul(Nl.transform(r))+")"},En={test:e=>Xo.test(e)||$2.test(e)||Za.test(e),parse:e=>Xo.test(e)?Xo.parse(e):Za.test(e)?Za.parse(e):$2.parse(e),transform:e=>Vc(e)?e:e.hasOwnProperty("red")?Xo.transform(e):Za.transform(e)},Ue=(e,t,n)=>-n*e+n*t+e;function Dh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Dh(u,s,e+1/3),o=Dh(u,s,e),a=Dh(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Nh=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},ZR=[$2,Xo,Za],XR=e=>ZR.find(t=>t.test(e));function Uv(e){const t=XR(e);let n=t.parse(e);return t===Za&&(n=YR(n)),n}const sw=(e,t)=>{const n=Uv(e),r=Uv(t),i={...n};return o=>(i.red=Nh(n.red,r.red,o),i.green=Nh(n.green,r.green,o),i.blue=Nh(n.blue,r.blue,o),i.alpha=Ue(n.alpha,r.alpha,o),Xo.transform(i))};function JR(e){var t,n;return isNaN(e)&&Vc(e)&&(((t=e.match(d0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(k5))===null||n===void 0?void 0:n.length)||0)>0}const lw={regex:VO,countKey:"Vars",token:"${v}",parse:tn},cw={regex:k5,countKey:"Colors",token:"${c}",parse:En.parse},uw={regex:d0,countKey:"Numbers",token:"${n}",parse:wa.parse};function Uh(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function lf(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Uh(n,lw),Uh(n,cw),Uh(n,uw),n}function dw(e){return lf(e).values}function fw(e){const{values:t,numColors:n,numVars:r,tokenised:i}=lf(e),o=t.length;return a=>{let s=i;for(let u=0;utypeof e=="number"?0:e;function ez(e){const t=dw(e);return fw(e)(t.map(tz))}const Io={test:JR,parse:dw,createTransformer:fw,getAnimatableNone:ez},hw=(e,t)=>n=>`${n>0?t:e}`;function pw(e,t){return typeof e=="number"?n=>Ue(e,t,n):En.test(e)?sw(e,t):e.startsWith("var(")?hw(e,t):mw(e,t)}const gw=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>pw(o,t[a]));return o=>{for(let a=0;a{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=pw(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},mw=(e,t)=>{const n=Io.createTransformer(t),r=lf(e),i=lf(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?xo(gw(r.values,i.values),n):hw(e,t)},Cc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$v=(e,t)=>n=>Ue(e,t,n);function rz(e){return typeof e=="number"?$v:typeof e=="string"?En.test(e)?sw:mw:Array.isArray(e)?gw:typeof e=="object"?nz:$v}function iz(e,t,n){const r=[],i=n||rz(e[0]),o=e.length-1;for(let a=0;at[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=iz(t,r,i),s=a.length,u=l=>{let c=0;if(s>1)for(;cu(ga(e[0],e[o-1],l)):u}function oz(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Cc(0,t,r);e.push(Ue(n,1,i))}}function az(e){const t=[0];return oz(t,e.length-1),t}function sz(e,t){return e.map(n=>n*t)}function lz(e,t){return e.map(()=>t||ew).splice(0,e.length-1)}function cf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=VR(r)?r.map(Nv):Nv(r),o={done:!1,value:t[0]},a=sz(n&&n.length===t.length?n:az(t),e),s=yw(a,t,{ease:Array.isArray(i)?i:lz(t,i)});return{calculatedDuration:e,next:u=>(o.value=s(u),o.done=u>=e,o)}}function vw(e,t){return t?e*(1e3/t):0}const cz=5;function _w(e,t,n){const r=Math.max(t-cz,0);return vw(n-e(r),t-r)}const $h=.001,uz=.01,jv=10,dz=.05,fz=1;function hz({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;TR(e<=Lo(jv));let a=1-t;a=ga(dz,fz,a),e=ga(uz,jv,Ti(e)),a<1?(i=l=>{const c=l*a,h=c*e,_=c-n,v=j2(l,a),P=Math.exp(-h);return $h-_/v*P},o=l=>{const h=l*a*e,_=h*n+n,v=Math.pow(a,2)*Math.pow(l,2)*e,P=Math.exp(-h),N=j2(Math.pow(l,2),a);return(-i(l)+$h>0?-1:1)*((_-v)*P)/N}):(i=l=>{const c=Math.exp(-l*e),h=(l-n)*e+1;return-$h+c*h},o=l=>{const c=Math.exp(-l*e),h=(n-l)*(e*e);return c*h});const s=5/e,u=gz(i,o,s);if(e=Lo(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const pz=12;function gz(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function vz(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Vv(e,yz)&&Vv(e,mz)){const n=hz(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function bw({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:u,mass:l,velocity:c,duration:h,isResolvedFromDuration:_}=vz(r),v=c?-Ti(c):0,P=u/(2*Math.sqrt(s*l)),N=o-i,M=Ti(Math.sqrt(s/l)),z=Math.abs(N)<5;n||(n=z?.01:2),t||(t=z?.005:.5);let I;if(P<1){const W=j2(M,P);I=H=>{const it=Math.exp(-P*M*H);return o-it*((v+P*M*N)/W*Math.sin(W*H)+N*Math.cos(W*H))}}else if(P===1)I=W=>o-Math.exp(-M*W)*(N+(v+M*N)*W);else{const W=M*Math.sqrt(P*P-1);I=H=>{const it=Math.exp(-P*M*H),B=Math.min(W*H,300);return o-it*((v+P*M*N)*Math.sinh(B)+W*N*Math.cosh(B))/W}}return{calculatedDuration:_&&h||null,next:W=>{const H=I(W);if(_)a.done=W>=h;else{let it=v;W!==0&&(P<1?it=_w(I,W,H):it=0);const B=Math.abs(it)<=n,p=Math.abs(o-H)<=t;a.done=B&&p}return a.value=a.done?o:H,a}}}function qv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){const h=e[0],_={done:!1,value:h},v=L=>s!==void 0&&Lu,P=L=>s===void 0?u:u===void 0||Math.abs(s-L)-N*Math.exp(-L/r),W=L=>z+I(L),H=L=>{const Z=I(L),K=W(L);_.done=Math.abs(Z)<=l,_.value=_.done?z:K};let it,B;const p=L=>{v(_.value)&&(it=L,B=bw({keyframes:[_.value,P(_.value)],velocity:_w(W,L,_.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return p(0),{calculatedDuration:null,next:L=>{let Z=!1;return!B&&it===void 0&&(Z=!0,H(L),p(L)),it!==void 0&&L>it?B.next(L-it):(!Z&&H(L),_)}}}const _z=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>ji(t),now:()=>an.isProcessing?an.timestamp:performance.now()}},Qv=2e4;function Wv(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Qv?1/0:t}const bz={decay:qv,inertia:qv,tween:cf,keyframes:cf,spring:bw};function uf({autoplay:e=!0,delay:t=0,driver:n=_z,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",onPlay:u,onStop:l,onComplete:c,onUpdate:h,..._}){let v=1,P=!1,N,M;const z=()=>{N&&N(),M=new Promise(V=>{N=V})};z();let I;const W=bz[i]||cf;let H;W!==cf&&typeof r[0]!="number"&&(H=yw([0,100],r,{clamp:!1}),r=[0,100]);const it=W({..._,keyframes:r});let B;s==="mirror"&&(B=W({..._,keyframes:[...r].reverse(),velocity:-(_.velocity||0)}));let p="idle",L=null,Z=null,K=null;it.calculatedDuration===null&&o&&(it.calculatedDuration=Wv(it));const{calculatedDuration:G}=it;let et=1/0,w=1/0;G!==null&&(et=G+a,w=et*(o+1)-a);let g=0;const E=V=>{if(Z===null)return;v>0&&(Z=Math.min(Z,V)),L!==null?g=L:g=(V-Z)*v;const C=g-t,O=C<0;g=Math.max(C,0),p==="finished"&&L===null&&(g=w);let lt=g,S=it;if(o){const R=g/et;let k=Math.floor(R),x=R%1;!x&&R>=1&&(x=1),x===1&&k--,k=Math.min(k,o+1);const ot=Boolean(k%2);ot&&(s==="reverse"?(x=1-x,a&&(x-=a/et)):s==="mirror"&&(S=B));let _t=ga(0,1,x);g>w&&(_t=s==="reverse"&&ot?1:0),lt=_t*et}const d=O?{done:!1,value:r[0]}:S.next(lt);H&&(d.value=H(d.value));let{done:$}=d;!O&&G!==null&&($=g>=w);const f=L===null&&(p==="finished"||p==="running"&&$||v<0&&g<=0);return h&&h(d.value),f&&T(),d},U=()=>{I&&I.stop(),I=void 0},Q=()=>{p="idle",U(),z(),Z=K=null},T=()=>{p="finished",c&&c(),U(),z()},Y=()=>{if(P)return;I||(I=n(E));const V=I.now();u&&u(),L!==null?Z=V-L:(!Z||p==="finished")&&(Z=V),K=Z,L=null,p="running",I.start()};e&&Y();const J={then(V,C){return M.then(V,C)},get time(){return Ti(g)},set time(V){V=Lo(V),g=V,L!==null||!I||v===0?L=V:Z=I.now()-V/v},get duration(){const V=it.calculatedDuration===null?Wv(it):it.calculatedDuration;return Ti(V)},get speed(){return v},set speed(V){V===v||!I||(v=V,J.time=Ti(g))},get state(){return p},play:Y,pause:()=>{p="paused",L=g},stop:()=>{P=!0,p!=="idle"&&(p="idle",l&&l(),Q())},cancel:()=>{K!==null&&E(K),Q()},complete:()=>{p="finished"},sample:V=>(Z=0,E(V))};return J}const wz=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Fu=10,Az=2e4,xz=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Y5(t.ease);function Lz(e,t,{onUpdate:n,onComplete:r,...i}){if(!(J5.waapi()&&wz.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,s,u;const l=()=>{u=new Promise(z=>{s=z})};l();let{keyframes:c,duration:h=300,ease:_,times:v}=i;if(xz(t,i)){const z=uf({...i,repeat:0,delay:0});let I={done:!1,value:c[0]};const W=[];let H=0;for(;!I.done&&HP.cancel(),M=()=>{De.update(N),s(),l()};return P.onfinish=()=>{e.set(zR(c,i)),r&&r(),M()},{then(z,I){return u.then(z,I)},get time(){return Ti(P.currentTime||0)},set time(z){P.currentTime=Lo(z)},get speed(){return P.playbackRate},set speed(z){P.playbackRate=z},get duration(){return Ti(h)},play:()=>{a||(P.play(),ji(N))},pause:()=>P.pause(),stop:()=>{if(a=!0,P.playState==="idle")return;const{currentTime:z}=P;if(z){const I=uf({...i,autoplay:!1});e.setWithVelocity(I.sample(z-Fu).value,I.sample(z).value,Fu)}M()},complete:()=>P.finish(),cancel:M}}function Cz({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:tn,pause:tn,stop:tn,then:o=>(o(),Promise.resolve()),cancel:tn,complete:tn});return t?uf({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Sz={type:"spring",stiffness:500,damping:25,restSpeed:10},Fz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Iz={type:"keyframes",duration:.8},Ez={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Bz=(e,{keyframes:t})=>t.length>2?Iz:ba.has(e)?e.startsWith("scale")?Fz(t[1]):Sz:Ez,V2=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Io.test(t)||t==="0")&&!t.startsWith("url(")),kz=new Set(["brightness","contrast","saturate","opacity"]);function Pz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(d0)||[];if(!r)return e;const i=n.replace(r,"");let o=kz.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Mz=/([a-z-]*)\(.*?\)/g,q2={...Io,getAnimatableNone:e=>{const t=e.match(Mz);return t?t.map(Pz).join(" "):e}},Tz={...P5,color:En,backgroundColor:En,outlineColor:En,fill:En,stroke:En,borderColor:En,borderTopColor:En,borderRightColor:En,borderBottomColor:En,borderLeftColor:En,filter:q2,WebkitFilter:q2},m3=e=>Tz[e];function ww(e,t){let n=m3(e);return n!==q2&&(n=Io),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Aw=e=>/^0[^.\s]+$/.test(e);function Oz(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Aw(e)}function Rz(e,t,n,r){const i=V2(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const a=r.from!==void 0?r.from:e.get();let s;const u=[];for(let l=0;li=>{const o=xw(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Lo(a);const u=Rz(t,e,n,o),l=u[0],c=u[u.length-1],h=V2(e,l),_=V2(e,c);let v={keyframes:u,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-s,onUpdate:P=>{t.set(P),o.onUpdate&&o.onUpdate(P)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(zz(o)||(v={...v,...Bz(e,v)}),v.duration&&(v.duration=Lo(v.duration)),v.repeatDelay&&(v.repeatDelay=Lo(v.repeatDelay)),!h||!_||OR.current||o.type===!1)return Cz(v);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const P=Lz(t,e,v);if(P)return P}return uf(v)};function df(e){return Boolean(Kn(e)&&e.add)}const Dz=e=>/^\-?\d*\.?\d+$/.test(e);function v3(e,t){e.indexOf(t)===-1&&e.push(t)}function _3(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class b3{constructor(){this.subscriptions=[]}add(t){return v3(this.subscriptions,t),()=>_3(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class Uz{constructor(t,n={}){this.version="10.12.12",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:a}=an;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,De.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>De.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Nz(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new b3);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vw(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fs(e,t){return new Uz(e,t)}const Lw=e=>t=>t.test(e),$z={test:e=>e==="auto",parse:e=>e},Cw=[wa,Zt,pi,no,GO,WO,$z],sl=e=>Cw.find(Lw(e)),jz=[...Cw,En,Io],Vz=e=>jz.find(Lw(e));function qz(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fs(n))}function Qz(e,t){const n=p0(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=sR(o[a]);qz(e,a,s)}}function Wz(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;su.remove(h))),l.push(N)}return a&&Promise.all(l).then(()=>{a&&Qz(e,a)}),l}function Q2(e,t,n={}){const r=p0(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Sw(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:h}=i;return Yz(e,t,l+u,c,h,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[u,l]=s==="beforeChildren"?[o,a]:[a,o];return u().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Yz(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(Zz).forEach((l,c)=>{l.notify("AnimationStart",t),a.push(Q2(l,t,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function Zz(e,t){return e.sortNodePosition(t)}function Xz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Q2(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Q2(e,t,n);else{const i=typeof t=="function"?p0(e,t,n.custom):t;r=Promise.all(Sw(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Jz=[...e3].reverse(),tD=e3.length;function eD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Xz(e,n,r)))}function nD(e){let t=eD(e);const n=iD();let r=!0;const i=(u,l)=>{const c=p0(e,l);if(c){const{transition:h,transitionEnd:_,...v}=c;u={...u,...v,..._}}return u};function o(u){t=u(e)}function a(u,l){const c=e.getProps(),h=e.getVariantContext(!0)||{},_=[],v=new Set;let P={},N=1/0;for(let z=0;zN&⁢const K=Array.isArray(H)?H:[H];let G=K.reduce(i,{});B===!1&&(G={});const{prevResolvedValues:et={}}=W,w={...et,...G},g=E=>{Z=!0,v.delete(E),W.needsAnimating[E]=!0};for(const E in w){const U=G[E],Q=et[E];P.hasOwnProperty(E)||(U!==Q?sf(U)&&sf(Q)?!H5(U,Q)||L?g(E):W.protectedKeys[E]=!0:U!==void 0?g(E):v.add(E):U!==void 0&&v.has(E)?g(E):W.protectedKeys[E]=!0)}W.prevProp=H,W.prevResolvedValues=G,W.isActive&&(P={...P,...G}),r&&e.blockInitialAnimation&&(Z=!1),Z&&!p&&_.push(...K.map(E=>({animation:E,options:{type:I,...u}})))}if(v.size){const z={};v.forEach(I=>{const W=e.getBaseTarget(I);W!==void 0&&(z[I]=W)}),_.push({animation:z})}let M=Boolean(_.length);return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(M=!1),r=!1,M?t(_):Promise.resolve()}function s(u,l,c){var h;if(n[u].isActive===l)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(v=>{var P;return(P=v.animationState)===null||P===void 0?void 0:P.setActive(u,l)}),n[u].isActive=l;const _=a(c,u);for(const v in n)n[v].protectedKeys={};return _}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function rD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!H5(t,e):!1}function zo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iD(){return{animate:zo(!0),whileInView:zo(),whileHover:zo(),whileTap:zo(),whileDrag:zo(),whileFocus:zo(),exit:zo()}}class oD extends Po{constructor(t){super(t),t.animationState||(t.animationState=nD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),c0(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let aD=0;class sD extends Po{constructor(){super(...arguments),this.id=aD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lD={animation:{Feature:oD},exit:{Feature:sD}},Gv=(e,t)=>Math.abs(e-t);function cD(e,t){const n=Gv(e.x,t.x),r=Gv(e.y,t.y);return Math.sqrt(n**2+r**2)}class Fw{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=Vh(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,h=cD(l.offset,{x:0,y:0})>=3;if(!c&&!h)return;const{point:_}=l,{timestamp:v}=an;this.history.push({..._,timestamp:v});const{onStart:P,onMove:N}=this.handlers;c||(P&&P(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,l)},this.handlePointerMove=(l,c)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=jh(c,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(l,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:_}=this.handlers,v=Vh(l.type==="pointercancel"?this.lastMoveEventInfo:jh(c,this.transformPagePoint),this.history);this.startEvent&&h&&h(l,v),_&&_(l,v)},!j5(t))return;this.handlers=n,this.transformPagePoint=r;const i=f0(t),o=jh(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=an;this.history=[{...a,timestamp:s}];const{onSessionStart:u}=n;u&&u(t,Vh(o,this.history)),this.removeListeners=xo(Mi(window,"pointermove",this.handlePointerMove),Mi(window,"pointerup",this.handlePointerUp),Mi(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ji(this.updatePoint)}}function jh(e,t){return t?{point:t(e.point)}:e}function Hv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vh({point:e},t){return{point:e,delta:Hv(e,Iw(t)),offset:Hv(e,uD(t)),velocity:dD(t,.1)}}function uD(e){return e[0]}function Iw(e){return e[e.length-1]}function dD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Iw(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Lo(t)));)n--;if(!r)return{x:0,y:0};const o=Ti(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ar(e){return e.max-e.min}function W2(e,t=0,n=.01){return Math.abs(e-t)<=n}function Kv(e,t,n,r=.5){e.origin=r,e.originPoint=Ue(t.min,t.max,e.origin),e.scale=ar(n)/ar(t),(W2(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ue(n.min,n.max,e.origin)-e.originPoint,(W2(e.translate)||isNaN(e.translate))&&(e.translate=0)}function $l(e,t,n,r){Kv(e.x,t.x,n.x,r?r.originX:void 0),Kv(e.y,t.y,n.y,r?r.originY:void 0)}function Yv(e,t,n){e.min=n.min+t.min,e.max=e.min+ar(t)}function fD(e,t,n){Yv(e.x,t.x,n.x),Yv(e.y,t.y,n.y)}function Zv(e,t,n){e.min=t.min-n.min,e.max=e.min+ar(t)}function jl(e,t,n){Zv(e.x,t.x,n.x),Zv(e.y,t.y,n.y)}function hD(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ue(n,e,r.max):Math.min(e,n)),e}function Xv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pD(e,{top:t,left:n,bottom:r,right:i}){return{x:Xv(e.x,n,i),y:Xv(e.y,t,r)}}function Jv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Cc(t.min,t.max-r,e.min):r>i&&(n=Cc(e.min,e.max-i,t.min)),ga(0,1,n)}function yD(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const G2=.35;function vD(e=G2){return e===!1?e=0:e===!0&&(e=G2),{x:t_(e,"left","right"),y:t_(e,"top","bottom")}}function t_(e,t,n){return{min:e_(e,t),max:e_(e,n)}}function e_(e,t){return typeof e=="number"?e:e[t]||0}const n_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vl=()=>({x:n_(),y:n_()}),r_=()=>({min:0,max:0}),He=()=>({x:r_(),y:r_()});function Jr(e){return[e("x"),e("y")]}function Ew({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _D({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qh(e){return e===void 0||e===1}function H2({scale:e,scaleX:t,scaleY:n}){return!qh(e)||!qh(t)||!qh(n)}function $o(e){return H2(e)||Bw(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Bw(e){return i_(e.x)||i_(e.y)}function i_(e){return e&&e!=="0%"}function ff(e,t,n){const r=e-n,i=t*r;return n+i}function o_(e,t,n,r,i){return i!==void 0&&(e=ff(e,i,r)),ff(e,n,r)+t}function K2(e,t=0,n=1,r,i){e.min=o_(e.min,t,n,r,i),e.max=o_(e.max,t,n,r,i)}function kw(e,{x:t,y:n}){K2(e.x,t.translate,t.scale,t.originPoint),K2(e.y,n.translate,n.scale,n.originPoint)}function wD(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function ao(e,t){e.min=e.min+t,e.max=e.max+t}function s_(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Ue(e.min,e.max,o);K2(e,t[n],t[r],a,t.scale)}const AD=["x","scaleX","originX"],xD=["y","scaleY","originY"];function Xa(e,t){s_(e.x,t,AD),s_(e.y,t,xD)}function Pw(e,t){return Ew(bD(e.getBoundingClientRect(),t))}function LD(e,t,n){const r=Pw(e,n),{scroll:i}=t;return i&&(ao(r.x,i.offset.x),ao(r.y,i.offset.y)),r}const CD=new WeakMap;class SD{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=He(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=u=>{this.stopAnimation(),n&&this.snapToCursor(f0(u,"page").point)},o=(u,l)=>{const{drag:c,dragPropagation:h,onDragStart:_}=this.getProps();if(c&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=q5(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jr(P=>{let N=this.getAxisMotionValue(P).get()||0;if(pi.test(N)){const{projection:M}=this.visualElement;if(M&&M.layout){const z=M.layout.layoutBox[P];z&&(N=ar(z)*(parseFloat(N)/100))}}this.originPoint[P]=N}),_&&De.update(()=>_(u,l),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(u,l)=>{const{dragPropagation:c,dragDirectionLock:h,onDirectionLock:_,onDrag:v}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:P}=l;if(h&&this.currentDirection===null){this.currentDirection=FD(P),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",l.point,P),this.updateAxis("y",l.point,P),this.visualElement.render(),v&&v(u,l)},s=(u,l)=>this.stop(u,l);this.panSession=new Fw(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&De.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Iu(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=hD(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=pD(r.layoutBox,t):this.constraints=!1,this.elastic=vD(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Jr(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=yD(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ya(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=LD(r,i.root,this.visualElement.getTransformPagePoint());let a=gD(i.layout.layoutBox,o);if(n){const s=n(_D(a));this.hasMutatedConstraints=!!s,s&&(a=Ew(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=Jr(c=>{if(!Iu(c,n,this.currentDirection))return;let h=u&&u[c]||{};a&&(h={min:0,max:0});const _=i?200:1e6,v=i?40:1e7,P={type:"inertia",velocity:r?t[c]:0,bounceStiffness:_,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,P)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(y3(t,r,0,n))}stopAnimation(){Jr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Jr(n=>{const{drag:r}=this.getProps();if(!Iu(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Ue(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ya(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Jr(a=>{const s=this.getAxisMotionValue(a);if(s){const u=s.get();i[a]=mD({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Jr(a=>{if(!Iu(a,t,null))return;const s=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];s.set(Ue(u,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;CD.set(this.visualElement,this);const t=this.visualElement.current,n=Mi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Ya(u)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=Bi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(Jr(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=u[c].translate,h.set(h.get()+u[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=G2,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Iu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function FD(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ID extends Po{constructor(t){super(t),this.removeGroupControls=tn,this.removeListeners=tn,this.controls=new SD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn}unmount(){this.removeGroupControls(),this.removeListeners()}}const l_=e=>(t,n)=>{e&&De.update(()=>e(t,n))};class ED extends Po{constructor(){super(...arguments),this.removePointerDownListener=tn}onPointerDown(t){this.session=new Fw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:l_(t),onStart:l_(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&De.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=Mi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function BD(){const e=at.useContext($c);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=at.useId();return at.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function kD(){return PD(at.useContext($c))}function PD(e){return e===null?!0:e.isPresent}const cd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function c_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ll={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Zt.test(e))e=parseFloat(e);else return e;const n=c_(e,t.target.x),r=c_(e,t.target.y);return`${n}% ${r}%`}},MD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Io.parse(e);if(i.length>5)return r;const o=Io.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=u;const l=Ue(s,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};class TD extends Lr.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;NO(OD),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),cd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||De.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Mw(e){const[t,n]=BD(),r=at.useContext(r3);return Lr.createElement(TD,{...e,layoutGroup:r,switchLayoutGroup:at.useContext(F5),isPresent:t,safeToRemove:n})}const OD={borderRadius:{...ll,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ll,borderTopRightRadius:ll,borderBottomLeftRadius:ll,borderBottomRightRadius:ll,boxShadow:MD},Tw=["TopLeft","TopRight","BottomLeft","BottomRight"],RD=Tw.length,u_=e=>typeof e=="string"?parseFloat(e):e,d_=e=>typeof e=="number"||Zt.test(e);function zD(e,t,n,r,i,o){i?(e.opacity=Ue(0,n.opacity!==void 0?n.opacity:1,DD(r)),e.opacityExit=Ue(t.opacity!==void 0?t.opacity:1,0,ND(r))):o&&(e.opacity=Ue(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(Cc(e,t,r))}function h_(e,t){e.min=t.min,e.max=t.max}function mr(e,t){h_(e.x,t.x),h_(e.y,t.y)}function p_(e,t,n,r,i){return e-=t,e=ff(e,1/n,r),i!==void 0&&(e=ff(e,1/i,r)),e}function UD(e,t=0,n=1,r=.5,i,o=e,a=e){if(pi.test(t)&&(t=parseFloat(t),t=Ue(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Ue(o.min,o.max,r);e===o&&(s-=t),e.min=p_(e.min,t,n,s,i),e.max=p_(e.max,t,n,s,i)}function g_(e,t,[n,r,i],o,a){UD(e,t[n],t[r],t[i],t.scale,o,a)}const $D=["x","scaleX","originX"],jD=["y","scaleY","originY"];function m_(e,t,n,r){g_(e.x,t,$D,n?n.x:void 0,r?r.x:void 0),g_(e.y,t,jD,n?n.y:void 0,r?r.y:void 0)}function y_(e){return e.translate===0&&e.scale===1}function Rw(e){return y_(e.x)&&y_(e.y)}function Y2(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function v_(e){return ar(e.x)/ar(e.y)}class VD{constructor(){this.members=[]}add(t){v3(this.members,t),t.scheduleRender()}remove(t){if(_3(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function __(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:u,rotateX:l,rotateY:c}=n;u&&(r+=`rotate(${u}deg) `),l&&(r+=`rotateX(${l}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const qD=(e,t)=>e.depth-t.depth;class QD{constructor(){this.children=[],this.isDirty=!1}add(t){v3(this.children,t),this.isDirty=!0}remove(t){_3(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qD),this.isDirty=!1,this.children.forEach(t)}}function WD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ji(r),e(o-t))};return De.read(r,!0),()=>ji(r)}function GD(e){window.MotionDebug&&window.MotionDebug.record(e)}function HD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function KD(e,t,n){const r=Kn(e)?e:Fs(e);return r.start(y3("",r,t,n)),r.animation}const b_=["","X","Y","Z"],w_=1e3;let YD=0;const jo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function zw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=YD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{jo.totalNodes=jo.resolvedTargetDeltas=jo.recalculatedProjection=0,this.nodes.forEach(JD),this.nodes.forEach(rN),this.nodes.forEach(iN),this.nodes.forEach(tN),GD(jo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=WD(_,250),cd.hasAnimatedSinceResize&&(cd.hasAnimatedSinceResize=!1,this.nodes.forEach(x_))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:_,hasRelativeTargetChanged:v,layout:P})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const N=this.options.transition||c.getDefaultTransition()||cN,{onLayoutAnimationStart:M,onLayoutAnimationComplete:z}=c.getProps(),I=!this.targetLayout||!Y2(this.targetLayout,P)||v,W=!_&&v;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||W||_&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,W);const H={...xw(N,"layout"),onPlay:M,onComplete:z};(c.shouldReduceMotion||this.options.layoutRoot)&&(H.delay=0,H.type=!1),this.startAnimation(H)}else _||x_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=P})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ji(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(oN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(eN),this.sharedNodes.forEach(aN)}scheduleUpdateProjection(){De.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{const it=H/1e3;L_(h.x,a.x,it),L_(h.y,a.y,it),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sN(this.relativeTarget,this.relativeTargetOrigin,_,it),W&&Y2(this.relativeTarget,W)&&(this.isProjectionDirty=!1),W||(W=He()),mr(W,this.relativeTarget)),N&&(this.animationValues=c,zD(c,l,this.latestValues,it,I,z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=it},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ji(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{cd.hasAnimatedSinceResize=!0,this.currentAnimation=KD(0,w_,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(w_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=a;if(!(!s||!u||!l)){if(this!==a&&this.layout&&l&&Dw(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||He();const h=ar(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+h;const _=ar(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+_}mr(s,u),Xa(s,c),$l(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new VD),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:u}=a;if((u.rotate||u.rotateX||u.rotateY||u.rotateZ)&&(s=!0),!s)return;const l={};for(let c=0;c{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(A_),this.root.sharedNodes.clear()}}}function ZD(e){e.updateLayout()}function XD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?Jr(h=>{const _=a?n.measuredBox[h]:n.layoutBox[h],v=ar(_);_.min=r[h].min,_.max=_.min+v}):Dw(o,n.layoutBox,r)&&Jr(h=>{const _=a?n.measuredBox[h]:n.layoutBox[h],v=ar(r[h]);_.max=_.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+v)});const s=Vl();$l(s,r,n.layoutBox);const u=Vl();a?$l(u,e.applyTransform(i,!0),n.measuredBox):$l(u,r,n.layoutBox);const l=!Rw(s);let c=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:_,layout:v}=h;if(_&&v){const P=He();jl(P,n.layoutBox,_.layoutBox);const N=He();jl(N,r,v.layoutBox),Y2(P,N)||(c=!0),h.options.layoutRoot&&(e.relativeTarget=N,e.relativeTargetOrigin=P,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function JD(e){jo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function tN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eN(e){e.clearSnapshot()}function A_(e){e.clearMeasurements()}function nN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function x_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rN(e){e.resolveTargetDelta()}function iN(e){e.calcProjection()}function oN(e){e.resetRotation()}function aN(e){e.removeLeadSnapshot()}function L_(e,t,n){e.translate=Ue(t.translate,0,n),e.scale=Ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function C_(e,t,n,r){e.min=Ue(t.min,n.min,r),e.max=Ue(t.max,n.max,r)}function sN(e,t,n,r){C_(e.x,t.x,n.x,r),C_(e.y,t.y,n.y,r)}function lN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cN={duration:.45,ease:[.4,0,.1,1]};function S_(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function uN(e){S_(e.x),S_(e.y)}function Dw(e,t,n){return e==="position"||e==="preserve-aspect"&&!W2(v_(t),v_(n),.2)}const dN=zw({attachResizeListener:(e,t)=>Bi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qh={current:void 0},Nw=zw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qh.current){const e=new dN({});e.mount(window),e.setOptions({layoutScroll:!0}),Qh.current=e}return Qh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),fN={pan:{Feature:ED},drag:{Feature:ID,ProjectionNode:Nw,MeasureLayout:Mw}},hN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function pN(e){const t=hN.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Z2(e,t,n=1){const[r,i]=pN(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():D2(i)?Z2(i,t,n+1):i}function gN(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!D2(o))return;const a=Z2(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!D2(o))continue;const a=Z2(o,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const mN=new Set(["width","height","top","left","right","bottom","x","y"]),Uw=e=>mN.has(e),yN=e=>Object.keys(e).some(Uw),F_=e=>e===wa||e===Zt,I_=(e,t)=>parseFloat(e.split(", ")[t]),E_=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return I_(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?I_(o[1],e):0}},vN=new Set(["x","y","z"]),_N=jc.filter(e=>!vN.has(e));function bN(e){const t=[];return _N.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const B_={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:E_(4,13),y:E_(5,14)},wN=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(l=>{s[l]=B_[l](r,o)}),t.render();const u=t.measureViewportBox();return n.forEach(l=>{const c=t.getValue(l);c&&c.jump(s[l]),e[l]=B_[l](u,o)}),e},AN=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Uw);let o=[],a=!1;const s=[];if(i.forEach(u=>{const l=e.getValue(u);if(!e.hasValue(u))return;let c=n[u],h=sl(c);const _=t[u];let v;if(sf(_)){const P=_.length,N=_[0]===null?1:0;c=_[N],h=sl(c);for(let M=N;M=0?window.pageYOffset:null,l=wN(t,e,s);return o.length&&o.forEach(([c,h])=>{e.getValue(c).set(h)}),e.render(),l0&&u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function xN(e,t,n,r){return yN(t)?AN(e,t,n,r):{target:t,transitionEnd:r}}const LN=(e,t,n,r)=>{const i=gN(e,t,r);return t=i.target,r=i.transitionEnd,xN(e,t,n,r)},X2={current:null},$w={current:!1};function CN(){if($w.current=!0,!!l0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>X2.current=e.matches;e.addListener(t),t()}else X2.current=!1}function SN(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Kn(o))e.addValue(i,o),df(r)&&r.add(i);else if(Kn(a))e.addValue(i,Fs(o,{owner:e})),df(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,Fs(s!==void 0?s:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const k_=new WeakMap,jw=Object.keys(xc),FN=jw.length,P_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],IN=n3.length;class EN{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>De.render(this.render,!1,!0);const{latestValues:s,renderState:u}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=u0(n),this.isVariantNode=S5(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(n,{});for(const h in c){const _=c[h];s[h]!==void 0&&Kn(_)&&(_.set(s[h],!1),df(l)&&l.add(h))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,k_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),$w.current||CN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:X2.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){k_.delete(this.current),this.projection&&this.projection.unmount(),ji(this.notifyUpdate),ji(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ba.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&De.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let a,s;for(let u=0;uthis.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:_,layoutRoot:v})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):He()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Fs(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=d3(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Kn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new b3),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Vw extends EN{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Hz(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Wz(this,r,a);const s=LN(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function BN(e){return window.getComputedStyle(e)}class kN extends Vw{readValueFromInstance(t,n){if(ba.has(n)){const r=m3(n);return r&&r.default||0}else{const r=BN(t),i=(B5(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pw(t,n)}build(t,n,r,i){o3(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return u3(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Kn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){R5(t,n,r,i)}}class PN extends Vw{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ba.has(n)){const r=m3(n);return r&&r.default||0}return n=z5.has(n)?n:c3(n),t.getAttribute(n)}measureInstanceViewportBox(){return He()}scrapeMotionValuesFromProps(t,n){return N5(t,n)}build(t,n,r,i){s3(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){D5(t,n,r,i)}mount(t){this.isSVGTag=l3(t.tagName),super.mount(t)}}const MN=(e,t)=>i3(e)?new PN(t,{enableHardwareAcceleration:!1}):new kN(t,{enableHardwareAcceleration:!0}),TN={layout:{ProjectionNode:Nw,MeasureLayout:Mw}},ON={...lD,...ER,...fN,...TN},qw=zO((e,t)=>fR(e,t,ON,MN));function Qw(){const e=at.useRef(!1);return rf(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function RN(){const e=Qw(),[t,n]=at.useState(0),r=at.useCallback(()=>{e.current&&n(t+1)},[t]);return[at.useCallback(()=>De.postRender(r),[r]),t]}class zN extends at.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function DN({children:e,isPresent:t}){const n=at.useId(),r=at.useRef(null),i=at.useRef({width:0,height:0,top:0,left:0});return at.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:u}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(l)}},[t]),at.createElement(zN,{isPresent:t,childRef:r,sizeRef:i},at.cloneElement(e,{ref:r}))}const Wh=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=U5(NN),u=at.useId(),l=at.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:c=>{s.set(c,!0);for(const h of s.values())if(!h)return;r&&r()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?void 0:[n]);return at.useMemo(()=>{s.forEach((c,h)=>s.set(h,!1))},[n]),at.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=at.createElement(DN,{isPresent:n},e)),at.createElement($c.Provider,{value:l},e)};function NN(){return new Map}function UN(e){return at.useEffect(()=>()=>e(),[])}const Ma=e=>e.key||"";function $N(e,t){e.forEach(n=>{const r=Ma(n);t.set(r,n)})}function jN(e){const t=[];return at.Children.forEach(e,n=>{at.isValidElement(n)&&t.push(n)}),t}const Ww=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=at.useContext(r3).forceRender||RN()[0],u=Qw(),l=jN(e);let c=l;const h=at.useRef(new Map).current,_=at.useRef(c),v=at.useRef(new Map).current,P=at.useRef(!0);if(rf(()=>{P.current=!1,$N(l,v),_.current=c}),UN(()=>{P.current=!0,v.clear(),h.clear()}),P.current)return at.createElement(at.Fragment,null,c.map(I=>at.createElement(Wh,{key:Ma(I),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},I)));c=[...c];const N=_.current.map(Ma),M=l.map(Ma),z=N.length;for(let I=0;I{if(M.indexOf(W)!==-1)return;const H=v.get(W);if(!H)return;const it=N.indexOf(W);let B=I;if(!B){const p=()=>{v.delete(W),h.delete(W);const L=_.current.findIndex(Z=>Z.key===W);if(_.current.splice(L,1),!h.size){if(_.current=l,u.current===!1)return;s(),r&&r()}};B=at.createElement(Wh,{key:Ma(H),isPresent:!1,onExitComplete:p,custom:t,presenceAffectsLayout:o,mode:a},H),h.set(W,B)}c.splice(it,0,B)}),c=c.map(I=>{const W=I.key;return h.has(W)?I:at.createElement(Wh,{key:Ma(I),isPresent:!0,presenceAffectsLayout:o,mode:a},I)}),at.createElement(at.Fragment,null,h.size?c:c.map(I=>at.cloneElement(I)))};var VN={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Gw=at.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:u,motionVariants:l=VN,toastSpacing:c="0.5rem"}=e,[h,_]=at.useState(s),v=kD();nf(()=>{v||r==null||r()},[v]),nf(()=>{_(s)},[s]);const P=()=>_(null),N=()=>_(s),M=()=>{v&&i()};at.useEffect(()=>{v&&o&&i()},[v,o,i]),IO(M,h);const z=at.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...u}),[u,c]),I=at.useMemo(()=>SO(a),[a]);return wt(qw.div,{layout:!0,className:"chakra-toast",variants:l,initial:"initial",animate:"animate",exit:"exit",onHoverStart:P,onHoverEnd:N,custom:{position:a},style:I,children:wt(ee.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:z,children:po(n,{id:t,onClose:M})})})});Gw.displayName="ToastComponent";var M_={path:ze("g",{stroke:"currentColor",strokeWidth:"1.5",children:[wt("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),wt("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),wt("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Wi=ce((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:u,...l}=e,c=Cn("chakra-icon",s),h=_a("Icon",e),_={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...u,...h},v={ref:t,focusable:o,className:c,__css:_},P=r??M_.viewBox;if(n&&typeof n!="string")return wt(ee.svg,{as:n,...v,...l});const N=a??M_.path;return wt(ee.svg,{verticalAlign:"middle",viewBox:P,...v,...l,children:N})});Wi.displayName="Icon";function qN(e){return wt(Wi,{viewBox:"0 0 24 24",...e,children:wt("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function QN(e){return wt(Wi,{viewBox:"0 0 24 24",...e,children:wt("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function T_(e){return wt(Wi,{viewBox:"0 0 24 24",...e,children:wt("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var WN=R9({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),w3=ce((e,t)=>{const n=_a("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...u}=Hr(e),l=Cn("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${WN} ${o} linear infinite`,...n};return wt(ee.div,{ref:t,__css:c,className:l,...u,children:r&&wt(ee.span,{srOnly:!0,children:r})})});w3.displayName="Spinner";var[GN,A3]=cr({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[HN,x3]=cr({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hw={info:{icon:QN,colorScheme:"blue"},warning:{icon:T_,colorScheme:"orange"},success:{icon:qN,colorScheme:"green"},error:{icon:T_,colorScheme:"red"},loading:{icon:w3,colorScheme:"blue"}};function KN(e){return Hw[e].colorScheme}function YN(e){return Hw[e].icon}var Kw=ce(function(t,n){const r=x3(),{status:i}=A3(),o={display:"inline",...r.description};return wt(ee.div,{ref:n,"data-status":i,...t,className:Cn("chakra-alert__desc",t.className),__css:o})});Kw.displayName="AlertDescription";function Yw(e){const{status:t}=A3(),n=YN(t),r=x3(),i=t==="loading"?r.spinner:r.icon;return wt(ee.span,{display:"inherit","data-status":t,...e,className:Cn("chakra-alert__icon",e.className),__css:i,children:e.children||wt(n,{h:"100%",w:"100%"})})}Yw.displayName="AlertIcon";var Zw=ce(function(t,n){const r=x3(),{status:i}=A3();return wt(ee.div,{ref:n,"data-status":i,...t,className:Cn("chakra-alert__title",t.className),__css:r.title})});Zw.displayName="AlertTitle";var Xw=ce(function(t,n){var r;const{status:i="info",addRole:o=!0,...a}=Hr(t),s=(r=t.colorScheme)!=null?r:KN(i),u=Uc("Alert",{...t,colorScheme:s}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...u.container};return wt(GN,{value:{status:i},children:wt(HN,{value:u,children:wt(ee.div,{"data-status":i,role:o?"alert":void 0,ref:n,...a,className:Cn("chakra-alert",t.className),__css:l})})})});Xw.displayName="Alert";function ZN(e){return wt(Wi,{focusable:"false","aria-hidden":!0,...e,children:wt("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Jw=ce(function(t,n){const r=_a("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Hr(t),u={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return wt(ee.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...u,...r,...a},...s,children:i||wt(ZN,{width:"1em",height:"1em"})})});Jw.displayName="CloseButton";var XN={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ql=JN(XN);function JN(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=tU(i,o),{position:s,id:u}=a;return r(l=>{var c,h;const v=s.includes("top")?[a,...(c=l[s])!=null?c:[]]:[...(h=l[s])!=null?h:[],a];return{...l,[s]:v}}),u},update:(i,o)=>{i&&r(a=>{const s={...a},{position:u,index:l}=Ev(s,i);return u&&l!==-1&&(s[u][l]={...s[u][l],...o,message:nU(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((u,l)=>(u[l]=o[l].map(c=>({...c,requestClose:!0})),u),{...o}))},close:i=>{r(o=>{const a=x5(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(Ev(ql.getState(),i).position)}}var O_=0;function tU(e,t={}){var n,r;O_+=1;const i=(n=t.id)!=null?n:O_,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ql.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var eU=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,colorScheme:u,icon:l}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return ze(Xw,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:u,children:[wt(Yw,{children:l}),ze(ee.div,{flex:"1",maxWidth:"100%",children:[i&&wt(Zw,{id:c==null?void 0:c.title,children:i}),s&&wt(Kw,{id:c==null?void 0:c.description,display:"block",children:s})]}),o&&wt(Jw,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function nU(e={}){const{render:t,toastComponent:n=eU}=e;return i=>typeof t=="function"?t({...i,...e}):wt(n,{...i,...e})}var[rU,nZ]=cr({name:"ToastOptionsContext",strict:!1}),iU=e=>{const t=at.useSyncExternalStore(ql.subscribe,ql.getState,ql.getState),{motionVariants:n,component:r=Gw,portalProps:i}=e,a=Object.keys(t).map(s=>{const u=t[s];return wt("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${s}`,style:FO(s),children:wt(Ww,{initial:!1,children:u.map(l=>wt(r,{motionVariants:n,...l},l.id))})},s)});return wt(zc,{...i,children:a})},oU=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return ze(LO,{theme:r,...o,children:[wt(rU,{value:i==null?void 0:i.defaultOptions,children:n}),wt(iU,{...i})]})},aU=oU(d5);function sU(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Fr(...e){return t=>{e.forEach(n=>{sU(n,t)})}}function lU(...e){return at.useMemo(()=>Fr(...e),e)}function cU(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(_,v)=>_!==v}=e,o=mn(r),a=mn(i),[s,u]=at.useState(n),l=t!==void 0,c=l?t:s,h=mn(_=>{const P=typeof _=="function"?_(c):_;a(c,P)&&(l||u(P),o(P))},[l,o,c,a]);return[c,h]}var J2=ce(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return wt("img",{width:r,height:i,ref:n,alt:o,...a})});J2.displayName="NativeImage";function uU(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:u}=e,[l,c]=at.useState("pending");at.useEffect(()=>{c(n?"loading":"pending")},[n]);const h=at.useRef(),_=at.useCallback(()=>{if(!n)return;v();const P=new Image;P.src=n,a&&(P.crossOrigin=a),r&&(P.srcset=r),s&&(P.sizes=s),t&&(P.loading=t),P.onload=N=>{v(),c("loaded"),i==null||i(N)},P.onerror=N=>{v(),c("failed"),o==null||o(N)},h.current=P},[n,a,r,s,i,o,t]),v=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return vs(()=>{if(!u)return l==="loading"&&_(),()=>{v()}},[l,_,u]),u?"loaded":l}var dU=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function fU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var tA=ce(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:u,loading:l,ignoreFallback:c,crossOrigin:h,fallbackStrategy:_="beforeLoadOrError",referrerPolicy:v,...P}=t,N=r!==void 0||i!==void 0,M=l!=null||c||!N,z=uU({...t,crossOrigin:h,ignoreFallback:M}),I=dU(z,_),W={ref:n,objectFit:u,objectPosition:s,...M?P:fU(P,["onError","onLoad"])};return I?i||wt(ee.img,{as:J2,className:"chakra-image__placeholder",src:r,...W}):wt(ee.img,{as:J2,src:o,srcSet:a,crossOrigin:h,loading:l,referrerPolicy:v,className:"chakra-image",...W})});tA.displayName="Image";function eA(e){return at.Children.toArray(e).filter(t=>at.isValidElement(t))}var[rZ,hU]=cr({strict:!1,name:"ButtonGroupContext"});function pU(e){const[t,n]=at.useState(!e);return{ref:at.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function tg(e){const{children:t,className:n,...r}=e,i=at.isValidElement(t)?at.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Cn("chakra-button__icon",n);return wt(ee.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o,children:i})}tg.displayName="ButtonIcon";function eg(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=wt(w3,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,u=Cn("chakra-button__spinner",o),l=n==="start"?"marginEnd":"marginStart",c=at.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[l]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,l,r]);return wt(ee.div,{className:u,...s,__css:c,children:i})}eg.displayName="ButtonSpinner";var L3=ce((e,t)=>{const n=hU(),r=_a("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:u,rightIcon:l,loadingText:c,iconSpacing:h="0.5rem",type:_,spinner:v,spinnerPlacement:P="start",className:N,as:M,...z}=Hr(e),I=at.useMemo(()=>{const B={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:B}}},[r,n]),{ref:W,type:H}=pU(M),it={rightIcon:l,leftIcon:u,iconSpacing:h,children:s};return ze(ee.button,{ref:lU(t,W),as:M,type:_??H,"data-active":Ga(a),"data-loading":Ga(o),__css:I,className:Cn("chakra-button",N),...z,disabled:i||o,children:[o&&P==="start"&&wt(eg,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:h,children:v}),o?c||wt(ee.span,{opacity:0,children:wt(R_,{...it})}):wt(R_,{...it}),o&&P==="end"&&wt(eg,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:h,children:v})]})});L3.displayName="Button";function R_(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ze(Ep,{children:[t&&wt(tg,{marginEnd:i,children:t}),r,n&&wt(tg,{marginStart:i,children:n})]})}var nA=ce((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,u=at.isValidElement(s)?at.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return wt(L3,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:u})});nA.displayName="IconButton";var[gU,mU]=cr({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[yU,rA]=cr({strict:!1,name:"FormControlContext"});function vU(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=at.useId(),u=t||`field-${s}`,l=`${u}-label`,c=`${u}-feedback`,h=`${u}-helptext`,[_,v]=at.useState(!1),[P,N]=at.useState(!1),[M,z]=at.useState(!1),I=at.useCallback((p={},L=null)=>({id:h,...p,ref:Fr(L,Z=>{Z&&N(!0)})}),[h]),W=at.useCallback((p={},L=null)=>({...p,ref:L,"data-focus":Ga(M),"data-disabled":Ga(i),"data-invalid":Ga(r),"data-readonly":Ga(o),id:p.id!==void 0?p.id:l,htmlFor:p.htmlFor!==void 0?p.htmlFor:u}),[u,i,M,r,o,l]),H=at.useCallback((p={},L=null)=>({id:c,...p,ref:Fr(L,Z=>{Z&&v(!0)}),"aria-live":"polite"}),[c]),it=at.useCallback((p={},L=null)=>({...p,...a,ref:L,role:"group"}),[a]),B=at.useCallback((p={},L=null)=>({...p,ref:L,role:"presentation","aria-hidden":!0,children:p.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!M,onFocus:()=>z(!0),onBlur:()=>z(!1),hasFeedbackText:_,setHasFeedbackText:v,hasHelpText:P,setHasHelpText:N,id:u,labelId:l,feedbackId:c,helpTextId:h,htmlProps:a,getHelpTextProps:I,getErrorMessageProps:H,getRootProps:it,getLabelProps:W,getRequiredIndicatorProps:B}}var _U=ce(function(t,n){const r=Uc("Form",t),i=Hr(t),{getRootProps:o,htmlProps:a,...s}=vU(i),u=Cn("chakra-form-control",t.className);return wt(yU,{value:s,children:wt(gU,{value:r,children:wt(ee.div,{...o({},n),className:u,__css:r.container})})})});_U.displayName="FormControl";var bU=ce(function(t,n){const r=rA(),i=mU(),o=Cn("chakra-form__helper-text",t.className);return wt(ee.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});bU.displayName="FormHelperText";function wU(e){var t,n,r;const i=rA(),{id:o,disabled:a,readOnly:s,required:u,isRequired:l,isInvalid:c,isReadOnly:h,isDisabled:_,onFocus:v,onBlur:P,...N}=e,M=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&M.push(i.feedbackId),i!=null&&i.hasHelpText&&M.push(i.helpTextId),{...N,"aria-describedby":M.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=a??_)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=s??h)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=u??l)!=null?r:i==null?void 0:i.isRequired,isInvalid:c??(i==null?void 0:i.isInvalid),onFocus:hn(i==null?void 0:i.onFocus,v),onBlur:hn(i==null?void 0:i.onBlur,P)}}function AU(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C3(e,t){let n=AU(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function ng(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function z_(e,t,n){return(e-t)*100/(n-t)}function xU(e,t,n){return(n-t)*e+t}function D_(e,t,n){const r=Math.round((e-t)/n)*n+t,i=ng(n);return C3(r,i)}function ud(e,t,n){return e==null?e:(n{var K;return r==null?"":(K=Gh(r,o,n))!=null?K:""}),_=typeof i<"u",v=_?i:c,P=iA(ro(v),o),N=n??P,M=at.useCallback(K=>{K!==v&&(_||h(K.toString()),l==null||l(K.toString(),ro(K)))},[l,_,v]),z=at.useCallback(K=>{let G=K;return u&&(G=ud(G,a,s)),C3(G,N)},[N,u,s,a]),I=at.useCallback((K=o)=>{let G;v===""?G=ro(K):G=ro(v)+K,G=z(G),M(G)},[z,o,M,v]),W=at.useCallback((K=o)=>{let G;v===""?G=ro(-K):G=ro(v)-K,G=z(G),M(G)},[z,o,M,v]),H=at.useCallback(()=>{var K;let G;r==null?G="":G=(K=Gh(r,o,n))!=null?K:a,M(G)},[r,n,o,M,a]),it=at.useCallback(K=>{var G;const et=(G=Gh(K,o,N))!=null?G:a;M(et)},[N,o,M,a]),B=ro(v);return{isOutOfRange:B>s||B{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}var[CU,oA]=cr({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),g0=ce(function(t,n){const r=Uc("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...u}=Hr(t),l=eA(i),h=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return wt(CU,{value:r,children:wt(ee.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...h},...u,children:l})})});g0.displayName="List";var SU=ce((e,t)=>{const{as:n,...r}=e;return wt(g0,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});SU.displayName="OrderedList";var FU=ce(function(t,n){const{as:r,...i}=t;return wt(g0,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});FU.displayName="UnorderedList";var aA=ce(function(t,n){const r=oA();return wt(ee.li,{ref:n,...t,__css:r.item})});aA.displayName="ListItem";var sA=ce(function(t,n){const r=oA();return wt(Wi,{ref:n,role:"presentation",...t,__css:r.icon})});sA.displayName="ListIcon";function lA(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Sr(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var m0=ce(function(t,n){const r=_a("Text",t),{className:i,align:o,decoration:a,casing:s,...u}=Hr(t),l=cO({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return wt(ee.p,{ref:n,className:Cn("chakra-text",t.className),...l,...u,__css:r})});m0.displayName="Text";var cA=e=>wt(ee.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});cA.displayName="StackItem";var rg="& > *:not(style) ~ *:not(style)";function IU(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[rg]:lA(n,i=>r[i])}}function EU(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":lA(n,i=>r[i])}}var uA=ce((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:u,divider:l,className:c,shouldWrapChildren:h,..._}=e,v=n?"row":r??"column",P=at.useMemo(()=>IU({direction:v,spacing:a}),[v,a]),N=at.useMemo(()=>EU({spacing:a,direction:v}),[a,v]),M=!!l,z=!h&&!M,I=at.useMemo(()=>{const H=eA(u);return z?H:H.map((it,B)=>{const p=typeof it.key<"u"?it.key:B,L=B+1===H.length,K=h?wt(cA,{children:it},p):it;if(!M)return K;const G=at.cloneElement(l,{__css:N}),et=L?null:G;return ze(at.Fragment,{children:[K,et]},p)})},[l,N,M,z,h,u]),W=Cn("chakra-stack",c);return wt(ee.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:P.flexDirection,flexWrap:s,className:W,__css:M?{}:{[rg]:P[rg]},..._,children:I})});uA.displayName="Stack";var dA=ce((e,t)=>wt(uA,{align:"center",...e,direction:"row",ref:t}));dA.displayName="HStack";var S3=ee("div");S3.displayName="Box";var fA=ce(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return wt(S3,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fA.displayName="Square";var BU=ce(function(t,n){const{size:r,...i}=t;return wt(fA,{size:r,ref:n,borderRadius:"9999px",...i})});BU.displayName="Circle";var ig=ce(function(t,n){const r=_a("Link",t),{className:i,isExternal:o,...a}=Hr(t);return wt(ee.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Cn("chakra-link",i),...a,__css:r})});ig.displayName="Link";var Jo=ce(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:u,shrink:l,...c}=t,h={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:u,flexShrink:l};return wt(ee.div,{ref:n,__css:h,...c})});Jo.displayName="Flex";var Ia=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),gn={arrowShadowColor:Ia("--popper-arrow-shadow-color"),arrowSize:Ia("--popper-arrow-size","8px"),arrowSizeHalf:Ia("--popper-arrow-size-half"),arrowBg:Ia("--popper-arrow-bg"),transformOrigin:Ia("--popper-transform-origin"),arrowOffset:Ia("--popper-arrow-offset")};function kU(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var PU={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},MU=e=>PU[e],N_={scroll:!0,resize:!0};function TU(e){let t;return typeof e=="object"?t={enabled:!0,options:{...N_,...e}}:t={enabled:e,options:N_},t}var OU={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},RU={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{U_(e)},effect:({state:e})=>()=>{U_(e)}},U_=e=>{e.elements.popper.style.setProperty(gn.transformOrigin.var,MU(e.placement))},zU={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{DU(e)}},DU=e=>{var t;if(!e.placement)return;const n=NU(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:gn.arrowSize.varRef,height:gn.arrowSize.varRef,zIndex:-1});const r={[gn.arrowSizeHalf.var]:`calc(${gn.arrowSize.varRef} / 2 - 1px)`,[gn.arrowOffset.var]:`calc(${gn.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},NU=e=>{if(e.startsWith("top"))return{property:"bottom",value:gn.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:gn.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:gn.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:gn.arrowOffset.varRef}},UU={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{$_(e)},effect:({state:e})=>()=>{$_(e)}},$_=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=kU(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:gn.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},$U={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},jU={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function VU(e,t="ltr"){var n,r;const i=((n=$U[e])==null?void 0:n[t])||e;return t==="ltr"?i:(r=jU[e])!=null?r:i}var Wn="top",kr="bottom",Pr="right",Gn="left",F3="auto",Wc=[Wn,kr,Pr,Gn],Is="start",Sc="end",qU="clippingParents",hA="viewport",cl="popper",QU="reference",j_=Wc.reduce(function(e,t){return e.concat([t+"-"+Is,t+"-"+Sc])},[]),pA=[].concat(Wc,[F3]).reduce(function(e,t){return e.concat([t,t+"-"+Is,t+"-"+Sc])},[]),WU="beforeRead",GU="read",HU="afterRead",KU="beforeMain",YU="main",ZU="afterMain",XU="beforeWrite",JU="write",t$="afterWrite",e$=[WU,GU,HU,KU,YU,ZU,XU,JU,t$];function yi(e){return e?(e.nodeName||"").toLowerCase():null}function sr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ma(e){var t=sr(e).Element;return e instanceof t||e instanceof Element}function Ir(e){var t=sr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function I3(e){if(typeof ShadowRoot>"u")return!1;var t=sr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function n$(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ir(o)||!yi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function r$(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(u,l){return u[l]="",u},{});!Ir(i)||!yi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const i$={name:"applyStyles",enabled:!0,phase:"write",fn:n$,effect:r$,requires:["computeStyles"]};function gi(e){return e.split("-")[0]}var aa=Math.max,hf=Math.min,Es=Math.round;function og(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gA(){return!/^((?!chrome|android).)*safari/i.test(og())}function Bs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ir(e)&&(i=e.offsetWidth>0&&Es(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Es(r.height)/e.offsetHeight||1);var a=ma(e)?sr(e):window,s=a.visualViewport,u=!gA()&&n,l=(r.left+(u&&s?s.offsetLeft:0))/i,c=(r.top+(u&&s?s.offsetTop:0))/o,h=r.width/i,_=r.height/o;return{width:h,height:_,top:c,right:l+h,bottom:c+_,left:l,x:l,y:c}}function E3(e){var t=Bs(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function mA(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I3(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Vi(e){return sr(e).getComputedStyle(e)}function o$(e){return["table","td","th"].indexOf(yi(e))>=0}function Mo(e){return((ma(e)?e.ownerDocument:e.document)||window.document).documentElement}function y0(e){return yi(e)==="html"?e:e.assignedSlot||e.parentNode||(I3(e)?e.host:null)||Mo(e)}function V_(e){return!Ir(e)||Vi(e).position==="fixed"?null:e.offsetParent}function a$(e){var t=/firefox/i.test(og()),n=/Trident/i.test(og());if(n&&Ir(e)){var r=Vi(e);if(r.position==="fixed")return null}var i=y0(e);for(I3(i)&&(i=i.host);Ir(i)&&["html","body"].indexOf(yi(i))<0;){var o=Vi(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Gc(e){for(var t=sr(e),n=V_(e);n&&o$(n)&&Vi(n).position==="static";)n=V_(n);return n&&(yi(n)==="html"||yi(n)==="body"&&Vi(n).position==="static")?t:n||a$(e)||t}function B3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ql(e,t,n){return aa(e,hf(t,n))}function s$(e,t,n){var r=Ql(e,t,n);return r>n?n:r}function yA(){return{top:0,right:0,bottom:0,left:0}}function vA(e){return Object.assign({},yA(),e)}function _A(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var l$=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,vA(typeof t!="number"?t:_A(t,Wc))};function c$(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=gi(n.placement),u=B3(s),l=[Gn,Pr].indexOf(s)>=0,c=l?"height":"width";if(!(!o||!a)){var h=l$(i.padding,n),_=E3(o),v=u==="y"?Wn:Gn,P=u==="y"?kr:Pr,N=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],M=a[u]-n.rects.reference[u],z=Gc(o),I=z?u==="y"?z.clientHeight||0:z.clientWidth||0:0,W=N/2-M/2,H=h[v],it=I-_[c]-h[P],B=I/2-_[c]/2+W,p=Ql(H,B,it),L=u;n.modifiersData[r]=(t={},t[L]=p,t.centerOffset=p-B,t)}}function u$(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||mA(t.elements.popper,i)&&(t.elements.arrow=i))}const d$={name:"arrow",enabled:!0,phase:"main",fn:c$,effect:u$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ks(e){return e.split("-")[1]}var f$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function h$(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Es(n*i)/i||0,y:Es(r*i)/i||0}}function q_(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,h=e.isFixed,_=a.x,v=_===void 0?0:_,P=a.y,N=P===void 0?0:P,M=typeof c=="function"?c({x:v,y:N}):{x:v,y:N};v=M.x,N=M.y;var z=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),W=Gn,H=Wn,it=window;if(l){var B=Gc(n),p="clientHeight",L="clientWidth";if(B===sr(n)&&(B=Mo(n),Vi(B).position!=="static"&&s==="absolute"&&(p="scrollHeight",L="scrollWidth")),B=B,i===Wn||(i===Gn||i===Pr)&&o===Sc){H=kr;var Z=h&&B===it&&it.visualViewport?it.visualViewport.height:B[p];N-=Z-r.height,N*=u?1:-1}if(i===Gn||(i===Wn||i===kr)&&o===Sc){W=Pr;var K=h&&B===it&&it.visualViewport?it.visualViewport.width:B[L];v-=K-r.width,v*=u?1:-1}}var G=Object.assign({position:s},l&&f$),et=c===!0?h$({x:v,y:N},sr(n)):{x:v,y:N};if(v=et.x,N=et.y,u){var w;return Object.assign({},G,(w={},w[H]=I?"0":"",w[W]=z?"0":"",w.transform=(it.devicePixelRatio||1)<=1?"translate("+v+"px, "+N+"px)":"translate3d("+v+"px, "+N+"px, 0)",w))}return Object.assign({},G,(t={},t[H]=I?N+"px":"",t[W]=z?v+"px":"",t.transform="",t))}function p$(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,u=s===void 0?!0:s,l={placement:gi(t.placement),variation:ks(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,q_(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,q_(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const g$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:p$,data:{}};var Eu={passive:!0};function m$(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,u=sr(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(c){c.addEventListener("scroll",n.update,Eu)}),s&&u.addEventListener("resize",n.update,Eu),function(){o&&l.forEach(function(c){c.removeEventListener("scroll",n.update,Eu)}),s&&u.removeEventListener("resize",n.update,Eu)}}const y$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:m$,data:{}};var v$={left:"right",right:"left",bottom:"top",top:"bottom"};function fd(e){return e.replace(/left|right|bottom|top/g,function(t){return v$[t]})}var _$={start:"end",end:"start"};function Q_(e){return e.replace(/start|end/g,function(t){return _$[t]})}function k3(e){var t=sr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function P3(e){return Bs(Mo(e)).left+k3(e).scrollLeft}function b$(e,t){var n=sr(e),r=Mo(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;var l=gA();(l||!l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s+P3(e),y:u}}function w$(e){var t,n=Mo(e),r=k3(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=aa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=aa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+P3(e),u=-r.scrollTop;return Vi(i||n).direction==="rtl"&&(s+=aa(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}function M3(e){var t=Vi(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bA(e){return["html","body","#document"].indexOf(yi(e))>=0?e.ownerDocument.body:Ir(e)&&M3(e)?e:bA(y0(e))}function Wl(e,t){var n;t===void 0&&(t=[]);var r=bA(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=sr(r),a=i?[o].concat(o.visualViewport||[],M3(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Wl(y0(a)))}function ag(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function A$(e,t){var n=Bs(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function W_(e,t,n){return t===hA?ag(b$(e,n)):ma(t)?A$(t,n):ag(w$(Mo(e)))}function x$(e){var t=Wl(y0(e)),n=["absolute","fixed"].indexOf(Vi(e).position)>=0,r=n&&Ir(e)?Gc(e):e;return ma(r)?t.filter(function(i){return ma(i)&&mA(i,r)&&yi(i)!=="body"}):[]}function L$(e,t,n,r){var i=t==="clippingParents"?x$(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(u,l){var c=W_(e,l,r);return u.top=aa(c.top,u.top),u.right=hf(c.right,u.right),u.bottom=hf(c.bottom,u.bottom),u.left=aa(c.left,u.left),u},W_(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wA(e){var t=e.reference,n=e.element,r=e.placement,i=r?gi(r):null,o=r?ks(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(i){case Wn:u={x:a,y:t.y-n.height};break;case kr:u={x:a,y:t.y+t.height};break;case Pr:u={x:t.x+t.width,y:s};break;case Gn:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var l=i?B3(i):null;if(l!=null){var c=l==="y"?"height":"width";switch(o){case Is:u[l]=u[l]-(t[c]/2-n[c]/2);break;case Sc:u[l]=u[l]+(t[c]/2-n[c]/2);break}}return u}function Fc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,u=s===void 0?qU:s,l=n.rootBoundary,c=l===void 0?hA:l,h=n.elementContext,_=h===void 0?cl:h,v=n.altBoundary,P=v===void 0?!1:v,N=n.padding,M=N===void 0?0:N,z=vA(typeof M!="number"?M:_A(M,Wc)),I=_===cl?QU:cl,W=e.rects.popper,H=e.elements[P?I:_],it=L$(ma(H)?H:H.contextElement||Mo(e.elements.popper),u,c,a),B=Bs(e.elements.reference),p=wA({reference:B,element:W,strategy:"absolute",placement:i}),L=ag(Object.assign({},W,p)),Z=_===cl?L:B,K={top:it.top-Z.top+z.top,bottom:Z.bottom-it.bottom+z.bottom,left:it.left-Z.left+z.left,right:Z.right-it.right+z.right},G=e.modifiersData.offset;if(_===cl&&G){var et=G[i];Object.keys(K).forEach(function(w){var g=[Pr,kr].indexOf(w)>=0?1:-1,E=[Wn,kr].indexOf(w)>=0?"y":"x";K[w]+=et[E]*g})}return K}function C$(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=u===void 0?pA:u,c=ks(r),h=c?s?j_:j_.filter(function(P){return ks(P)===c}):Wc,_=h.filter(function(P){return l.indexOf(P)>=0});_.length===0&&(_=h);var v=_.reduce(function(P,N){return P[N]=Fc(e,{placement:N,boundary:i,rootBoundary:o,padding:a})[gi(N)],P},{});return Object.keys(v).sort(function(P,N){return v[P]-v[N]})}function S$(e){if(gi(e)===F3)return[];var t=fd(e);return[Q_(e),t,Q_(t)]}function F$(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,u=n.fallbackPlacements,l=n.padding,c=n.boundary,h=n.rootBoundary,_=n.altBoundary,v=n.flipVariations,P=v===void 0?!0:v,N=n.allowedAutoPlacements,M=t.options.placement,z=gi(M),I=z===M,W=u||(I||!P?[fd(M)]:S$(M)),H=[M].concat(W).reduce(function(lt,S){return lt.concat(gi(S)===F3?C$(t,{placement:S,boundary:c,rootBoundary:h,padding:l,flipVariations:P,allowedAutoPlacements:N}):S)},[]),it=t.rects.reference,B=t.rects.popper,p=new Map,L=!0,Z=H[0],K=0;K=0,E=g?"width":"height",U=Fc(t,{placement:G,boundary:c,rootBoundary:h,altBoundary:_,padding:l}),Q=g?w?Pr:Gn:w?kr:Wn;it[E]>B[E]&&(Q=fd(Q));var T=fd(Q),Y=[];if(o&&Y.push(U[et]<=0),s&&Y.push(U[Q]<=0,U[T]<=0),Y.every(function(lt){return lt})){Z=G,L=!1;break}p.set(G,Y)}if(L)for(var J=P?3:1,V=function(S){var d=H.find(function($){var f=p.get($);if(f)return f.slice(0,S).every(function(R){return R})});if(d)return Z=d,"break"},C=J;C>0;C--){var O=V(C);if(O==="break")break}t.placement!==Z&&(t.modifiersData[r]._skip=!0,t.placement=Z,t.reset=!0)}}const I$={name:"flip",enabled:!0,phase:"main",fn:F$,requiresIfExists:["offset"],data:{_skip:!1}};function G_(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function H_(e){return[Wn,Pr,kr,Gn].some(function(t){return e[t]>=0})}function E$(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Fc(t,{elementContext:"reference"}),s=Fc(t,{altBoundary:!0}),u=G_(a,r),l=G_(s,i,o),c=H_(u),h=H_(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}const B$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:E$};function k$(e,t,n){var r=gi(e),i=[Gn,Wn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Gn,Pr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function P$(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=pA.reduce(function(c,h){return c[h]=k$(h,t.rects,o),c},{}),s=a[t.placement],u=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}const M$={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:P$};function T$(e){var t=e.state,n=e.name;t.modifiersData[n]=wA({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const O$={name:"popperOffsets",enabled:!0,phase:"read",fn:T$,data:{}};function R$(e){return e==="x"?"y":"x"}function z$(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,h=n.padding,_=n.tether,v=_===void 0?!0:_,P=n.tetherOffset,N=P===void 0?0:P,M=Fc(t,{boundary:u,rootBoundary:l,padding:h,altBoundary:c}),z=gi(t.placement),I=ks(t.placement),W=!I,H=B3(z),it=R$(H),B=t.modifiersData.popperOffsets,p=t.rects.reference,L=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,K=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,et={x:0,y:0};if(B){if(o){var w,g=H==="y"?Wn:Gn,E=H==="y"?kr:Pr,U=H==="y"?"height":"width",Q=B[H],T=Q+M[g],Y=Q-M[E],J=v?-L[U]/2:0,V=I===Is?p[U]:L[U],C=I===Is?-L[U]:-p[U],O=t.elements.arrow,lt=v&&O?E3(O):{width:0,height:0},S=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yA(),d=S[g],$=S[E],f=Ql(0,p[U],lt[U]),R=W?p[U]/2-J-f-d-K.mainAxis:V-f-d-K.mainAxis,k=W?-p[U]/2+J+f+$+K.mainAxis:C+f+$+K.mainAxis,x=t.elements.arrow&&Gc(t.elements.arrow),ot=x?H==="y"?x.clientTop||0:x.clientLeft||0:0,_t=(w=G==null?void 0:G[H])!=null?w:0,dt=Q+R-_t-ot,bt=Q+k-_t,Ut=Ql(v?hf(T,dt):T,Q,v?aa(Y,bt):Y);B[H]=Ut,et[H]=Ut-Q}if(s){var Pt,Ot=H==="x"?Wn:Gn,yt=H==="x"?kr:Pr,It=B[it],Ft=it==="y"?"height":"width",Lt=It+M[Ot],St=It-M[yt],Ct=[Wn,Gn].indexOf(z)!==-1,jt=(Pt=G==null?void 0:G[it])!=null?Pt:0,j=Ct?Lt:It-p[Ft]-L[Ft]-jt+K.altAxis,F=Ct?It+p[Ft]+L[Ft]-jt-K.altAxis:St,y=v&&Ct?s$(j,It,F):Ql(v?j:Lt,It,v?F:St);B[it]=y,et[it]=y-It}t.modifiersData[r]=et}}const D$={name:"preventOverflow",enabled:!0,phase:"main",fn:z$,requiresIfExists:["offset"]};function N$(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function U$(e){return e===sr(e)||!Ir(e)?k3(e):N$(e)}function $$(e){var t=e.getBoundingClientRect(),n=Es(t.width)/e.offsetWidth||1,r=Es(t.height)/e.offsetHeight||1;return n!==1||r!==1}function j$(e,t,n){n===void 0&&(n=!1);var r=Ir(t),i=Ir(t)&&$$(t),o=Mo(t),a=Bs(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((yi(t)!=="body"||M3(o))&&(s=U$(t)),Ir(t)?(u=Bs(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=P3(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function V$(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&i(u)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function q$(e){var t=V$(e);return e$.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Q$(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function W$(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var K_={placement:"bottom",modifiers:[],strategy:"absolute"};function Y_(){for(var e=arguments.length,t=new Array(e),n=0;n{}),W=at.useCallback(()=>{var K;!t||!P.current||!N.current||((K=I.current)==null||K.call(I),M.current=K$(P.current,N.current,{placement:z,modifiers:[UU,zU,RU,{...OU,enabled:!!_},{name:"eventListeners",...TU(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,u]}},{name:"flip",enabled:!!l,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:c}},...n??[]],strategy:i}),M.current.forceUpdate(),I.current=M.current.destroy)},[z,t,n,_,a,o,s,u,l,h,c,i]);at.useEffect(()=>()=>{var K;!P.current&&!N.current&&((K=M.current)==null||K.destroy(),M.current=null)},[]);const H=at.useCallback(K=>{P.current=K,W()},[W]),it=at.useCallback((K={},G=null)=>({...K,ref:Fr(H,G)}),[H]),B=at.useCallback(K=>{N.current=K,W()},[W]),p=at.useCallback((K={},G=null)=>({...K,ref:Fr(B,G),style:{...K.style,position:i,minWidth:_?void 0:"max-content",inset:"0 auto auto 0"}}),[i,B,_]),L=at.useCallback((K={},G=null)=>{const{size:et,shadowColor:w,bg:g,style:E,...U}=K;return{...U,ref:G,"data-popper-arrow":"",style:Z$(K)}},[]),Z=at.useCallback((K={},G=null)=>({...K,ref:G,"data-popper-arrow-inner":""}),[]);return{update(){var K;(K=M.current)==null||K.update()},forceUpdate(){var K;(K=M.current)==null||K.forceUpdate()},transformOrigin:gn.transformOrigin.varRef,referenceRef:H,popperRef:B,getPopperProps:p,getArrowProps:L,getArrowInnerProps:Z,getReferenceProps:it}}function Z$(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function X$(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=mn(n),a=mn(t),[s,u]=at.useState(e.defaultIsOpen||!1),l=r!==void 0?r:s,c=r!==void 0,h=at.useId(),_=i??`disclosure-${h}`,v=at.useCallback(()=>{c||u(!1),a==null||a()},[c,a]),P=at.useCallback(()=>{c||u(!0),o==null||o()},[c,o]),N=at.useCallback(()=>{l?v():P()},[l,P,v]);function M(I={}){return{...I,"aria-expanded":l,"aria-controls":_,onClick(W){var H;(H=I.onClick)==null||H.call(I,W),N()}}}function z(I={}){return{...I,hidden:!l,id:_}}return{isOpen:l,onOpen:P,onClose:v,onToggle:N,isControlled:c,getButtonProps:M,getDisclosureProps:z}}var J$=e=>wt(Wi,{viewBox:"0 0 24 24",...e,children:wt("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),tj=e=>wt(Wi,{viewBox:"0 0 24 24",...e,children:wt("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function Z_(e,t,n,r){at.useEffect(()=>{var i;if(!e.current||!r)return;const o=(i=e.current.ownerDocument.defaultView)!=null?i:window,a=Array.isArray(t)?t:[t],s=new o.MutationObserver(u=>{for(const l of u)l.type==="attributes"&&l.attributeName&&a.includes(l.attributeName)&&n(l)});return s.observe(e.current,{attributes:!0,attributeFilter:a}),()=>s.disconnect()})}function ej(e,t){const n=mn(e);at.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var nj=50,X_=300;function rj(e,t){const[n,r]=at.useState(!1),[i,o]=at.useState(null),[a,s]=at.useState(!0),u=at.useRef(null),l=()=>clearTimeout(u.current);ej(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?nj:null);const c=at.useCallback(()=>{a&&e(),u.current=setTimeout(()=>{s(!1),r(!0),o("increment")},X_)},[e,a]),h=at.useCallback(()=>{a&&t(),u.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},X_)},[t,a]),_=at.useCallback(()=>{s(!0),r(!1),l()},[]);return at.useEffect(()=>()=>l(),[]),{up:c,down:h,stop:_,isSpinning:n}}var ij=/^[Ee0-9+\-.]$/;function oj(e){return ij.test(e)}function aj(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function sj(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:u,isRequired:l,isInvalid:c,pattern:h="[0-9]*(.[0-9]+)?",inputMode:_="decimal",allowMouseWheel:v,id:P,onChange:N,precision:M,name:z,"aria-describedby":I,"aria-label":W,"aria-labelledby":H,onFocus:it,onBlur:B,onInvalid:p,getAriaValueText:L,isValidCharacter:Z,format:K,parse:G,...et}=e,w=mn(it),g=mn(B),E=mn(p),U=mn(Z??oj),Q=mn(L),T=LU(e),{update:Y,increment:J,decrement:V}=T,[C,O]=at.useState(!1),lt=!(s||u),S=at.useRef(null),d=at.useRef(null),$=at.useRef(null),f=at.useRef(null),R=at.useCallback(y=>y.split("").filter(U).join(""),[U]),k=at.useCallback(y=>{var A;return(A=G==null?void 0:G(y))!=null?A:y},[G]),x=at.useCallback(y=>{var A;return((A=K==null?void 0:K(y))!=null?A:y).toString()},[K]);nf(()=>{(T.valueAsNumber>o||T.valueAsNumber{if(!S.current)return;if(S.current.value!=T.value){const A=k(S.current.value);T.setValue(R(A))}},[k,R]);const ot=at.useCallback((y=a)=>{lt&&J(y)},[J,lt,a]),_t=at.useCallback((y=a)=>{lt&&V(y)},[V,lt,a]),dt=rj(ot,_t);Z_($,"disabled",dt.stop,dt.isSpinning),Z_(f,"disabled",dt.stop,dt.isSpinning);const bt=at.useCallback(y=>{if(y.nativeEvent.isComposing)return;const D=k(y.currentTarget.value);Y(R(D)),d.current={start:y.currentTarget.selectionStart,end:y.currentTarget.selectionEnd}},[Y,R,k]),Ut=at.useCallback(y=>{var A,D,X;w==null||w(y),d.current&&(y.target.selectionStart=(D=d.current.start)!=null?D:(A=y.currentTarget.value)==null?void 0:A.length,y.currentTarget.selectionEnd=(X=d.current.end)!=null?X:y.currentTarget.selectionStart)},[w]),Pt=at.useCallback(y=>{if(y.nativeEvent.isComposing)return;aj(y,U)||y.preventDefault();const A=Ot(y)*a,D=y.key,tt={ArrowUp:()=>ot(A),ArrowDown:()=>_t(A),Home:()=>Y(i),End:()=>Y(o)}[D];tt&&(y.preventDefault(),tt(y))},[U,a,ot,_t,Y,i,o]),Ot=y=>{let A=1;return(y.metaKey||y.ctrlKey)&&(A=.1),y.shiftKey&&(A=10),A},yt=at.useMemo(()=>{const y=Q==null?void 0:Q(T.value);if(y!=null)return y;const A=T.value.toString();return A||void 0},[T.value,Q]),It=at.useCallback(()=>{let y=T.value;if(T.value==="")return;/^[eE]/.test(T.value.toString())?T.setValue(""):(T.valueAsNumbero&&(y=o),T.cast(y))},[T,o,i]),Ft=at.useCallback(()=>{O(!1),n&&It()},[n,O,It]),Lt=at.useCallback(()=>{t&&requestAnimationFrame(()=>{var y;(y=S.current)==null||y.focus()})},[t]),St=at.useCallback(y=>{y.preventDefault(),dt.up(),Lt()},[Lt,dt]),Ct=at.useCallback(y=>{y.preventDefault(),dt.down(),Lt()},[Lt,dt]);dd(()=>S.current,"wheel",y=>{var A,D;const tt=((D=(A=S.current)==null?void 0:A.ownerDocument)!=null?D:document).activeElement===S.current;if(!v||!tt)return;y.preventDefault();const q=Ot(y)*a,m=Math.sign(y.deltaY);m===-1?ot(q):m===1&&_t(q)},{passive:!1});const jt=at.useCallback((y={},A=null)=>{const D=u||r&&T.isAtMax;return{...y,ref:Fr(A,$),role:"button",tabIndex:-1,onPointerDown:hn(y.onPointerDown,X=>{X.button!==0||D||St(X)}),onPointerLeave:hn(y.onPointerLeave,dt.stop),onPointerUp:hn(y.onPointerUp,dt.stop),disabled:D,"aria-disabled":ph(D)}},[T.isAtMax,r,St,dt.stop,u]),j=at.useCallback((y={},A=null)=>{const D=u||r&&T.isAtMin;return{...y,ref:Fr(A,f),role:"button",tabIndex:-1,onPointerDown:hn(y.onPointerDown,X=>{X.button!==0||D||Ct(X)}),onPointerLeave:hn(y.onPointerLeave,dt.stop),onPointerUp:hn(y.onPointerUp,dt.stop),disabled:D,"aria-disabled":ph(D)}},[T.isAtMin,r,Ct,dt.stop,u]),F=at.useCallback((y={},A=null)=>{var D,X,tt,q;return{name:z,inputMode:_,type:"text",pattern:h,"aria-labelledby":H,"aria-label":W,"aria-describedby":I,id:P,disabled:u,...y,readOnly:(D=y.readOnly)!=null?D:s,"aria-readonly":(X=y.readOnly)!=null?X:s,"aria-required":(tt=y.required)!=null?tt:l,required:(q=y.required)!=null?q:l,ref:Fr(S,A),value:x(T.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(T.valueAsNumber)?void 0:T.valueAsNumber,"aria-invalid":ph(c??T.isOutOfRange),"aria-valuetext":yt,autoComplete:"off",autoCorrect:"off",onChange:hn(y.onChange,bt),onKeyDown:hn(y.onKeyDown,Pt),onFocus:hn(y.onFocus,Ut,()=>O(!0)),onBlur:hn(y.onBlur,g,Ft)}},[z,_,h,H,W,x,I,P,u,l,s,c,T.value,T.valueAsNumber,T.isOutOfRange,i,o,yt,bt,Pt,Ut,g,Ft]);return{value:x(T.value),valueAsNumber:T.valueAsNumber,isFocused:C,isDisabled:u,isReadOnly:s,getIncrementButtonProps:jt,getDecrementButtonProps:j,getInputProps:F,htmlProps:et}}var[lj,v0]=cr({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[cj,T3]=cr({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),O3=ce(function(t,n){const r=Uc("NumberInput",t),i=Hr(t),o=wU(i),{htmlProps:a,...s}=sj(o),u=at.useMemo(()=>s,[s]);return wt(cj,{value:u,children:wt(lj,{value:r,children:wt(ee.div,{...a,ref:n,className:Cn("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});O3.displayName="NumberInput";var AA=ce(function(t,n){const r=v0();return wt(ee.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});AA.displayName="NumberInputStepper";var R3=ce(function(t,n){const{getInputProps:r}=T3(),i=r(t,n),o=v0();return wt(ee.input,{...i,className:Cn("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});R3.displayName="NumberInputField";var xA=ee("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),LA=ce(function(t,n){var r;const i=v0(),{getDecrementButtonProps:o}=T3(),a=o(t,n);return wt(xA,{...a,__css:i.stepper,children:(r=t.children)!=null?r:wt(J$,{})})});LA.displayName="NumberDecrementStepper";var CA=ce(function(t,n){var r;const{getIncrementButtonProps:i}=T3(),o=i(t,n),a=v0();return wt(xA,{...o,__css:a.stepper,children:(r=t.children)!=null?r:wt(tj,{})})});CA.displayName="NumberIncrementStepper";var Ea=e=>e?"":void 0,Hh=e=>e?!0:void 0,Hc=(...e)=>e.filter(Boolean).join(" ");function Kh(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Bu(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var hd={width:0,height:0},ku=e=>e||hd;function uj(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=N=>{var M;const z=(M=r[N])!=null?M:hd;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Bu({orientation:t,vertical:{bottom:`calc(${n[N]}% - ${z.height/2}px)`},horizontal:{left:`calc(${n[N]}% - ${z.width/2}px)`}})}},a=t==="vertical"?r.reduce((N,M)=>ku(N).height>ku(M).height?N:M,hd):r.reduce((N,M)=>ku(N).width>ku(M).width?N:M,hd),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Bu({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},u={position:"absolute",...Bu({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},l=n.length===1,c=[0,i?100-n[0]:n[0]],h=l?c:n;let _=h[0];!l&&i&&(_=100-_);const v=Math.abs(h[h.length-1]-h[0]),P={...u,...Bu({orientation:t,vertical:i?{height:`${v}%`,top:`${_}%`}:{height:`${v}%`,bottom:`${_}%`},horizontal:i?{width:`${v}%`,right:`${_}%`}:{width:`${v}%`,left:`${_}%`}})};return{trackStyle:u,innerTrackStyle:P,rootStyle:s,getThumbStyle:o}}function dj(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function fj(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function hj(e){const t=gj(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function SA(e){return!!e.touches}function pj(e){return SA(e)&&e.touches.length>1}function gj(e){var t;return(t=e.view)!=null?t:window}function mj(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function yj(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function FA(e,t="page"){return SA(e)?mj(e,t):yj(e,t)}function vj(e){return t=>{const n=hj(t);(!n||n&&t.button===0)&&e(t)}}function _j(e,t=!1){function n(i){e(i,{point:FA(i)})}return t?vj(n):n}function pd(e,t,n,r){return fj(e,t,_j(n,t==="pointerdown"),r)}var bj=Object.defineProperty,wj=(e,t,n)=>t in e?bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zr=(e,t,n)=>(wj(e,typeof t!="symbol"?t+"":t,n),n),Aj=class{constructor(e,t,n){zr(this,"history",[]),zr(this,"startEvent",null),zr(this,"lastEvent",null),zr(this,"lastEventInfo",null),zr(this,"handlers",{}),zr(this,"removeListeners",()=>{}),zr(this,"threshold",3),zr(this,"win"),zr(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const s=Yh(this.lastEventInfo,this.history),u=this.startEvent!==null,l=Sj(s.offset,{x:0,y:0})>=this.threshold;if(!u&&!l)return;const{timestamp:c}=Cv();this.history.push({...s.point,timestamp:c});const{onStart:h,onMove:_}=this.handlers;u||(h==null||h(this.lastEvent,s),this.startEvent=this.lastEvent),_==null||_(this.lastEvent,s)}),zr(this,"onPointerMove",(s,u)=>{this.lastEvent=s,this.lastEventInfo=u,YT.update(this.updatePoint,!0)}),zr(this,"onPointerUp",(s,u)=>{const l=Yh(u,this.history),{onEnd:c,onSessionEnd:h}=this.handlers;h==null||h(s,l),this.end(),!(!c||!this.startEvent)&&(c==null||c(s,l))});var r;if(this.win=(r=e.view)!=null?r:window,pj(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const i={point:FA(e)},{timestamp:o}=Cv();this.history=[{...i.point,timestamp:o}];const{onSessionStart:a}=t;a==null||a(e,Yh(i,this.history)),this.removeListeners=Cj(pd(this.win,"pointermove",this.onPointerMove),pd(this.win,"pointerup",this.onPointerUp),pd(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),ZT.update(this.updatePoint)}};function J_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yh(e,t){return{point:e.point,delta:J_(e.point,t[t.length-1]),offset:J_(e.point,t[0]),velocity:Lj(t,.1)}}var xj=e=>e*1e3;function Lj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>xj(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Cj(...e){return t=>e.reduce((n,r)=>r(n),t)}function Zh(e,t){return Math.abs(e-t)}function t4(e){return"x"in e&&"y"in e}function Sj(e,t){if(typeof e=="number"&&typeof t=="number")return Zh(e,t);if(t4(e)&&t4(t)){const n=Zh(e.x,t.x),r=Zh(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function IA(e){const t=at.useRef(null);return t.current=e,t}function Fj(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,u=Boolean(n||r||i||o||a),l=at.useRef(null),c=IA({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(h,_){l.current=null,i==null||i(h,_)}});at.useEffect(()=>{var h;(h=l.current)==null||h.updateHandlers(c.current)}),at.useEffect(()=>{const h=e.current;if(!h||!u)return;function _(v){l.current=new Aj(v,c.current,s)}return pd(h,"pointerdown",_)},[e,u,c,s]),at.useEffect(()=>()=>{var h;(h=l.current)==null||h.end(),l.current=null},[])}function Ij(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Ej=Boolean(globalThis==null?void 0:globalThis.document)?at.useLayoutEffect:at.useEffect;function Bj(e,t){var n,r;if(!e||!e.parentElement)return;const i=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,o=new i.MutationObserver(()=>{t()});return o.observe(e.parentElement,{childList:!0}),()=>{o.disconnect()}}function kj({getNodes:e,observeMutation:t=!0}){const[n,r]=at.useState([]),[i,o]=at.useState(0);return Ej(()=>{const a=e(),s=a.map((u,l)=>Ij(u,c=>{r(h=>[...h.slice(0,l),c,...h.slice(l+1)])}));if(t){const u=a[0];s.push(Bj(u,()=>{o(l=>l+1)}))}return()=>{s.forEach(u=>{u==null||u()})}},[i]),n}function Pj(e){return typeof e=="object"&&e!==null&&"current"in e}function Mj(e){const[t]=kj({observeMutation:!1,getNodes(){return[Pj(e)?e.current:e]}});return t}function Tj(e){var t;const{min:n=0,max:r=100,onChange:i,value:o,defaultValue:a,isReversed:s,direction:u="ltr",orientation:l="horizontal",id:c,isDisabled:h,isReadOnly:_,onChangeStart:v,onChangeEnd:P,step:N=1,getAriaValueText:M,"aria-valuetext":z,"aria-label":I,"aria-labelledby":W,name:H,focusThumbOnChange:it=!0,...B}=e,p=mn(v),L=mn(P),Z=mn(M),K=dj({isReversed:s,direction:u,orientation:l}),[G,et]=cU({value:o,defaultValue:a??Rj(n,r),onChange:i}),[w,g]=at.useState(!1),[E,U]=at.useState(!1),Q=!(h||_),T=(r-n)/10,Y=N||(r-n)/100,J=ud(G,n,r),V=r-J+n,O=z_(K?V:J,n,r),lt=l==="vertical",S=IA({min:n,max:r,step:N,isDisabled:h,value:J,isInteractive:Q,isReversed:K,isVertical:lt,eventSource:null,focusThumbOnChange:it,orientation:l}),d=at.useRef(null),$=at.useRef(null),f=at.useRef(null),R=at.useId(),k=c??R,[x,ot]=[`slider-thumb-${k}`,`slider-track-${k}`],_t=at.useCallback(tt=>{var q,m;if(!d.current)return;const b=S.current;b.eventSource="pointer";const nt=d.current.getBoundingClientRect(),{clientX:ct,clientY:rt}=(m=(q=tt.touches)==null?void 0:q[0])!=null?m:tt,ft=lt?nt.bottom-rt:ct-nt.left,ut=lt?nt.height:nt.width;let gt=ft/ut;K&&(gt=1-gt);let mt=xU(gt,b.min,b.max);return b.step&&(mt=parseFloat(D_(mt,b.min,b.step))),mt=ud(mt,b.min,b.max),mt},[lt,K,S]),dt=at.useCallback(tt=>{const q=S.current;q.isInteractive&&(tt=parseFloat(D_(tt,q.min,Y)),tt=ud(tt,q.min,q.max),et(tt))},[Y,et,S]),bt=at.useMemo(()=>({stepUp(tt=Y){const q=K?J-tt:J+tt;dt(q)},stepDown(tt=Y){const q=K?J+tt:J-tt;dt(q)},reset(){dt(a||0)},stepTo(tt){dt(tt)}}),[dt,K,J,Y,a]),Ut=at.useCallback(tt=>{const q=S.current,b={ArrowRight:()=>bt.stepUp(),ArrowUp:()=>bt.stepUp(),ArrowLeft:()=>bt.stepDown(),ArrowDown:()=>bt.stepDown(),PageUp:()=>bt.stepUp(T),PageDown:()=>bt.stepDown(T),Home:()=>dt(q.min),End:()=>dt(q.max)}[tt.key];b&&(tt.preventDefault(),tt.stopPropagation(),b(tt),q.eventSource="keyboard")},[bt,dt,T,S]),Pt=(t=Z==null?void 0:Z(J))!=null?t:z,Ot=Mj($),{getThumbStyle:yt,rootStyle:It,trackStyle:Ft,innerTrackStyle:Lt}=at.useMemo(()=>{const tt=S.current,q=Ot??{width:0,height:0};return uj({isReversed:K,orientation:tt.orientation,thumbRects:[q],thumbPercents:[O]})},[K,Ot,O,S]),St=at.useCallback(()=>{S.current.focusThumbOnChange&&setTimeout(()=>{var q;return(q=$.current)==null?void 0:q.focus()})},[S]);nf(()=>{const tt=S.current;St(),tt.eventSource==="keyboard"&&(L==null||L(tt.value))},[J,L]);function Ct(tt){const q=_t(tt);q!=null&&q!==S.current.value&&et(q)}Fj(f,{onPanSessionStart(tt){const q=S.current;q.isInteractive&&(g(!0),St(),Ct(tt),p==null||p(q.value))},onPanSessionEnd(){const tt=S.current;tt.isInteractive&&(g(!1),L==null||L(tt.value))},onPan(tt){S.current.isInteractive&&Ct(tt)}});const jt=at.useCallback((tt={},q=null)=>({...tt,...B,ref:Fr(q,f),tabIndex:-1,"aria-disabled":Hh(h),"data-focused":Ea(E),style:{...tt.style,...It}}),[B,h,E,It]),j=at.useCallback((tt={},q=null)=>({...tt,ref:Fr(q,d),id:ot,"data-disabled":Ea(h),style:{...tt.style,...Ft}}),[h,ot,Ft]),F=at.useCallback((tt={},q=null)=>({...tt,ref:q,style:{...tt.style,...Lt}}),[Lt]),y=at.useCallback((tt={},q=null)=>({...tt,ref:Fr(q,$),role:"slider",tabIndex:Q?0:void 0,id:x,"data-active":Ea(w),"aria-valuetext":Pt,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":J,"aria-orientation":l,"aria-disabled":Hh(h),"aria-readonly":Hh(_),"aria-label":I,"aria-labelledby":I?void 0:W,style:{...tt.style,...yt(0)},onKeyDown:Kh(tt.onKeyDown,Ut),onFocus:Kh(tt.onFocus,()=>U(!0)),onBlur:Kh(tt.onBlur,()=>U(!1))}),[Q,x,w,Pt,n,r,J,l,h,_,I,W,yt,Ut]),A=at.useCallback((tt,q=null)=>{const m=!(tt.valuer),b=J>=tt.value,nt=z_(tt.value,n,r),ct={position:"absolute",pointerEvents:"none",...Oj({orientation:l,vertical:{bottom:K?`${100-nt}%`:`${nt}%`},horizontal:{left:K?`${100-nt}%`:`${nt}%`}})};return{...tt,ref:q,role:"presentation","aria-hidden":!0,"data-disabled":Ea(h),"data-invalid":Ea(!m),"data-highlighted":Ea(b),style:{...tt.style,...ct}}},[h,K,r,n,l,J]),D=at.useCallback((tt={},q=null)=>({...tt,ref:q,type:"hidden",value:J,name:H}),[H,J]);return{state:{value:J,isFocused:E,isDragging:w},actions:bt,getRootProps:jt,getTrackProps:j,getInnerTrackProps:F,getThumbProps:y,getMarkerProps:A,getInputProps:D}}function Oj(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Rj(e,t){return t"}),[Dj,b0]=cr({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),EA=ce((e,t)=>{var n;const r={...e,orientation:(n=e==null?void 0:e.orientation)!=null?n:"horizontal"},i=Uc("Slider",r),o=Hr(r),{direction:a}=q1();o.direction=a;const{getInputProps:s,getRootProps:u,...l}=Tj(o),c=u(),h=s({},t);return wt(zj,{value:l,children:wt(Dj,{value:i,children:ze(ee.div,{...c,className:Hc("chakra-slider",r.className),__css:i.container,children:[r.children,wt("input",{...h})]})})})});EA.displayName="Slider";var sg=ce((e,t)=>{const{getThumbProps:n}=_0(),r=b0(),i=n(e,t);return wt(ee.div,{...i,className:Hc("chakra-slider__thumb",e.className),__css:r.thumb})});sg.displayName="SliderThumb";var BA=ce((e,t)=>{const{getTrackProps:n}=_0(),r=b0(),i=n(e,t);return wt(ee.div,{...i,className:Hc("chakra-slider__track",e.className),__css:r.track})});BA.displayName="SliderTrack";var kA=ce((e,t)=>{const{getInnerTrackProps:n}=_0(),r=b0(),i=n(e,t);return wt(ee.div,{...i,className:Hc("chakra-slider__filled-track",e.className),__css:r.filledTrack})});kA.displayName="SliderFilledTrack";var Nj=ce((e,t)=>{const{getMarkerProps:n}=_0(),r=b0(),i=n(e,t);return wt(ee.div,{...i,className:Hc("chakra-slider__marker",e.className),__css:r.mark})});Nj.displayName="SliderMark";var Uj={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},pf=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},lg=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function $j(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:u,onClose:l,placement:c,id:h,isOpen:_,defaultIsOpen:v,arrowSize:P=10,arrowShadowColor:N,arrowPadding:M,modifiers:z,isDisabled:I,gutter:W,offset:H,direction:it,...B}=e,{isOpen:p,onOpen:L,onClose:Z}=X$({isOpen:_,defaultIsOpen:v,onOpen:u,onClose:l}),{referenceRef:K,getPopperProps:G,getArrowInnerProps:et,getArrowProps:w}=Y$({enabled:p,placement:c,arrowPadding:M,modifiers:z,gutter:W,offset:H,direction:it}),g=at.useId(),U=`tooltip-${h??g}`,Q=at.useRef(null),T=at.useRef(),Y=at.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=void 0)},[]),J=at.useRef(),V=at.useCallback(()=>{J.current&&(clearTimeout(J.current),J.current=void 0)},[]),C=at.useCallback(()=>{V(),Z()},[Z,V]),O=jj(Q,C),lt=at.useCallback(()=>{if(!I&&!T.current){O();const ot=lg(Q);T.current=ot.setTimeout(L,t)}},[O,I,L,t]),S=at.useCallback(()=>{Y();const ot=lg(Q);J.current=ot.setTimeout(C,n)},[n,C,Y]),d=at.useCallback(()=>{p&&r&&S()},[r,S,p]),$=at.useCallback(()=>{p&&a&&S()},[a,S,p]),f=at.useCallback(ot=>{p&&ot.key==="Escape"&&S()},[p,S]);dd(()=>pf(Q),"keydown",s?f:void 0),dd(()=>pf(Q),"scroll",()=>{p&&o&&C()}),at.useEffect(()=>{I&&(Y(),p&&Z())},[I,p,Z,Y]),at.useEffect(()=>()=>{Y(),V()},[Y,V]),dd(()=>Q.current,"pointerleave",S);const R=at.useCallback((ot={},_t=null)=>({...ot,ref:Fr(Q,_t,K),onPointerEnter:hn(ot.onPointerEnter,bt=>{bt.pointerType!=="touch"&<()}),onClick:hn(ot.onClick,d),onPointerDown:hn(ot.onPointerDown,$),onFocus:hn(ot.onFocus,lt),onBlur:hn(ot.onBlur,S),"aria-describedby":p?U:void 0}),[lt,S,$,p,U,d,K]),k=at.useCallback((ot={},_t=null)=>G({...ot,style:{...ot.style,[gn.arrowSize.var]:P?`${P}px`:void 0,[gn.arrowShadowColor.var]:N}},_t),[G,P,N]),x=at.useCallback((ot={},_t=null)=>{const dt={...ot.style,position:"relative",transformOrigin:gn.transformOrigin.varRef};return{ref:_t,...B,...ot,id:U,role:"tooltip",style:dt}},[B,U]);return{isOpen:p,show:lt,hide:S,getTriggerProps:R,getTooltipProps:x,getTooltipPositionerProps:k,getArrowProps:w,getArrowInnerProps:et}}var Xh="chakra-ui:close-tooltip";function jj(e,t){return at.useEffect(()=>{const n=pf(e);return n.addEventListener(Xh,t),()=>n.removeEventListener(Xh,t)},[t,e]),()=>{const n=pf(e),r=lg(e);n.dispatchEvent(new r.CustomEvent(Xh))}}function Vj(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qj(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Qj=ee(qw.div),PA=ce((e,t)=>{var n,r;const i=_a("Tooltip",e),o=Hr(e),a=q1(),{children:s,label:u,shouldWrapChildren:l,"aria-label":c,hasArrow:h,bg:_,portalProps:v,background:P,backgroundColor:N,bgColor:M,motionProps:z,...I}=o,W=(r=(n=P??N)!=null?n:_)!=null?r:M;if(W){i.bg=W;const G=vI(a,"colors",W);i[gn.arrowBg.var]=G}const H=$j({...I,direction:a.direction}),it=typeof s=="string"||l;let B;if(it)B=wt(ee.span,{display:"inline-block",tabIndex:0,...H.getTriggerProps(),children:s});else{const G=at.Children.only(s);B=at.cloneElement(G,H.getTriggerProps(G.props,G.ref))}const p=!!c,L=H.getTooltipProps({},t),Z=p?Vj(L,["role","id"]):L,K=qj(L,["role","id"]);return u?ze(Ep,{children:[B,wt(Ww,{children:H.isOpen&&wt(zc,{...v,children:wt(ee.div,{...H.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:ze(Qj,{variants:Uj,initial:"exit",animate:"enter",exit:"exit",...z,...Z,__css:i,children:[u,p&&wt(ee.span,{srOnly:!0,...K,children:c}),h&&wt(ee.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:wt(ee.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):wt(Ep,{children:s})});PA.displayName="Tooltip";var cg={},e4=tc;cg.createRoot=e4.createRoot,cg.hydrateRoot=e4.hydrateRoot;/** + * @module @zk-kit/incremental-merkle-tree + * @version 1.1.0 + * @file Incremental Merkle tree implementation in TypeScript. + * @copyright Cedoor 2023 + * @license MIT + * @see [Github]{@link https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/incremental-merkle-tree} +*/function $n(e,t){for(var n=[],r=2;r=r[0].length)throw new Error("The leaf does not exist in this tree");for(var a=[],s=[],u=e,l=0;l=Math.pow(n,t))throw new Error("The tree is full");for(var a=e,s=r[0].length,u=0;u=i[0].length)throw new Error("The leaf does not exist in this tree");for(var s=t,u=0;ue.maxDepth)throw new Error("The tree depth must be between 1 and 32");if(o.length>Math.pow(i,n))throw new Error("The tree cannot contain more than ".concat(Math.pow(i,n)," leaves"));this._hash=t,this._depth=n,this._zeroes=[],this._nodes=[],this._arity=i;for(var s=0;s0){this._nodes[0]=o;for(var s=0;s0?g:E},o.min=function(g,E){return g.cmp(E)<0?g:E},o.prototype._init=function(g,E,U){if(typeof g=="number")return this._initNumber(g,E,U);if(typeof g=="object")return this._initArray(g,E,U);E==="hex"&&(E=16),r(E===(E|0)&&E>=2&&E<=36),g=g.toString().replace(/\s+/g,"");var Q=0;g[0]==="-"&&(Q++,this.negative=1),Q=0;Q-=3)Y=g[Q]|g[Q-1]<<8|g[Q-2]<<16,this.words[T]|=Y<>>26-J&67108863,J+=24,J>=26&&(J-=26,T++);else if(U==="le")for(Q=0,T=0;Q>>26-J&67108863,J+=24,J>=26&&(J-=26,T++);return this._strip()};function s(w,g){var E=w.charCodeAt(g);if(E>=48&&E<=57)return E-48;if(E>=65&&E<=70)return E-55;if(E>=97&&E<=102)return E-87;r(!1,"Invalid character in "+w)}function u(w,g,E){var U=s(w,E);return E-1>=g&&(U|=s(w,E-1)<<4),U}o.prototype._parseHex=function(g,E,U){this.length=Math.ceil((g.length-E)/6),this.words=new Array(this.length);for(var Q=0;Q=E;Q-=2)J=u(g,E,Q)<=18?(T-=18,Y+=1,this.words[Y]|=J>>>26):T+=8;else{var V=g.length-E;for(Q=V%2===0?E+1:E;Q=18?(T-=18,Y+=1,this.words[Y]|=J>>>26):T+=8}this._strip()};function l(w,g,E,U){for(var Q=0,T=0,Y=Math.min(w.length,E),J=g;J=49?T=V-49+10:V>=17?T=V-17+10:T=V,r(V>=0&&T1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(g,E){g=g||10,E=E|0||1;var U;if(g===16||g==="hex"){U="";for(var Q=0,T=0,Y=0;Y>>24-Q&16777215,Q+=2,Q>=26&&(Q-=26,Y--),T!==0||Y!==this.length-1?U=_[6-V.length]+V+U:U=V+U}for(T!==0&&(U=T.toString(16)+U);U.length%E!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(g===(g|0)&&g>=2&&g<=36){var C=v[g],O=P[g];U="";var lt=this.clone();for(lt.negative=0;!lt.isZero();){var S=lt.modrn(O).toString(g);lt=lt.idivn(O),lt.isZero()?U=S+U:U=_[C-S.length]+S+U}for(this.isZero()&&(U="0"+U);U.length%E!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(g,E){return this.toArrayLike(a,g,E)}),o.prototype.toArray=function(g,E){return this.toArrayLike(Array,g,E)};var N=function(g,E){return g.allocUnsafe?g.allocUnsafe(E):new g(E)};o.prototype.toArrayLike=function(g,E,U){this._strip();var Q=this.byteLength(),T=U||Math.max(1,Q);r(Q<=T,"byte array longer than desired length"),r(T>0,"Requested array length <= 0");var Y=N(g,T),J=E==="le"?"LE":"BE";return this["_toArrayLike"+J](Y,Q),Y},o.prototype._toArrayLikeLE=function(g,E){for(var U=0,Q=0,T=0,Y=0;T>8&255),U>16&255),Y===6?(U>24&255),Q=0,Y=0):(Q=J>>>24,Y+=2)}if(U=0&&(g[U--]=J>>8&255),U>=0&&(g[U--]=J>>16&255),Y===6?(U>=0&&(g[U--]=J>>24&255),Q=0,Y=0):(Q=J>>>24,Y+=2)}if(U>=0)for(g[U--]=Q;U>=0;)g[U--]=0},Math.clz32?o.prototype._countBits=function(g){return 32-Math.clz32(g)}:o.prototype._countBits=function(g){var E=g,U=0;return E>=4096&&(U+=13,E>>>=13),E>=64&&(U+=7,E>>>=7),E>=8&&(U+=4,E>>>=4),E>=2&&(U+=2,E>>>=2),U+E},o.prototype._zeroBits=function(g){if(g===0)return 26;var E=g,U=0;return E&8191||(U+=13,E>>>=13),E&127||(U+=7,E>>>=7),E&15||(U+=4,E>>>=4),E&3||(U+=2,E>>>=2),E&1||U++,U},o.prototype.bitLength=function(){var g=this.words[this.length-1],E=this._countBits(g);return(this.length-1)*26+E};function M(w){for(var g=new Array(w.bitLength()),E=0;E>>Q&1}return g}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,E=0;Eg.length?this.clone().ior(g):g.clone().ior(this)},o.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},o.prototype.iuand=function(g){var E;this.length>g.length?E=g:E=this;for(var U=0;Ug.length?this.clone().iand(g):g.clone().iand(this)},o.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},o.prototype.iuxor=function(g){var E,U;this.length>g.length?(E=this,U=g):(E=g,U=this);for(var Q=0;Qg.length?this.clone().ixor(g):g.clone().ixor(this)},o.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},o.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var E=Math.ceil(g/26)|0,U=g%26;this._expand(E),U>0&&E--;for(var Q=0;Q0&&(this.words[Q]=~this.words[Q]&67108863>>26-U),this._strip()},o.prototype.notn=function(g){return this.clone().inotn(g)},o.prototype.setn=function(g,E){r(typeof g=="number"&&g>=0);var U=g/26|0,Q=g%26;return this._expand(U+1),E?this.words[U]=this.words[U]|1<g.length?(U=this,Q=g):(U=g,Q=this);for(var T=0,Y=0;Y>>26;for(;T!==0&&Y>>26;if(this.length=U.length,T!==0)this.words[this.length]=T,this.length++;else if(U!==this)for(;Yg.length?this.clone().iadd(g):g.clone().iadd(this)},o.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var E=this.iadd(g);return g.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var U=this.cmp(g);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,T;U>0?(Q=this,T=g):(Q=g,T=this);for(var Y=0,J=0;J>26,this.words[J]=E&67108863;for(;Y!==0&&J>26,this.words[J]=E&67108863;if(Y===0&&J>>26,lt=V&67108863,S=Math.min(C,g.length-1),d=Math.max(0,C-w.length+1);d<=S;d++){var $=C-d|0;Q=w.words[$]|0,T=g.words[d]|0,Y=Q*T+lt,O+=Y/67108864|0,lt=Y&67108863}E.words[C]=lt|0,V=O|0}return V!==0?E.words[C]=V|0:E.length--,E._strip()}var I=function(g,E,U){var Q=g.words,T=E.words,Y=U.words,J=0,V,C,O,lt=Q[0]|0,S=lt&8191,d=lt>>>13,$=Q[1]|0,f=$&8191,R=$>>>13,k=Q[2]|0,x=k&8191,ot=k>>>13,_t=Q[3]|0,dt=_t&8191,bt=_t>>>13,Ut=Q[4]|0,Pt=Ut&8191,Ot=Ut>>>13,yt=Q[5]|0,It=yt&8191,Ft=yt>>>13,Lt=Q[6]|0,St=Lt&8191,Ct=Lt>>>13,jt=Q[7]|0,j=jt&8191,F=jt>>>13,y=Q[8]|0,A=y&8191,D=y>>>13,X=Q[9]|0,tt=X&8191,q=X>>>13,m=T[0]|0,b=m&8191,nt=m>>>13,ct=T[1]|0,rt=ct&8191,ft=ct>>>13,ut=T[2]|0,gt=ut&8191,mt=ut>>>13,xt=T[3]|0,vt=xt&8191,Bt=xt>>>13,Vt=T[4]|0,zt=Vt&8191,Mt=Vt>>>13,Gt=T[5]|0,Nt=Gt&8191,Qt=Gt>>>13,Ht=T[6]|0,$t=Ht&8191,Dt=Ht>>>13,ne=T[7]|0,te=ne&8191,re=ne>>>13,Mr=T[8]|0,he=Mr&8191,pe=Mr>>>13,Tr=T[9]|0,ie=Tr&8191,ge=Tr>>>13;U.negative=g.negative^E.negative,U.length=19,V=Math.imul(S,b),C=Math.imul(S,nt),C=C+Math.imul(d,b)|0,O=Math.imul(d,nt);var hr=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(hr>>>26)|0,hr&=67108863,V=Math.imul(f,b),C=Math.imul(f,nt),C=C+Math.imul(R,b)|0,O=Math.imul(R,nt),V=V+Math.imul(S,rt)|0,C=C+Math.imul(S,ft)|0,C=C+Math.imul(d,rt)|0,O=O+Math.imul(d,ft)|0;var Sn=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,V=Math.imul(x,b),C=Math.imul(x,nt),C=C+Math.imul(ot,b)|0,O=Math.imul(ot,nt),V=V+Math.imul(f,rt)|0,C=C+Math.imul(f,ft)|0,C=C+Math.imul(R,rt)|0,O=O+Math.imul(R,ft)|0,V=V+Math.imul(S,gt)|0,C=C+Math.imul(S,mt)|0,C=C+Math.imul(d,gt)|0,O=O+Math.imul(d,mt)|0;var _n=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(_n>>>26)|0,_n&=67108863,V=Math.imul(dt,b),C=Math.imul(dt,nt),C=C+Math.imul(bt,b)|0,O=Math.imul(bt,nt),V=V+Math.imul(x,rt)|0,C=C+Math.imul(x,ft)|0,C=C+Math.imul(ot,rt)|0,O=O+Math.imul(ot,ft)|0,V=V+Math.imul(f,gt)|0,C=C+Math.imul(f,mt)|0,C=C+Math.imul(R,gt)|0,O=O+Math.imul(R,mt)|0,V=V+Math.imul(S,vt)|0,C=C+Math.imul(S,Bt)|0,C=C+Math.imul(d,vt)|0,O=O+Math.imul(d,Bt)|0;var Yn=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,V=Math.imul(Pt,b),C=Math.imul(Pt,nt),C=C+Math.imul(Ot,b)|0,O=Math.imul(Ot,nt),V=V+Math.imul(dt,rt)|0,C=C+Math.imul(dt,ft)|0,C=C+Math.imul(bt,rt)|0,O=O+Math.imul(bt,ft)|0,V=V+Math.imul(x,gt)|0,C=C+Math.imul(x,mt)|0,C=C+Math.imul(ot,gt)|0,O=O+Math.imul(ot,mt)|0,V=V+Math.imul(f,vt)|0,C=C+Math.imul(f,Bt)|0,C=C+Math.imul(R,vt)|0,O=O+Math.imul(R,Bt)|0,V=V+Math.imul(S,zt)|0,C=C+Math.imul(S,Mt)|0,C=C+Math.imul(d,zt)|0,O=O+Math.imul(d,Mt)|0;var Kr=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,V=Math.imul(It,b),C=Math.imul(It,nt),C=C+Math.imul(Ft,b)|0,O=Math.imul(Ft,nt),V=V+Math.imul(Pt,rt)|0,C=C+Math.imul(Pt,ft)|0,C=C+Math.imul(Ot,rt)|0,O=O+Math.imul(Ot,ft)|0,V=V+Math.imul(dt,gt)|0,C=C+Math.imul(dt,mt)|0,C=C+Math.imul(bt,gt)|0,O=O+Math.imul(bt,mt)|0,V=V+Math.imul(x,vt)|0,C=C+Math.imul(x,Bt)|0,C=C+Math.imul(ot,vt)|0,O=O+Math.imul(ot,Bt)|0,V=V+Math.imul(f,zt)|0,C=C+Math.imul(f,Mt)|0,C=C+Math.imul(R,zt)|0,O=O+Math.imul(R,Mt)|0,V=V+Math.imul(S,Nt)|0,C=C+Math.imul(S,Qt)|0,C=C+Math.imul(d,Nt)|0,O=O+Math.imul(d,Qt)|0;var To=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(To>>>26)|0,To&=67108863,V=Math.imul(St,b),C=Math.imul(St,nt),C=C+Math.imul(Ct,b)|0,O=Math.imul(Ct,nt),V=V+Math.imul(It,rt)|0,C=C+Math.imul(It,ft)|0,C=C+Math.imul(Ft,rt)|0,O=O+Math.imul(Ft,ft)|0,V=V+Math.imul(Pt,gt)|0,C=C+Math.imul(Pt,mt)|0,C=C+Math.imul(Ot,gt)|0,O=O+Math.imul(Ot,mt)|0,V=V+Math.imul(dt,vt)|0,C=C+Math.imul(dt,Bt)|0,C=C+Math.imul(bt,vt)|0,O=O+Math.imul(bt,Bt)|0,V=V+Math.imul(x,zt)|0,C=C+Math.imul(x,Mt)|0,C=C+Math.imul(ot,zt)|0,O=O+Math.imul(ot,Mt)|0,V=V+Math.imul(f,Nt)|0,C=C+Math.imul(f,Qt)|0,C=C+Math.imul(R,Nt)|0,O=O+Math.imul(R,Qt)|0,V=V+Math.imul(S,$t)|0,C=C+Math.imul(S,Dt)|0,C=C+Math.imul(d,$t)|0,O=O+Math.imul(d,Dt)|0;var Ns=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,V=Math.imul(j,b),C=Math.imul(j,nt),C=C+Math.imul(F,b)|0,O=Math.imul(F,nt),V=V+Math.imul(St,rt)|0,C=C+Math.imul(St,ft)|0,C=C+Math.imul(Ct,rt)|0,O=O+Math.imul(Ct,ft)|0,V=V+Math.imul(It,gt)|0,C=C+Math.imul(It,mt)|0,C=C+Math.imul(Ft,gt)|0,O=O+Math.imul(Ft,mt)|0,V=V+Math.imul(Pt,vt)|0,C=C+Math.imul(Pt,Bt)|0,C=C+Math.imul(Ot,vt)|0,O=O+Math.imul(Ot,Bt)|0,V=V+Math.imul(dt,zt)|0,C=C+Math.imul(dt,Mt)|0,C=C+Math.imul(bt,zt)|0,O=O+Math.imul(bt,Mt)|0,V=V+Math.imul(x,Nt)|0,C=C+Math.imul(x,Qt)|0,C=C+Math.imul(ot,Nt)|0,O=O+Math.imul(ot,Qt)|0,V=V+Math.imul(f,$t)|0,C=C+Math.imul(f,Dt)|0,C=C+Math.imul(R,$t)|0,O=O+Math.imul(R,Dt)|0,V=V+Math.imul(S,te)|0,C=C+Math.imul(S,re)|0,C=C+Math.imul(d,te)|0,O=O+Math.imul(d,re)|0;var Ki=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,V=Math.imul(A,b),C=Math.imul(A,nt),C=C+Math.imul(D,b)|0,O=Math.imul(D,nt),V=V+Math.imul(j,rt)|0,C=C+Math.imul(j,ft)|0,C=C+Math.imul(F,rt)|0,O=O+Math.imul(F,ft)|0,V=V+Math.imul(St,gt)|0,C=C+Math.imul(St,mt)|0,C=C+Math.imul(Ct,gt)|0,O=O+Math.imul(Ct,mt)|0,V=V+Math.imul(It,vt)|0,C=C+Math.imul(It,Bt)|0,C=C+Math.imul(Ft,vt)|0,O=O+Math.imul(Ft,Bt)|0,V=V+Math.imul(Pt,zt)|0,C=C+Math.imul(Pt,Mt)|0,C=C+Math.imul(Ot,zt)|0,O=O+Math.imul(Ot,Mt)|0,V=V+Math.imul(dt,Nt)|0,C=C+Math.imul(dt,Qt)|0,C=C+Math.imul(bt,Nt)|0,O=O+Math.imul(bt,Qt)|0,V=V+Math.imul(x,$t)|0,C=C+Math.imul(x,Dt)|0,C=C+Math.imul(ot,$t)|0,O=O+Math.imul(ot,Dt)|0,V=V+Math.imul(f,te)|0,C=C+Math.imul(f,re)|0,C=C+Math.imul(R,te)|0,O=O+Math.imul(R,re)|0,V=V+Math.imul(S,he)|0,C=C+Math.imul(S,pe)|0,C=C+Math.imul(d,he)|0,O=O+Math.imul(d,pe)|0;var Oo=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Oo>>>26)|0,Oo&=67108863,V=Math.imul(tt,b),C=Math.imul(tt,nt),C=C+Math.imul(q,b)|0,O=Math.imul(q,nt),V=V+Math.imul(A,rt)|0,C=C+Math.imul(A,ft)|0,C=C+Math.imul(D,rt)|0,O=O+Math.imul(D,ft)|0,V=V+Math.imul(j,gt)|0,C=C+Math.imul(j,mt)|0,C=C+Math.imul(F,gt)|0,O=O+Math.imul(F,mt)|0,V=V+Math.imul(St,vt)|0,C=C+Math.imul(St,Bt)|0,C=C+Math.imul(Ct,vt)|0,O=O+Math.imul(Ct,Bt)|0,V=V+Math.imul(It,zt)|0,C=C+Math.imul(It,Mt)|0,C=C+Math.imul(Ft,zt)|0,O=O+Math.imul(Ft,Mt)|0,V=V+Math.imul(Pt,Nt)|0,C=C+Math.imul(Pt,Qt)|0,C=C+Math.imul(Ot,Nt)|0,O=O+Math.imul(Ot,Qt)|0,V=V+Math.imul(dt,$t)|0,C=C+Math.imul(dt,Dt)|0,C=C+Math.imul(bt,$t)|0,O=O+Math.imul(bt,Dt)|0,V=V+Math.imul(x,te)|0,C=C+Math.imul(x,re)|0,C=C+Math.imul(ot,te)|0,O=O+Math.imul(ot,re)|0,V=V+Math.imul(f,he)|0,C=C+Math.imul(f,pe)|0,C=C+Math.imul(R,he)|0,O=O+Math.imul(R,pe)|0,V=V+Math.imul(S,ie)|0,C=C+Math.imul(S,ge)|0,C=C+Math.imul(d,ie)|0,O=O+Math.imul(d,ge)|0;var Us=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Us>>>26)|0,Us&=67108863,V=Math.imul(tt,rt),C=Math.imul(tt,ft),C=C+Math.imul(q,rt)|0,O=Math.imul(q,ft),V=V+Math.imul(A,gt)|0,C=C+Math.imul(A,mt)|0,C=C+Math.imul(D,gt)|0,O=O+Math.imul(D,mt)|0,V=V+Math.imul(j,vt)|0,C=C+Math.imul(j,Bt)|0,C=C+Math.imul(F,vt)|0,O=O+Math.imul(F,Bt)|0,V=V+Math.imul(St,zt)|0,C=C+Math.imul(St,Mt)|0,C=C+Math.imul(Ct,zt)|0,O=O+Math.imul(Ct,Mt)|0,V=V+Math.imul(It,Nt)|0,C=C+Math.imul(It,Qt)|0,C=C+Math.imul(Ft,Nt)|0,O=O+Math.imul(Ft,Qt)|0,V=V+Math.imul(Pt,$t)|0,C=C+Math.imul(Pt,Dt)|0,C=C+Math.imul(Ot,$t)|0,O=O+Math.imul(Ot,Dt)|0,V=V+Math.imul(dt,te)|0,C=C+Math.imul(dt,re)|0,C=C+Math.imul(bt,te)|0,O=O+Math.imul(bt,re)|0,V=V+Math.imul(x,he)|0,C=C+Math.imul(x,pe)|0,C=C+Math.imul(ot,he)|0,O=O+Math.imul(ot,pe)|0,V=V+Math.imul(f,ie)|0,C=C+Math.imul(f,ge)|0,C=C+Math.imul(R,ie)|0,O=O+Math.imul(R,ge)|0;var Yi=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,V=Math.imul(tt,gt),C=Math.imul(tt,mt),C=C+Math.imul(q,gt)|0,O=Math.imul(q,mt),V=V+Math.imul(A,vt)|0,C=C+Math.imul(A,Bt)|0,C=C+Math.imul(D,vt)|0,O=O+Math.imul(D,Bt)|0,V=V+Math.imul(j,zt)|0,C=C+Math.imul(j,Mt)|0,C=C+Math.imul(F,zt)|0,O=O+Math.imul(F,Mt)|0,V=V+Math.imul(St,Nt)|0,C=C+Math.imul(St,Qt)|0,C=C+Math.imul(Ct,Nt)|0,O=O+Math.imul(Ct,Qt)|0,V=V+Math.imul(It,$t)|0,C=C+Math.imul(It,Dt)|0,C=C+Math.imul(Ft,$t)|0,O=O+Math.imul(Ft,Dt)|0,V=V+Math.imul(Pt,te)|0,C=C+Math.imul(Pt,re)|0,C=C+Math.imul(Ot,te)|0,O=O+Math.imul(Ot,re)|0,V=V+Math.imul(dt,he)|0,C=C+Math.imul(dt,pe)|0,C=C+Math.imul(bt,he)|0,O=O+Math.imul(bt,pe)|0,V=V+Math.imul(x,ie)|0,C=C+Math.imul(x,ge)|0,C=C+Math.imul(ot,ie)|0,O=O+Math.imul(ot,ge)|0;var xa=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(xa>>>26)|0,xa&=67108863,V=Math.imul(tt,vt),C=Math.imul(tt,Bt),C=C+Math.imul(q,vt)|0,O=Math.imul(q,Bt),V=V+Math.imul(A,zt)|0,C=C+Math.imul(A,Mt)|0,C=C+Math.imul(D,zt)|0,O=O+Math.imul(D,Mt)|0,V=V+Math.imul(j,Nt)|0,C=C+Math.imul(j,Qt)|0,C=C+Math.imul(F,Nt)|0,O=O+Math.imul(F,Qt)|0,V=V+Math.imul(St,$t)|0,C=C+Math.imul(St,Dt)|0,C=C+Math.imul(Ct,$t)|0,O=O+Math.imul(Ct,Dt)|0,V=V+Math.imul(It,te)|0,C=C+Math.imul(It,re)|0,C=C+Math.imul(Ft,te)|0,O=O+Math.imul(Ft,re)|0,V=V+Math.imul(Pt,he)|0,C=C+Math.imul(Pt,pe)|0,C=C+Math.imul(Ot,he)|0,O=O+Math.imul(Ot,pe)|0,V=V+Math.imul(dt,ie)|0,C=C+Math.imul(dt,ge)|0,C=C+Math.imul(bt,ie)|0,O=O+Math.imul(bt,ge)|0;var $s=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+($s>>>26)|0,$s&=67108863,V=Math.imul(tt,zt),C=Math.imul(tt,Mt),C=C+Math.imul(q,zt)|0,O=Math.imul(q,Mt),V=V+Math.imul(A,Nt)|0,C=C+Math.imul(A,Qt)|0,C=C+Math.imul(D,Nt)|0,O=O+Math.imul(D,Qt)|0,V=V+Math.imul(j,$t)|0,C=C+Math.imul(j,Dt)|0,C=C+Math.imul(F,$t)|0,O=O+Math.imul(F,Dt)|0,V=V+Math.imul(St,te)|0,C=C+Math.imul(St,re)|0,C=C+Math.imul(Ct,te)|0,O=O+Math.imul(Ct,re)|0,V=V+Math.imul(It,he)|0,C=C+Math.imul(It,pe)|0,C=C+Math.imul(Ft,he)|0,O=O+Math.imul(Ft,pe)|0,V=V+Math.imul(Pt,ie)|0,C=C+Math.imul(Pt,ge)|0,C=C+Math.imul(Ot,ie)|0,O=O+Math.imul(Ot,ge)|0;var js=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(js>>>26)|0,js&=67108863,V=Math.imul(tt,Nt),C=Math.imul(tt,Qt),C=C+Math.imul(q,Nt)|0,O=Math.imul(q,Qt),V=V+Math.imul(A,$t)|0,C=C+Math.imul(A,Dt)|0,C=C+Math.imul(D,$t)|0,O=O+Math.imul(D,Dt)|0,V=V+Math.imul(j,te)|0,C=C+Math.imul(j,re)|0,C=C+Math.imul(F,te)|0,O=O+Math.imul(F,re)|0,V=V+Math.imul(St,he)|0,C=C+Math.imul(St,pe)|0,C=C+Math.imul(Ct,he)|0,O=O+Math.imul(Ct,pe)|0,V=V+Math.imul(It,ie)|0,C=C+Math.imul(It,ge)|0,C=C+Math.imul(Ft,ie)|0,O=O+Math.imul(Ft,ge)|0;var Vs=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Vs>>>26)|0,Vs&=67108863,V=Math.imul(tt,$t),C=Math.imul(tt,Dt),C=C+Math.imul(q,$t)|0,O=Math.imul(q,Dt),V=V+Math.imul(A,te)|0,C=C+Math.imul(A,re)|0,C=C+Math.imul(D,te)|0,O=O+Math.imul(D,re)|0,V=V+Math.imul(j,he)|0,C=C+Math.imul(j,pe)|0,C=C+Math.imul(F,he)|0,O=O+Math.imul(F,pe)|0,V=V+Math.imul(St,ie)|0,C=C+Math.imul(St,ge)|0,C=C+Math.imul(Ct,ie)|0,O=O+Math.imul(Ct,ge)|0;var La=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(La>>>26)|0,La&=67108863,V=Math.imul(tt,te),C=Math.imul(tt,re),C=C+Math.imul(q,te)|0,O=Math.imul(q,re),V=V+Math.imul(A,he)|0,C=C+Math.imul(A,pe)|0,C=C+Math.imul(D,he)|0,O=O+Math.imul(D,pe)|0,V=V+Math.imul(j,ie)|0,C=C+Math.imul(j,ge)|0,C=C+Math.imul(F,ie)|0,O=O+Math.imul(F,ge)|0;var qs=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(qs>>>26)|0,qs&=67108863,V=Math.imul(tt,he),C=Math.imul(tt,pe),C=C+Math.imul(q,he)|0,O=Math.imul(q,pe),V=V+Math.imul(A,ie)|0,C=C+Math.imul(A,ge)|0,C=C+Math.imul(D,ie)|0,O=O+Math.imul(D,ge)|0;var Qs=(J+V|0)+((C&8191)<<13)|0;J=(O+(C>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,V=Math.imul(tt,ie),C=Math.imul(tt,ge),C=C+Math.imul(q,ie)|0,O=Math.imul(q,ge);var Ws=(J+V|0)+((C&8191)<<13)|0;return J=(O+(C>>>13)|0)+(Ws>>>26)|0,Ws&=67108863,Y[0]=hr,Y[1]=Sn,Y[2]=_n,Y[3]=Yn,Y[4]=Kr,Y[5]=To,Y[6]=Ns,Y[7]=Ki,Y[8]=Oo,Y[9]=Us,Y[10]=Yi,Y[11]=xa,Y[12]=$s,Y[13]=js,Y[14]=Vs,Y[15]=La,Y[16]=qs,Y[17]=Qs,Y[18]=Ws,J!==0&&(Y[19]=J,U.length++),U};Math.imul||(I=z);function W(w,g,E){E.negative=g.negative^w.negative,E.length=w.length+g.length;for(var U=0,Q=0,T=0;T>>26)|0,Q+=Y>>>26,Y&=67108863}E.words[T]=J,U=Y,Y=Q}return U!==0?E.words[T]=U:E.length--,E._strip()}function H(w,g,E){return W(w,g,E)}o.prototype.mulTo=function(g,E){var U,Q=this.length+g.length;return this.length===10&&g.length===10?U=I(this,g,E):Q<63?U=z(this,g,E):Q<1024?U=W(this,g,E):U=H(this,g,E),U},o.prototype.mul=function(g){var E=new o(null);return E.words=new Array(this.length+g.length),this.mulTo(g,E)},o.prototype.mulf=function(g){var E=new o(null);return E.words=new Array(this.length+g.length),H(this,g,E)},o.prototype.imul=function(g){return this.clone().mulTo(g,this)},o.prototype.imuln=function(g){var E=g<0;E&&(g=-g),r(typeof g=="number"),r(g<67108864);for(var U=0,Q=0;Q>=26,U+=T/67108864|0,U+=Y>>>26,this.words[Q]=Y&67108863}return U!==0&&(this.words[Q]=U,this.length++),E?this.ineg():this},o.prototype.muln=function(g){return this.clone().imuln(g)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(g){var E=M(g);if(E.length===0)return new o(1);for(var U=this,Q=0;Q=0);var E=g%26,U=(g-E)/26,Q=67108863>>>26-E<<26-E,T;if(E!==0){var Y=0;for(T=0;T>>26-E}Y&&(this.words[T]=Y,this.length++)}if(U!==0){for(T=this.length-1;T>=0;T--)this.words[T+U]=this.words[T];for(T=0;T=0);var Q;E?Q=(E-E%26)/26:Q=0;var T=g%26,Y=Math.min((g-T)/26,this.length),J=67108863^67108863>>>T<Y)for(this.length-=Y,C=0;C=0&&(O!==0||C>=Q);C--){var lt=this.words[C]|0;this.words[C]=O<<26-T|lt>>>T,O=lt&J}return V&&O!==0&&(V.words[V.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(g,E,U){return r(this.negative===0),this.iushrn(g,E,U)},o.prototype.shln=function(g){return this.clone().ishln(g)},o.prototype.ushln=function(g){return this.clone().iushln(g)},o.prototype.shrn=function(g){return this.clone().ishrn(g)},o.prototype.ushrn=function(g){return this.clone().iushrn(g)},o.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var E=g%26,U=(g-E)/26,Q=1<=0);var E=g%26,U=(g-E)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(E!==0&&U++,this.length=Math.min(U,this.length),E!==0){var Q=67108863^67108863>>>E<=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},o.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E>26)-(V/67108864|0),this.words[T+U]=Y&67108863}for(;T>26,this.words[T+U]=Y&67108863;if(J===0)return this._strip();for(r(J===-1),J=0,T=0;T>26,this.words[T]=Y&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(g,E){var U=this.length-g.length,Q=this.clone(),T=g,Y=T.words[T.length-1]|0,J=this._countBits(Y);U=26-J,U!==0&&(T=T.ushln(U),Q.iushln(U),Y=T.words[T.length-1]|0);var V=Q.length-T.length,C;if(E!=="mod"){C=new o(null),C.length=V+1,C.words=new Array(C.length);for(var O=0;O=0;S--){var d=(Q.words[T.length+S]|0)*67108864+(Q.words[T.length+S-1]|0);for(d=Math.min(d/Y|0,67108863),Q._ishlnsubmul(T,d,S);Q.negative!==0;)d--,Q.negative=0,Q._ishlnsubmul(T,1,S),Q.isZero()||(Q.negative^=1);C&&(C.words[S]=d)}return C&&C._strip(),Q._strip(),E!=="div"&&U!==0&&Q.iushrn(U),{div:C||null,mod:Q}},o.prototype.divmod=function(g,E,U){if(r(!g.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var Q,T,Y;return this.negative!==0&&g.negative===0?(Y=this.neg().divmod(g,E),E!=="mod"&&(Q=Y.div.neg()),E!=="div"&&(T=Y.mod.neg(),U&&T.negative!==0&&T.iadd(g)),{div:Q,mod:T}):this.negative===0&&g.negative!==0?(Y=this.divmod(g.neg(),E),E!=="mod"&&(Q=Y.div.neg()),{div:Q,mod:Y.mod}):this.negative&g.negative?(Y=this.neg().divmod(g.neg(),E),E!=="div"&&(T=Y.mod.neg(),U&&T.negative!==0&&T.isub(g)),{div:Y.div,mod:T}):g.length>this.length||this.cmp(g)<0?{div:new o(0),mod:this}:g.length===1?E==="div"?{div:this.divn(g.words[0]),mod:null}:E==="mod"?{div:null,mod:new o(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new o(this.modrn(g.words[0]))}:this._wordDiv(g,E)},o.prototype.div=function(g){return this.divmod(g,"div",!1).div},o.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},o.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},o.prototype.divRound=function(g){var E=this.divmod(g);if(E.mod.isZero())return E.div;var U=E.div.negative!==0?E.mod.isub(g):E.mod,Q=g.ushrn(1),T=g.andln(1),Y=U.cmp(Q);return Y<0||T===1&&Y===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},o.prototype.modrn=function(g){var E=g<0;E&&(g=-g),r(g<=67108863);for(var U=(1<<26)%g,Q=0,T=this.length-1;T>=0;T--)Q=(U*Q+(this.words[T]|0))%g;return E?-Q:Q},o.prototype.modn=function(g){return this.modrn(g)},o.prototype.idivn=function(g){var E=g<0;E&&(g=-g),r(g<=67108863);for(var U=0,Q=this.length-1;Q>=0;Q--){var T=(this.words[Q]|0)+U*67108864;this.words[Q]=T/g|0,U=T%g}return this._strip(),E?this.ineg():this},o.prototype.divn=function(g){return this.clone().idivn(g)},o.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var E=this,U=g.clone();E.negative!==0?E=E.umod(g):E=E.clone();for(var Q=new o(1),T=new o(0),Y=new o(0),J=new o(1),V=0;E.isEven()&&U.isEven();)E.iushrn(1),U.iushrn(1),++V;for(var C=U.clone(),O=E.clone();!E.isZero();){for(var lt=0,S=1;!(E.words[0]&S)&<<26;++lt,S<<=1);if(lt>0)for(E.iushrn(lt);lt-- >0;)(Q.isOdd()||T.isOdd())&&(Q.iadd(C),T.isub(O)),Q.iushrn(1),T.iushrn(1);for(var d=0,$=1;!(U.words[0]&$)&&d<26;++d,$<<=1);if(d>0)for(U.iushrn(d);d-- >0;)(Y.isOdd()||J.isOdd())&&(Y.iadd(C),J.isub(O)),Y.iushrn(1),J.iushrn(1);E.cmp(U)>=0?(E.isub(U),Q.isub(Y),T.isub(J)):(U.isub(E),Y.isub(Q),J.isub(T))}return{a:Y,b:J,gcd:U.iushln(V)}},o.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var E=this,U=g.clone();E.negative!==0?E=E.umod(g):E=E.clone();for(var Q=new o(1),T=new o(0),Y=U.clone();E.cmpn(1)>0&&U.cmpn(1)>0;){for(var J=0,V=1;!(E.words[0]&V)&&J<26;++J,V<<=1);if(J>0)for(E.iushrn(J);J-- >0;)Q.isOdd()&&Q.iadd(Y),Q.iushrn(1);for(var C=0,O=1;!(U.words[0]&O)&&C<26;++C,O<<=1);if(C>0)for(U.iushrn(C);C-- >0;)T.isOdd()&&T.iadd(Y),T.iushrn(1);E.cmp(U)>=0?(E.isub(U),Q.isub(T)):(U.isub(E),T.isub(Q))}var lt;return E.cmpn(1)===0?lt=Q:lt=T,lt.cmpn(0)<0&<.iadd(g),lt},o.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var E=this.clone(),U=g.clone();E.negative=0,U.negative=0;for(var Q=0;E.isEven()&&U.isEven();Q++)E.iushrn(1),U.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;U.isEven();)U.iushrn(1);var T=E.cmp(U);if(T<0){var Y=E;E=U,U=Y}else if(T===0||U.cmpn(1)===0)break;E.isub(U)}while(!0);return U.iushln(Q)},o.prototype.invm=function(g){return this.egcd(g).a.umod(g)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(g){return this.words[0]&g},o.prototype.bincn=function(g){r(typeof g=="number");var E=g%26,U=(g-E)/26,Q=1<>>26,J&=67108863,this.words[Y]=J}return T!==0&&(this.words[Y]=T,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(g){var E=g<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this._strip();var U;if(this.length>1)U=1;else{E&&(g=-g),r(g<=67108863,"Number is too big");var Q=this.words[0]|0;U=Q===g?0:Qg.length)return 1;if(this.length=0;U--){var Q=this.words[U]|0,T=g.words[U]|0;if(Q!==T){QT&&(E=1);break}}return E},o.prototype.gtn=function(g){return this.cmpn(g)===1},o.prototype.gt=function(g){return this.cmp(g)===1},o.prototype.gten=function(g){return this.cmpn(g)>=0},o.prototype.gte=function(g){return this.cmp(g)>=0},o.prototype.ltn=function(g){return this.cmpn(g)===-1},o.prototype.lt=function(g){return this.cmp(g)===-1},o.prototype.lten=function(g){return this.cmpn(g)<=0},o.prototype.lte=function(g){return this.cmp(g)<=0},o.prototype.eqn=function(g){return this.cmpn(g)===0},o.prototype.eq=function(g){return this.cmp(g)===0},o.red=function(g){return new G(g)},o.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(g){return this.red=g,this},o.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},o.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},o.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},o.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},o.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},o.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},o.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},o.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var it={k256:null,p224:null,p192:null,p25519:null};function B(w,g){this.name=w,this.p=new o(g,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var g=new o(null);return g.words=new Array(Math.ceil(this.n/13)),g},B.prototype.ireduce=function(g){var E=g,U;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),U=E.bitLength();while(U>this.n);var Q=U0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},B.prototype.split=function(g,E){g.iushrn(this.n,0,E)},B.prototype.imulK=function(g){return g.imul(this.k)};function p(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(p,B),p.prototype.split=function(g,E){for(var U=4194303,Q=Math.min(g.length,9),T=0;T>>22,Y=J}Y>>>=22,g.words[T-10]=Y,Y===0&&g.length>10?g.length-=10:g.length-=9},p.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var E=0,U=0;U>>=26,g.words[U]=T,E=Q}return E!==0&&(g.words[g.length++]=E),g},o._prime=function(g){if(it[g])return it[g];var E;if(g==="k256")E=new p;else if(g==="p224")E=new L;else if(g==="p192")E=new Z;else if(g==="p25519")E=new K;else throw new Error("Unknown prime "+g);return it[g]=E,E};function G(w){if(typeof w=="string"){var g=o._prime(w);this.m=g.p,this.prime=g}else r(w.gtn(1),"modulus must be greater than 1"),this.m=w,this.prime=null}G.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},G.prototype._verify2=function(g,E){r((g.negative|E.negative)===0,"red works only with positives"),r(g.red&&g.red===E.red,"red works only with red numbers")},G.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(c(g,g.umod(this.m)._forceRed(this)),g)},G.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},G.prototype.add=function(g,E){this._verify2(g,E);var U=g.add(E);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},G.prototype.iadd=function(g,E){this._verify2(g,E);var U=g.iadd(E);return U.cmp(this.m)>=0&&U.isub(this.m),U},G.prototype.sub=function(g,E){this._verify2(g,E);var U=g.sub(E);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},G.prototype.isub=function(g,E){this._verify2(g,E);var U=g.isub(E);return U.cmpn(0)<0&&U.iadd(this.m),U},G.prototype.shl=function(g,E){return this._verify1(g),this.imod(g.ushln(E))},G.prototype.imul=function(g,E){return this._verify2(g,E),this.imod(g.imul(E))},G.prototype.mul=function(g,E){return this._verify2(g,E),this.imod(g.mul(E))},G.prototype.isqr=function(g){return this.imul(g,g.clone())},G.prototype.sqr=function(g){return this.mul(g,g)},G.prototype.sqrt=function(g){if(g.isZero())return g.clone();var E=this.m.andln(3);if(r(E%2===1),E===3){var U=this.m.add(new o(1)).iushrn(2);return this.pow(g,U)}for(var Q=this.m.subn(1),T=0;!Q.isZero()&&Q.andln(1)===0;)T++,Q.iushrn(1);r(!Q.isZero());var Y=new o(1).toRed(this),J=Y.redNeg(),V=this.m.subn(1).iushrn(1),C=this.m.bitLength();for(C=new o(2*C*C).toRed(this);this.pow(C,V).cmp(J)!==0;)C.redIAdd(J);for(var O=this.pow(C,Q),lt=this.pow(g,Q.addn(1).iushrn(1)),S=this.pow(g,Q),d=T;S.cmp(Y)!==0;){for(var $=S,f=0;$.cmp(Y)!==0;f++)$=$.redSqr();r(f=0;T--){for(var O=E.words[T],lt=C-1;lt>=0;lt--){var S=O>>lt&1;if(Y!==Q[0]&&(Y=this.sqr(Y)),S===0&&J===0){V=0;continue}J<<=1,J|=S,V++,!(V!==U&&(T!==0||lt!==0))&&(Y=this.mul(Y,Q[J]),V=0,J=0)}C=26}return Y},G.prototype.convertTo=function(g){var E=g.umod(this.m);return E===g?E.clone():E},G.prototype.convertFrom=function(g){var E=g.clone();return E.red=null,E},o.mont=function(g){return new et(g)};function et(w){G.call(this,w),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(et,G),et.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},et.prototype.convertFrom=function(g){var E=this.imod(g.mul(this.rinv));return E.red=null,E},et.prototype.imul=function(g,E){if(g.isZero()||E.isZero())return g.words[0]=0,g.length=1,g;var U=g.imul(E),Q=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=U.isub(Q).iushrn(this.shift),Y=T;return T.cmp(this.m)>=0?Y=T.isub(this.m):T.cmpn(0)<0&&(Y=T.iadd(this.m)),Y._forceRed(this)},et.prototype.mul=function(g,E){if(g.isZero()||E.isZero())return new o(0)._forceRed(this);var U=g.mul(E),Q=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=U.isub(Q).iushrn(this.shift),Y=T;return T.cmp(this.m)>=0?Y=T.isub(this.m):T.cmpn(0)<0&&(Y=T.iadd(this.m)),Y._forceRed(this)},et.prototype.invm=function(g){var E=this.imod(g._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(e,ci)})(Zj);const Jj=ug,tV="logger/5.7.0";let r4=!1,i4=!1;const gd={debug:1,default:2,info:2,warning:3,error:4,off:5};let o4=gd.default,Jh=null;function eV(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{e.push(t)}}),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}const a4=eV();var dg;(function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"})(dg||(dg={}));var Ur;(function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"})(Ur||(Ur={}));const s4="0123456789abcdef";class we{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,n){const r=t.toLowerCase();gd[r]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(o4>gd[r])&&console.log.apply(console,n)}debug(...t){this._log(we.levels.DEBUG,t)}info(...t){this._log(we.levels.INFO,t)}warn(...t){this._log(we.levels.WARNING,t)}makeError(t,n,r){if(i4)return this.makeError("censored error",n,{});n||(n=we.errors.UNKNOWN_ERROR),r||(r={});const i=[];Object.keys(r).forEach(u=>{const l=r[u];try{if(l instanceof Uint8Array){let c="";for(let h=0;h>4],c+=s4[l[h]&15];i.push(u+"=Uint8Array(0x"+c+")")}else i.push(u+"="+JSON.stringify(l))}catch{i.push(u+"="+JSON.stringify(r[u].toString()))}}),i.push(`code=${n}`),i.push(`version=${this.version}`);const o=t;let a="";switch(n){case Ur.NUMERIC_FAULT:{a="NUMERIC_FAULT";const u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":a+="-"+u;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case Ur.CALL_EXCEPTION:case Ur.INSUFFICIENT_FUNDS:case Ur.MISSING_NEW:case Ur.NONCE_EXPIRED:case Ur.REPLACEMENT_UNDERPRICED:case Ur.TRANSACTION_REPLACED:case Ur.UNPREDICTABLE_GAS_LIMIT:a=n;break}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=n,Object.keys(r).forEach(function(u){s[u]=r[u]}),s}throwError(t,n,r){throw this.makeError(t,n,r)}throwArgumentError(t,n,r){return this.throwError(t,we.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(t,n,r,i){t||this.throwError(n,r,i)}assertArgument(t,n,r,i){t||this.throwArgumentError(n,r,i)}checkNormalize(t){a4&&this.throwError("platform missing String.prototype.normalize",we.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:a4})}checkSafeUint53(t,n){typeof t=="number"&&(n==null&&(n="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(n,we.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,we.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,n,r){r?r=": "+r:r="",tn&&this.throwError("too many arguments"+r,we.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}checkNew(t,n){(t===Object||t==null)&&this.throwError("missing new",we.errors.MISSING_NEW,{name:n.name})}checkAbstract(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",we.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",we.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return Jh||(Jh=new we(tV)),Jh}static setCensorship(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",we.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r4){if(!t)return;this.globalLogger().throwError("error censorship permanent",we.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i4=!!t,r4=!!n}static setLogLevel(t){const n=gd[t.toLowerCase()];if(n==null){we.globalLogger().warn("invalid log level - "+t);return}o4=n}static from(t){return new we(t)}}we.errors=Ur;we.levels=dg;const nV="bytes/5.7.0",sa=new we(nV);function MA(e){return!!e.toHexString}function Gl(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return Gl(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function l4(e){return typeof e=="number"&&e==e&&e%1===0}function z3(e){if(e==null)return!1;if(e.constructor===Uint8Array)return!0;if(typeof e=="string"||!l4(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function D3(e,t){if(t||(t={}),typeof e=="number"){sa.checkSafeUint53(e,"invalid arrayify value");const n=[];for(;e;)n.unshift(e&255),e=parseInt(String(e/256));return n.length===0&&n.push(0),Gl(new Uint8Array(n))}if(t.allowMissingPrefix&&typeof e=="string"&&e.substring(0,2)!=="0x"&&(e="0x"+e),MA(e)&&(e=e.toHexString()),mf(e)){let n=e.substring(2);n.length%2&&(t.hexPad==="left"?n="0"+n:t.hexPad==="right"?n+="0":sa.throwArgumentError("hex data is odd-length","value",e));const r=[];for(let i=0;it&&sa.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),Gl(n)}function mf(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const tp="0123456789abcdef";function rV(e,t){if(t||(t={}),typeof e=="number"){sa.checkSafeUint53(e,"invalid hexlify value");let n="";for(;e;)n=tp[e&15]+n,e=Math.floor(e/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"0x00"}if(typeof e=="bigint")return e=e.toString(16),e.length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&typeof e=="string"&&e.substring(0,2)!=="0x"&&(e="0x"+e),MA(e))return e.toHexString();if(mf(e))return e.length%2&&(t.hexPad==="left"?e="0x0"+e.substring(2):t.hexPad==="right"?e+="0":sa.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(z3(e)){let n="0x";for(let r=0;r>4]+tp[i&15]}return n}return sa.throwArgumentError("invalid hexlify value","value",e)}const iV="bignumber/5.7.0";var fg=Jj.BN;const wi=new we(iV),ep={},c4=9007199254740991;let u4=!1;class Ke{constructor(t,n){t!==ep&&wi.throwError("cannot call constructor directly; use BigNumber.from",we.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return Dn(oe(this).fromTwos(t))}toTwos(t){return Dn(oe(this).toTwos(t))}abs(){return this._hex[0]==="-"?Ke.from(this._hex.substring(1)):this}add(t){return Dn(oe(this).add(oe(t)))}sub(t){return Dn(oe(this).sub(oe(t)))}div(t){return Ke.from(t).isZero()&&yr("division-by-zero","div"),Dn(oe(this).div(oe(t)))}mul(t){return Dn(oe(this).mul(oe(t)))}mod(t){const n=oe(t);return n.isNeg()&&yr("division-by-zero","mod"),Dn(oe(this).umod(n))}pow(t){const n=oe(t);return n.isNeg()&&yr("negative-power","pow"),Dn(oe(this).pow(n))}and(t){const n=oe(t);return(this.isNegative()||n.isNeg())&&yr("unbound-bitwise-result","and"),Dn(oe(this).and(n))}or(t){const n=oe(t);return(this.isNegative()||n.isNeg())&&yr("unbound-bitwise-result","or"),Dn(oe(this).or(n))}xor(t){const n=oe(t);return(this.isNegative()||n.isNeg())&&yr("unbound-bitwise-result","xor"),Dn(oe(this).xor(n))}mask(t){return(this.isNegative()||t<0)&&yr("negative-width","mask"),Dn(oe(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&yr("negative-width","shl"),Dn(oe(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&yr("negative-width","shr"),Dn(oe(this).shrn(t))}eq(t){return oe(this).eq(oe(t))}lt(t){return oe(this).lt(oe(t))}lte(t){return oe(this).lte(oe(t))}gt(t){return oe(this).gt(oe(t))}gte(t){return oe(this).gte(oe(t))}isNegative(){return this._hex[0]==="-"}isZero(){return oe(this).isZero()}toNumber(){try{return oe(this).toNumber()}catch{yr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return wi.throwError("this platform does not support BigInt",we.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?u4||(u4=!0,wi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?wi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",we.errors.UNEXPECTED_ARGUMENT,{}):wi.throwError("BigNumber.toString does not accept parameters",we.errors.UNEXPECTED_ARGUMENT,{})),oe(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof Ke)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new Ke(ep,Ic(t)):t.match(/^-?[0-9]+$/)?new Ke(ep,Ic(new fg(t))):wi.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&yr("underflow","BigNumber.from",t),(t>=c4||t<=-c4)&&yr("overflow","BigNumber.from",t),Ke.from(String(t));const n=t;if(typeof n=="bigint")return Ke.from(n.toString());if(z3(n))return Ke.from(rV(n));if(n)if(n.toHexString){const r=n.toHexString();if(typeof r=="string")return Ke.from(r)}else{let r=n._hex;if(r==null&&n.type==="BigNumber"&&(r=n.hex),typeof r=="string"&&(mf(r)||r[0]==="-"&&mf(r.substring(1))))return Ke.from(r)}return wi.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function Ic(e){if(typeof e!="string")return Ic(e.toString(16));if(e[0]==="-")return e=e.substring(1),e[0]==="-"&&wi.throwArgumentError("invalid hex","value",e),e=Ic(e),e==="0x00"?e:"-"+e;if(e.substring(0,2)!=="0x"&&(e="0x"+e),e==="0x")return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&e.substring(0,4)==="0x00";)e="0x"+e.substring(4);return e}function Dn(e){return Ke.from(Ic(e))}function oe(e){const t=Ke.from(e).toHexString();return t[0]==="-"?new fg("-"+t.substring(3),16):new fg(t.substring(2),16)}function yr(e,t,n){const r={fault:e,operation:t};return n!=null&&(r.value=n),wi.throwError(e,we.errors.NUMERIC_FAULT,r)}var hg={},oV={get exports(){return hg},set exports(e){hg=e}};/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */(function(e){(function(){var t="input is invalid type",n="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=ci:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],h=[4,1024,262144,67108864],_=[1,256,65536,16777216],v=[6,1536,393216,100663296],P=[0,8,16,24],N=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],M=[224,256,384,512],z=[128,256],I=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(S){return Object.prototype.toString.call(S)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(S){return typeof S=="object"&&S.buffer&&S.buffer.constructor===ArrayBuffer});for(var H=function(S,d,$){return function(f){return new C(S,d,S).update(f)[$]()}},it=function(S,d,$){return function(f,R){return new C(S,d,R).update(f)[$]()}},B=function(S,d,$){return function(f,R,k,x){return g["cshake"+S].update(f,R,k,x)[$]()}},p=function(S,d,$){return function(f,R,k,x){return g["kmac"+S].update(f,R,k,x)[$]()}},L=function(S,d,$,f){for(var R=0;R>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=($&31)>>3;for(var f=0;f<50;++f)this.s[f]=0}C.prototype.update=function(S){if(this.finalized)throw new Error(n);var d,$=typeof S;if($!=="string"){if($==="object"){if(S===null)throw new Error(t);if(u&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!u||!ArrayBuffer.isView(S)))throw new Error(t)}else throw new Error(t);d=!0}for(var f=this.blocks,R=this.byteCount,k=S.length,x=this.blockCount,ot=0,_t=this.s,dt,bt;ot>2]|=S[ot]<>2]|=bt<>2]|=(192|bt>>6)<>2]|=(128|bt&63)<=57344?(f[dt>>2]|=(224|bt>>12)<>2]|=(128|bt>>6&63)<>2]|=(128|bt&63)<>2]|=(240|bt>>18)<>2]|=(128|bt>>12&63)<>2]|=(128|bt>>6&63)<>2]|=(128|bt&63)<=R){for(this.start=dt-R,this.block=f[x],dt=0;dt>8,$=S&255;$>0;)R.unshift($),S=S>>8,$=S&255,++f;return d?R.push(f):R.unshift(f),this.update(R),R.length},C.prototype.encodeString=function(S){var d,$=typeof S;if($!=="string"){if($==="object"){if(S===null)throw new Error(t);if(u&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!u||!ArrayBuffer.isView(S)))throw new Error(t)}else throw new Error(t);d=!0}var f=0,R=S.length;if(d)f=R;else for(var k=0;k=57344?f+=3:(x=65536+((x&1023)<<10|S.charCodeAt(++k)&1023),f+=4)}return f+=this.encode(f*8),this.update(S),f},C.prototype.bytepad=function(S,d){for(var $=this.encode(d),f=0;f>2]|=this.padding[d&3],this.lastByteIndex===this.byteCount)for(S[0]=S[$],d=1;d<$+1;++d)S[d]=0;for(S[$-1]|=2147483648,d=0;d<$;++d)f[d]^=S[d];lt(f)}},C.prototype.toString=C.prototype.hex=function(){this.finalize();for(var S=this.blockCount,d=this.s,$=this.outputBlocks,f=this.extraBytes,R=0,k=0,x="",ot;k<$;){for(R=0;R>4&15]+l[ot&15]+l[ot>>12&15]+l[ot>>8&15]+l[ot>>20&15]+l[ot>>16&15]+l[ot>>28&15]+l[ot>>24&15];k%S===0&&(lt(d),R=0)}return f&&(ot=d[R],x+=l[ot>>4&15]+l[ot&15],f>1&&(x+=l[ot>>12&15]+l[ot>>8&15]),f>2&&(x+=l[ot>>20&15]+l[ot>>16&15])),x},C.prototype.arrayBuffer=function(){this.finalize();var S=this.blockCount,d=this.s,$=this.outputBlocks,f=this.extraBytes,R=0,k=0,x=this.outputBits>>3,ot;f?ot=new ArrayBuffer($+1<<2):ot=new ArrayBuffer(x);for(var _t=new Uint32Array(ot);k<$;){for(R=0;R>8&255,x[ot+2]=_t>>16&255,x[ot+3]=_t>>24&255;k%S===0&<(d)}return f&&(ot=k<<2,_t=d[R],x[ot]=_t&255,f>1&&(x[ot+1]=_t>>8&255),f>2&&(x[ot+2]=_t>>16&255)),x};function O(S,d,$){C.call(this,S,d,$)}O.prototype=new C,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),C.prototype.finalize.call(this)};var lt=function(S){var d,$,f,R,k,x,ot,_t,dt,bt,Ut,Pt,Ot,yt,It,Ft,Lt,St,Ct,jt,j,F,y,A,D,X,tt,q,m,b,nt,ct,rt,ft,ut,gt,mt,xt,vt,Bt,Vt,zt,Mt,Gt,Nt,Qt,Ht,$t,Dt,ne,te,re,Mr,he,pe,Tr,ie,ge,hr,Sn,_n,Yn,Kr;for(f=0;f<48;f+=2)R=S[0]^S[10]^S[20]^S[30]^S[40],k=S[1]^S[11]^S[21]^S[31]^S[41],x=S[2]^S[12]^S[22]^S[32]^S[42],ot=S[3]^S[13]^S[23]^S[33]^S[43],_t=S[4]^S[14]^S[24]^S[34]^S[44],dt=S[5]^S[15]^S[25]^S[35]^S[45],bt=S[6]^S[16]^S[26]^S[36]^S[46],Ut=S[7]^S[17]^S[27]^S[37]^S[47],Pt=S[8]^S[18]^S[28]^S[38]^S[48],Ot=S[9]^S[19]^S[29]^S[39]^S[49],d=Pt^(x<<1|ot>>>31),$=Ot^(ot<<1|x>>>31),S[0]^=d,S[1]^=$,S[10]^=d,S[11]^=$,S[20]^=d,S[21]^=$,S[30]^=d,S[31]^=$,S[40]^=d,S[41]^=$,d=R^(_t<<1|dt>>>31),$=k^(dt<<1|_t>>>31),S[2]^=d,S[3]^=$,S[12]^=d,S[13]^=$,S[22]^=d,S[23]^=$,S[32]^=d,S[33]^=$,S[42]^=d,S[43]^=$,d=x^(bt<<1|Ut>>>31),$=ot^(Ut<<1|bt>>>31),S[4]^=d,S[5]^=$,S[14]^=d,S[15]^=$,S[24]^=d,S[25]^=$,S[34]^=d,S[35]^=$,S[44]^=d,S[45]^=$,d=_t^(Pt<<1|Ot>>>31),$=dt^(Ot<<1|Pt>>>31),S[6]^=d,S[7]^=$,S[16]^=d,S[17]^=$,S[26]^=d,S[27]^=$,S[36]^=d,S[37]^=$,S[46]^=d,S[47]^=$,d=bt^(R<<1|k>>>31),$=Ut^(k<<1|R>>>31),S[8]^=d,S[9]^=$,S[18]^=d,S[19]^=$,S[28]^=d,S[29]^=$,S[38]^=d,S[39]^=$,S[48]^=d,S[49]^=$,yt=S[0],It=S[1],Qt=S[11]<<4|S[10]>>>28,Ht=S[10]<<4|S[11]>>>28,q=S[20]<<3|S[21]>>>29,m=S[21]<<3|S[20]>>>29,Sn=S[31]<<9|S[30]>>>23,_n=S[30]<<9|S[31]>>>23,zt=S[40]<<18|S[41]>>>14,Mt=S[41]<<18|S[40]>>>14,ft=S[2]<<1|S[3]>>>31,ut=S[3]<<1|S[2]>>>31,Ft=S[13]<<12|S[12]>>>20,Lt=S[12]<<12|S[13]>>>20,$t=S[22]<<10|S[23]>>>22,Dt=S[23]<<10|S[22]>>>22,b=S[33]<<13|S[32]>>>19,nt=S[32]<<13|S[33]>>>19,Yn=S[42]<<2|S[43]>>>30,Kr=S[43]<<2|S[42]>>>30,he=S[5]<<30|S[4]>>>2,pe=S[4]<<30|S[5]>>>2,gt=S[14]<<6|S[15]>>>26,mt=S[15]<<6|S[14]>>>26,St=S[25]<<11|S[24]>>>21,Ct=S[24]<<11|S[25]>>>21,ne=S[34]<<15|S[35]>>>17,te=S[35]<<15|S[34]>>>17,ct=S[45]<<29|S[44]>>>3,rt=S[44]<<29|S[45]>>>3,A=S[6]<<28|S[7]>>>4,D=S[7]<<28|S[6]>>>4,Tr=S[17]<<23|S[16]>>>9,ie=S[16]<<23|S[17]>>>9,xt=S[26]<<25|S[27]>>>7,vt=S[27]<<25|S[26]>>>7,jt=S[36]<<21|S[37]>>>11,j=S[37]<<21|S[36]>>>11,re=S[47]<<24|S[46]>>>8,Mr=S[46]<<24|S[47]>>>8,Gt=S[8]<<27|S[9]>>>5,Nt=S[9]<<27|S[8]>>>5,X=S[18]<<20|S[19]>>>12,tt=S[19]<<20|S[18]>>>12,ge=S[29]<<7|S[28]>>>25,hr=S[28]<<7|S[29]>>>25,Bt=S[38]<<8|S[39]>>>24,Vt=S[39]<<8|S[38]>>>24,F=S[48]<<14|S[49]>>>18,y=S[49]<<14|S[48]>>>18,S[0]=yt^~Ft&St,S[1]=It^~Lt&Ct,S[10]=A^~X&q,S[11]=D^~tt&m,S[20]=ft^~gt&xt,S[21]=ut^~mt&vt,S[30]=Gt^~Qt&$t,S[31]=Nt^~Ht&Dt,S[40]=he^~Tr&ge,S[41]=pe^~ie&hr,S[2]=Ft^~St&jt,S[3]=Lt^~Ct&j,S[12]=X^~q&b,S[13]=tt^~m&nt,S[22]=gt^~xt&Bt,S[23]=mt^~vt&Vt,S[32]=Qt^~$t&ne,S[33]=Ht^~Dt&te,S[42]=Tr^~ge&Sn,S[43]=ie^~hr&_n,S[4]=St^~jt&F,S[5]=Ct^~j&y,S[14]=q^~b&ct,S[15]=m^~nt&rt,S[24]=xt^~Bt&zt,S[25]=vt^~Vt&Mt,S[34]=$t^~ne&re,S[35]=Dt^~te&Mr,S[44]=ge^~Sn&Yn,S[45]=hr^~_n&Kr,S[6]=jt^~F&yt,S[7]=j^~y&It,S[16]=b^~ct&A,S[17]=nt^~rt&D,S[26]=Bt^~zt&ft,S[27]=Vt^~Mt&ut,S[36]=ne^~re&Gt,S[37]=te^~Mr&Nt,S[46]=Sn^~Yn&he,S[47]=_n^~Kr&pe,S[8]=F^~yt&Ft,S[9]=y^~It&Lt,S[18]=ct^~A&X,S[19]=rt^~D&tt,S[28]=zt^~ft>,S[29]=Mt^~ut&mt,S[38]=re^~Gt&Qt,S[39]=Mr^~Nt&Ht,S[48]=Yn^~he&Tr,S[49]=Kr^~pe&ie,S[0]^=N[f],S[1]^=N[f+1]};if(s)e.exports=g;else for(U=0;U{let t=e*e;return e*t*t%zA};function lV(e,t){const n=[];for(let r=0;rBigInt(l));if(n.length<=0)throw new Error("poseidon-lite: Not enough inputs");if(n.length>d4.length)throw new Error("poseidon-lite: Too many inputs");const r=n.length+1,i=sV,o=d4[r-2],{C:a,M:s}=t;if(s.length!==r)throw new Error(`poseidon-lite: Incorrect M length, expected ${r} got ${s.length}`);let u=[0n,...n];for(let l=0;l=i/2+o||c===0)&&(u[c]=f4(u[c]));u=lV(u,s)}return u[0]}var uV=cV,N3={};Object.defineProperty(N3,"__esModule",{value:!0});N3.default=pg;function pg(e){if(Array.isArray(e))return e.map(pg);if(typeof e=="object"){const r={};for(const[i,o]of Object.entries(e))r[i]=pg(o);return r}const n=[...Uint8Array.from(atob(e),r=>r.charCodeAt(0))].map(r=>r.toString(16).padStart(2,"0")).join("");return BigInt(`0x${n}`)}var w0={};Object.defineProperty(w0,"__esModule",{value:!0});w0.default=void 0;var dV={C:["DumlkrqalRjQWYbWVvQMIRTEmTwRuymTjSHUcwTNjm4=","APFEUjXyFIxZhlhxafwbzYh7CNTQCGjfVpb/9AlW6GQ=","CN/zSH6KyZ4fKaBY0PqAuTDHKHMLerNs6HnziQ7Pc/U=","Lye+aQ/a7kbDzij3UysTyFbDU0LIS9puIJZjEPrcAdA=","KyrhrPaLe40kFr6/PU9iNLdj/gS4BD7ki4MnvryhbPI=","AxnQYgcr737MperAb5fU1VlSwXWrawPq5ktEx9vxHPo=","KIE9yuuuqoKKN234evSmO8i3vyetScYpjvezh78oUm0=","JydnOyzLyQPxgb844cHUDSAzhlIAw1K8FQkord35y3g=","I07EXKJ3J8LnSr0rKhSUzW771D40BYfWuPueMeZcxjI=","FbUlNAMa4Y9/hiyyz3z3YKsQqBUKM3sczZn/boeX1Cg=","Dcj61tnks19e2aPRhrec444Oio0bWLEy1wHU7s9o0fY=","G82V/8IR+8pgD3BfrT+1Z+pOs3j2Lh/sl4BVGKR+TZw=","EFILCrchyt/p7/gbAW/DTcdto2wleJN4F8uXjQad5Vk=","H21IFJuOf32bJX2O1fu69CkySYB1/tCs6IqeuB9WJ/Y=","HZZV9lIwkBTSngDvNaIIm//43ByBbw3JyjS9tUYMhwU=","BN9aVv+VvK+wUfexzUOpm6cx/2fkcDIFj+PUGFaXzH0=","BnLZlfj/9kAVGz0pDO2vFIaQoQqMhCSn9uwoK25L6Cg=","CZlStBSIRFSyEgDX/6/dXwyancwG8nCOn8HYIJtcdbk=","BSy6IlXf0Ax8SDFDuo1GlEjkNYaptM2Rg/0OhDprn6Y=","C4ut7mkK246wvXRxK3mZr4LeVXByUa13Fgd8uTxGTdw=","EZsVkPEzB69aHuZRAgwHx0nBXWBoOoBQuWPQqOSyvdE=","AxULfNbV0XslKdNr4PZ7gyxKz8iE707lzhW+C/tKjQk=","LMYYLF4UVG488ZUfFzkSNVN077g9gImKvmnLMXyepWU=","AFAyVR5jeMRQz+EppASzdkIYyt7awU4rktLNcxEb8Pk=","IzI34yibqjS7FH6XLry5UWRpw5n8wGn7iPnaLMKCdrU=","Bcj09OvUpuPJgNMWdL++YyMDfyGzSuWk6AwtTCTWAoA=","CnsdsTBC05a6BdgYoxnyUlK8817zru2R7h8JslkPxls=","KnO3H5shDPWxQpZXLJ0y2/FW4rCG/0fcXfVCNlpATsA=","GsmwQXq8yaGTUQfp/8kdw+wY8sTb5/Ipdqdgu1xQxGA=","EsAzmuCDdII/q7B2cH70eSafPk1ssQQ0kBXuBG3JP8A=","C3R1sQKhZa1/WxjbTh5wT1KQCqMlO6rGgkZoLlbpoo4=","A3woSeGRyj7bHF5J9ui4kXyEPjeTZvLqMqs6qI1/hEg=","BaaBH4VW8BTpJnRmHiF+m9UgbFyToH3BRf2xdqcWNG8=","KaeV59mAKJRulHt11U6fBEB26Hp7KIO0e2de9fOL1m4=","IEOaDISzIutFo4V6/Bj1gm6Mc4LIoVhcUHvhmZgf0i8=","Lguo2U2ez0qU7CBQxzcf8btQ8neZqEttSipvKgmCyIc=","FD/RFc4I+yfKOOt8zoIrRReCLNIQkEjS5tDdzKF9ccg=","DGTL7LHHNLhXlo273PgTzfhhFlkyPby/yEMjYjvpyvE=","AoowWEfGg/ZG/KklwWP/WudPNI1iwrZw8UJs75QD2lM=","Lk71EP8Lb9pfqUCrTEOA8mpry2TYlCe4JNZ1W1254ww=","AIHJW8QzhOZj15JwyVbOO4kltPbQM7B4uWOE9QV5QA4=","LtXwyRy9l0kYfi+t5ofgXuJJGzScA5oLuoqfQCOguzg=","MFCZkfiNo1BLvzdO1ari8DRIoix2I0yMmQ8B8zpzUgY=","HD8g/VVAmlMiG3xNSaNWufChEZ+yBntBp1KQlEJOxq0=","ELTn86td8AMElRRFm24Y7sRrsiE+jhMeFwiHtH3cuWw=","KhmCl5w/9/Q93VQ9iRwqvd2A+ATAd9d1A5qjUC5Dre8=","HHTuZPFeHbb+3b6tVtbVXbpDHrw5bJr5XK0PExW9XJE=","B1M+yFC6f5jquTA8rOAbS55PLouCcIz6nC/kWgrhRqA=","IVdrQ45QBEmhUeTurxexVChcaPQtQsGAihGr83ZMB1A=","LxfAVZuP55YIrVyhk9YvELzoOEyBXwkGdD1pMINtSp4=","LUd+OGLQdwinnoqulGFwvJd1pCATGEdK5mWwsbficw4=","Fi9SQ5ZwZMOQ4JVXeYTyka+6ImbDj1q82Jvg9bJ0fqs=","K0yyM+3pukgmTs0siuUNGteoWWqH8p+Kd3enAJI5MxE=","LI+8st2Fc9wduvj0YihUd22y7s5thcTPQlTnw14DsHo=","HW80dyXkgWry/0U/DNVrGZ4bYen2Aemt5eiNuHCUnak=","IEsMOX9OvnHrwtiz31uRPfnmrAK2jTEyTNSa9cRWVSk=","DEy53DxP2BdPEUmzxjw8L57LgnzX3CVTT/j7dbx5xQI=","F0rWGhRIyJmiVBZHT0kwMB5cSUdSeeBjmmFt3EW8e1Q=","GpYXe89NjYn3Wd9OwvPN4uqqKMF3zA+hOpgW1Jo40u8=","Bm0EskMx1xzQ74BUvGDE/wUgLBJqIzwagkKs42C4owo=","KkxPxuwLDPUhlXgoccbdOzgcxl9y4CrVJwN6Yqob2AQ=","E6stE2zPN9RH6fLhSnztyV5yf4RG9tnX5Vr8ASGf1kk=","ESFVL8omBhYZ0k2EPcgnacGwT87Cb1UZTC4+hprMapo=","AO9lMyKxPWyIm8gXFcN9d6bNJn1ZXEqJCaVUbHyXz/E=","DiVIPkWmZSCLJh2Lp0BR5kAMd21lJZXZhFrKNdijl9M=","KfU23LnddoIkUmRlnhXYjjlaw9Td6S2MRkSNuXnuuok=","KlbvnyxT/rrf2jNXXb29iFoSTieAu+oXDkVrqs4Ppb4=","HINhx461z13s+3otF7XECfKuKZmkZ2Lo7kFiQKjLmvE=","FRr/XziyCg/ARzCJqvAga4Po5op2RQe/09CrS+dDGcU=","BMYYfkHtiB3BsjnIj3+dQ6n1L8jIts3R525HYVtR8QA=","E7N72A9NJ/sQ2EMx9vttU0uBxh7RV3ZEnoAbfdycKWc=","AaXFNic8LZ31eL+9MsF7eizjZkwqUgMskyHOscToqOQ=","KrNWGDTKc4Na0F9desuVC0qaLGZrlybagyI5Blt8OwI=","HU2OwpHnINsgD+bWhsDWE6yvavTpXTv2n37VFqWXtkY=","BBKU0sxITSKPV4T+eRn9K7klNRJAoEtxFRTJyAtlrx0=","FUrJjgFwjGEcT6cVmR8ASJj1eTnRJuOSBClx3ZDoH8Y=","CzOdisyn1Pg+7dhAk671EFCzaEyI+LCwRSRWO8bqTaQ=","CVXknmYQyUJUpPhM+6s0RZjw5x6v9Kfdge2VtQg5yC4=","BnRqYVbrpUQmueIiBvFavKmm9B5vU1xvNSVAHqBlRiY=","Dxj1oOzRQjxJbzggxUnCeDjleQ4r0KGWrJF8f/Mgd/s=","BPbuyhdR9zCKxZ7/W+smHku1Y1g+3nvJKnOCI9b3bhM=","K1aXM2TExPXBo+xNo83OA4gR6xFvs+RbwXaNJvwLN1g=","Ejdp3UnVsFTc12uJgEsby44TkrOFcWpdg/62XUN/Ke8=","IUe0JPxIyAqI7lK5EWmqzqmJ9kRkcRUJlCV7L7AcY+k=","D9wfWFSLhXAabFUF6jMqKWR+bzStQkPC6lStiXzr5U0=","Ejc6glH+oATfaKvPD3eG1Lzv8oxdu+DDlE9oXMCgsfI=","IeT06l81+FutfqUv90LJ6KZCdWtq9EID3YofNcGpADU=","FiQ5FtadLKPftHIiJNTEYrVzZkkvRekNioGTTxvDsUc=","HvvkbdeleLT2b5rbyItDeKvCFWbhoEU8oTpBWcrASsI=","B+pehTfPXdCIhgIOI6fzh9Ro1VJb5m+FO2csyWqIlpo=","BajE+ZaLiqO3tHijD5pbY2UPGadefOEcqf4WwLdsALw=","IPBXcSzCFlT7/lm9NF6NrD94GMcBuceILZ1Xtyoy6D8=","BKEu3tqd/WiWcvjGf+4xY23NjojQHUkBm9kLM+sz22k=","J+iNjBXzfc7kTx5UJaUd7L0TbOUJGmdn5J7JVEzNEBo=","L+7Re4QoXtm4pcjF6VpB9m4JZhmncDIjF2xB7kM95NE=","HtfMdu30XHxAQkFCD3Kc85TllCkRMSoNaXK4vVOv8rg=","FXQumbm/oyMVf/jFhvVmDqxng0dhRM3K3yh0vkVGaxo=","GqwoU4f2XoLIlfxoh930BXcQdFTG7AMXKE8DPyfQx4U=","JYUcPIRdR5D53a29tgVzV4MuLnpJd19x7HWpZVTWfHc=","FaWCFWXMLsLOeEV9sZft81O367osVSM3DdzMPZ8Uamc=","JBHVekgTuZgO+n4xodtZZtz2TzYEQndQLxVIXyjHFyc=","AC5vjWUgzUcT4zW4wLbS5kfpqY4S9M0lWIKLXvbLTJs=","L/e8j0OAzemX2gC2FrD80a+PDpHi/h7XOYg0YJ4DFdI=","ALmDG5SFJVle4CckRxvNGC6VIfa3u2jx6Tvk/rsNPL4=","Ci9TdouOv2qGkTsOV8BOARykCGSKR0OofXetvwycNRI=","ACSBVhQv0Dc6R5+R/yOelg9Zn/fpS+abfyopAwXhGY0=","Fx1WILh7+xMoz4wCqz8MmjlxlqpqVCwjUOtRKisrzak=","FwpPVVNvfclwCHx8ENb612DJUhct1U3ZnRBF5Ow0qAg=","KaujP3mf5mwu8xNK6gQzbsw344wc0hG6SC7KF+Lb+uE=","HpvBeaT911j90bsZRQiNR+cNEUoD9qDotbplA2nmSXM=","HdJpeZtmD61Y9/SJLfsLWv6q2GmpxLRPnJ4cQ72vjwk=","Is28i3ARetFAEYHQLhVFnnzNQm/oacfJXR3Syw8krzg=","DvBC5FR3HFM6n1elXFA/zv0xUPUu2Up81bqTucfazv0=","EWCeBq1sj+Lyh/MDYDfohRMY6LCKA1mgOzBP/KYugoQ=","EWbZ5VRhbbqedT7qQnwXt/7NWMB23+QnCLCPW3g6qa8=","LeUpiUMahZWTQTAmNUQT2xd/v0zSrAtW+FWoiDV+5GY=","MAbrT/x6hYGabaSS86isHfUa7lsXuOiddL8Bz19x6a0=","KvQfu2G6ioD9z2//nj9vQimT/o8KRjn5YjRMgiUUUIY=","EZ5oTeR2FV/lprQajryF24cYqyeInoXngbIUus5IJ8M=","GDW3huLokl4Yi+pZrjY1N7USSMI4KPBHz/eEuXs/2AA=","KCAaNMWU36NNeUmWxkM6INFSusKnkFySbEDihasy7rY=","CD79eifRdRCU6A/vr3iwAIZMgutXEYdySnYfiMIsxOc=","C2+Io1dxmVJhWOYc7qJ76BHBbfd3TdhRngeVZPYf0Ts=","Dsho5tFeUdlkT2bh1kcalFiVEcoA0p4QFDkObuQlT1s=","KvM+P4ZncScawMmz7S4RQuzT50uTnNQNANk3q4TJhZE=","C1ICEfkEtefQm12WHGrOdzRWjFR91oWLNkzl5HlR8Xg=","Cy1yLQkZoarY21jxAGKpLqDFasQnDoIsyiKGIBiKHUA=","H3kNTX+M8JTZgM6zfCRT6Ve1SpmRyji74AYdHtblYtQ=","AXHrld+/fR6uqXzThfeAFQiFwWI1oqao2pLOsB5QQjM=","DC0OO1/VdUkym/aIXaZrm3kLQN79LIZQdiMFOBsWiHM=","EWL7KGicJxVOWoIotOcrN3y8r6WJ4oPDXTgDBUQHoY0=","LxRZtl3uRBtkrThqkegxDygsWpKonhmSFiPvgklxG8A=","Hm/zIWtojD2ZbXQ2fVzUwbxInUZ1TrcSwkP3DRtTz7s=","AcqL5zgyuNBoFIfSfRV4AtdBpvNs3CoFdogfkyZHiHU=","H3c1cG/+n8WG+XbVvfIj3GgChggLEM6gC5td4xX5ZQ4=","JSK2D06jMHZAoMLc4EH7qSGsEKPV8JbvR0XKg4KF8Bk=","I/C+4AGxAp1SVQdd3JV/gzQYytT1K2w/jOFsI1VyV1s=","K8Gui43buB/KrC1EVV7VaF0UJjPp35BfZtlAEJMILVk=","D5QGuCllZKNzBFB7jbo+0WI3EnOgex/JgBH81q1yIF8=","I2Co6wzH3vpntymY3pBxThfnWxdKUu5KyxJsjNmV8Kg=","FYcaXN3q2XaATIA8uu8lXrSBWl6W34sAbcu8J2f4iUg=","GTpWdmmY7p4KhlLdLzsdoDYvT1T3I3lUT5V8ze77Qg8=","KjlKQ5NPhpgvm+Vv9PqxcDsuY8itM0g05DCYBed3rg8=","GFmVTP64aV8+i2NdyzRRkoks0RIjRDuntBZuiHbA0UI=","BOEYF2MFDlgBNETby5nxkCsRvCXZC73KQI04GfT+0ys=","D9slPe6Dhp1AwzXqZN6MW7EOuC2wi16LH15VUr/QXyM=","BYy+ippQJ72qTvtiOt6tYnXwhobxwImEqdfFuum08cA=","E4Ltzplx4YZJfq2xrrH1KyO0uDvvAjqw0VIotMzspZo=","A0ZJkPBFxu4IGcpR/RGwvn9huOuZ8Ut34eZjRgHZ6LU=","I/e/yHINwpb/8ztB+Y/4PG/KtGBdsutaqlvBN663Clg=","ClmhWOPuwhF+bpTn8OnezxjD/9XhUxqSGWNhWLuvYvI=","BuxUyAOBwFK1i/I7MS/9POLE66BlQgr49MI+0Adf0Hs=","EYhy3IMuDrVHa1ZkjoZ+yLCTQPenvLG0li8P+e0fnQE=","E9afoSfYNBZa1cfLp61Z7VLgsPDkLX/qleGQa1IJIbE=","FpoXf2PqaBJwscaHenPSG94UOUL7cdxV/YpJ8Z8Qx3s=","BO9RWRxurZfvQvKHrc5A2Tq+sDK5IvZv+36aWnRQVE0=","JW4XWh3AeTkOzXynA/suOxnsYYBdTwPO1fRe5t0Paew=","MBAtKGNqvV/l8q9BL/YAT3XMNg0yBd0toAKBPT4s7rI=","EJmOQt/NO78cBxS8c+sb9ARDo/qZvvSjH9Mb4YL8x5I=","GT7djp/PPXYl+n0ktZih2J8zYur01YLv7K12+HnjaGA=","GBaK/TTy2RXQNozoC3szR9HHpWHOYRQl8mZNeqUfC10=","KTg8AevTtqsMAXZW6+ZYtqMo7He8M2JuKeLpWzPqYRE=","EGRtLyYD3jmh9K5ed3GmSnAttuhvt2q2AL9XP5AQxxE=","C+teB9GycUX1dfE5WlW/Ey+QwltA2ns4ZNAkLcsRF/s=","FtaFJSB4wTPcDT7K1itciDD5W7LlS1mr3/vwGNlvozY=","Cmq9HYM5OPM8dBVOBAS0tApVW7vsId36/Wct1iBH8Bo=","GmefXTbre1yOoSpMLe3I/rEt/+7EUDFycKbxmzTPGGA=","CYD7IzvUVsI5dNUODr/eRyakI+raTo9v+8dZLj8bk9Y=","FhtCIy5huEy/GBCvk6OPwM7OPVYoySggA+ustcMSxys=","CtoQqQx/BSCVD31Hpg1eakk/CXh/FWTl0JID20feGgs=","GnMNNyMQuoIyA0WimsQjjtPweoorThIbtQ3bmvQH9FE=","LIEg8mjvBU+BcGTDad2n6pCDd/6rpcTf+9oQ71joxVY=","HHyIJPdYdT+lfAB4nGhCF7kw6VMTvLc+bnuGSaSWj3A=","LNntMfX4aRyOOeQHenT6oPQArYtJHrP3tHsn+j/Rz3c=","I/9PnUaBNFfPYNkvV2GDmaXgIqwyHKVQhUriORiiLuo=","CZRaXRR6T2bO7OZAXd3Z0K9aLFEDUpQH3/HqWPGAQm0=","GI2cUoAl1MK2dmDGt3G5D3x9puqinT8mim3SI+xvxjA=","MFDjeZZZa3+B9oMRQx2HNNun2SbTYzWV4MDY3fTw9H8=","Fa8RaTloMKkWAMqBAsNcQmzq5UYeP5XYnYKVGNMK/Xg=","HabQmIVDLqmgbZ83+HPZhdrpM+NRRmspBChNozINisw=","J5bqkNJpryn1+KzzOSESTk5PrT2+ZYlF5UbuQR3aqcs=","IC190doPa0sDJcizMHdC8B4VYS7I6TBKfLAxngHTLWA=","CW1nkNBbt1kVapUromPWcqLX+ceI9Mgxop2s5MD4vl8=","BU76H2Ww/OKDgIllJ12He0ONojzlsT4ZY3mMsUR9JaQ=","GxYvg9kX6T7bMwjCmALeudiqaQETsuFIZMz24Y5BZfE=","IeUkHhJWTdb9nxzdKg3jnu3+/BRmzFaOxc63RaBQbtw=","HPtWYujPWskiaoDuF7Nqvstzq1+H4WGSe0NJ4Q5L3wg=","DyEXfjAqdxu65tjR7LNztiyZrzRiIKwBKcU/Zm6yQQA=","FnFSI3RgaZKv+w3X9xsSvsQjau3mKQVGvO9+H1FcIyA=","D6PsW5SIJZwutM8kUBv62b4uyeQsXMjM1BnSppLK2HA=","GTwOBOC9KYNXyyZsFQYIDtNu3OhcZIzAhejFexq1S7o=","ECrfjvdHNaJ+kSgwbcvDyZ9vcpHNQGV4zhTqKtq6aPg=","D+CveFjkmFnipU1vGtlFsTFqokv73SOuQKbQy3DD6rE=","IW9nF7vH3tsIU2oiIIQ/Ti2l8dqp69796KXqc0R5jSI=","HaVcyQDw0h9KPmlDkZGKGzwjsqx3PGs++I4uQigyUWE="],M:[["EJt/QRug5MmytwyvXDansZS+fBGtJDeL/ttoWSuoEYs=","Fu1B4Tu5wMZq4RlCT928vJMU3J/b3upV1sZFQ9xJA+A=","K5C7oA/KBYn2F+fcv+guDfcGq2QM6yR7eRqTt042c20="],["KWnyfu0xpIC5w2x2Q3nbyizI/dFBXD3e1ilAvN4L13E=","LiQZ+ewC7DlMmHHIMpY9wbiddDyMe5ZAKbIxFoex/iM=","EBBx8AMjebaXMVh2aQ8FPRSNThCfX7BlyKrMVaD4m/o="],["FDAh7GhqPzMNX55lRjgGXObNeeKMWzdTMmJE7mWhsac=","F2zAKWla0CWCpw7/CKb9mdBX4S5Y59e2sWzfq8juKRE=","GaP8ClZwK/QXun/uOAJZP6ZERwMHBD93cyec1x0l1eA="]]};w0.default=dV;Object.defineProperty(RA,"__esModule",{value:!0});var fV=RA.poseidon2=yV,hV=U3(uV),pV=U3(N3),gV=U3(w0);function U3(e){return e&&e.__esModule?e:{default:e}}const mV=(0,pV.default)(gV.default);function yV(e){return(0,hV.default)(e,mV)}function vV(e){return e=Ke.from(e).toTwos(256).toHexString(),e=TA(e,32),BigInt(OA(e))>>BigInt(8)}var _V=function(){function e(t,n,r){if(n===void 0&&(n=20),r===void 0&&(r=[]),n<16||n>32)throw new Error("The tree depth must be between 16 and 32");this._id=t,this.merkleTree=new Yj(fV,n,vV(t),2,r.map(BigInt))}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.merkleTree.root},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this.merkleTree.depth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroValue",{get:function(){return this.merkleTree.zeroes[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"members",{get:function(){return this.merkleTree.leaves},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(t){return this.merkleTree.indexOf(t)},e.prototype.addMember=function(t){this.merkleTree.insert(BigInt(t))},e.prototype.addMembers=function(t){for(var n=0,r=t;n>2]|=B[K]<>2]|=Z<>2]|=(192|Z>>6)<>2]|=(128|Z&63)<=57344?(w[G>>2]|=(224|Z>>12)<>2]|=(128|Z>>6&63)<>2]|=(128|Z&63)<>2]|=(240|Z>>18)<>2]|=(128|Z>>12&63)<>2]|=(128|Z>>6&63)<>2]|=(128|Z&63)<=128?(this.block=w[32],this.start=G-128,this.hash(),this.hashed=!0):this.start=G}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},W.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var B=this.blocks,p=this.lastByteIndex;B[32]=this.block,B[p>>2]|=c[p&3],this.block=B[32],p>=112&&(this.hashed||this.hash(),B[0]=this.block,B[1]=B[2]=B[3]=B[4]=B[5]=B[6]=B[7]=B[8]=B[9]=B[10]=B[11]=B[12]=B[13]=B[14]=B[15]=B[16]=B[17]=B[18]=B[19]=B[20]=B[21]=B[22]=B[23]=B[24]=B[25]=B[26]=B[27]=B[28]=B[29]=B[30]=B[31]=B[32]=0),B[30]=this.hBytes<<3|this.bytes>>>29,B[31]=this.bytes<<3,this.hash()}},W.prototype.hash=function(){var B=this.h0h,p=this.h0l,L=this.h1h,Z=this.h1l,K=this.h2h,G=this.h2l,et=this.h3h,w=this.h3l,g=this.h4h,E=this.h4l,U=this.h5h,Q=this.h5l,T=this.h6h,Y=this.h6l,J=this.h7h,V=this.h7l,C=this.blocks,O,lt,S,d,$,f,R,k,x,ot,_t,dt,bt,Ut,Pt,Ot,yt,It,Ft,Lt,St,Ct,jt,j,F;for(O=32;O<160;O+=2)Lt=C[O-30],St=C[O-29],lt=(Lt>>>1|St<<31)^(Lt>>>8|St<<24)^Lt>>>7,S=(St>>>1|Lt<<31)^(St>>>8|Lt<<24)^(St>>>7|Lt<<25),Lt=C[O-4],St=C[O-3],d=(Lt>>>19|St<<13)^(St>>>29|Lt<<3)^Lt>>>6,$=(St>>>19|Lt<<13)^(Lt>>>29|St<<3)^(St>>>6|Lt<<26),Lt=C[O-32],St=C[O-31],Ct=C[O-14],jt=C[O-13],f=(jt&65535)+(St&65535)+(S&65535)+($&65535),R=(jt>>>16)+(St>>>16)+(S>>>16)+($>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(lt&65535)+(d&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(lt>>>16)+(d>>>16)+(k>>>16),C[O]=x<<16|k&65535,C[O+1]=R<<16|f&65535;var y=B,A=p,D=L,X=Z,tt=K,q=G,m=et,b=w,nt=g,ct=E,rt=U,ft=Q,ut=T,gt=Y,mt=J,xt=V;for(Ot=D&tt,yt=X&q,O=0;O<160;O+=8)lt=(y>>>28|A<<4)^(A>>>2|y<<30)^(A>>>7|y<<25),S=(A>>>28|y<<4)^(y>>>2|A<<30)^(y>>>7|A<<25),d=(nt>>>14|ct<<18)^(nt>>>18|ct<<14)^(ct>>>9|nt<<23),$=(ct>>>14|nt<<18)^(ct>>>18|nt<<14)^(nt>>>9|ct<<23),ot=y&D,_t=A&X,It=ot^y&tt^Ot,Ft=_t^A&q^yt,j=nt&rt^~nt&ut,F=ct&ft^~ct>,Lt=C[O],St=C[O+1],Ct=_[O],jt=_[O+1],f=(jt&65535)+(St&65535)+(F&65535)+($&65535)+(xt&65535),R=(jt>>>16)+(St>>>16)+(F>>>16)+($>>>16)+(xt>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(j&65535)+(d&65535)+(mt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(j>>>16)+(d>>>16)+(mt>>>16)+(k>>>16),Lt=x<<16|k&65535,St=R<<16|f&65535,f=(Ft&65535)+(S&65535),R=(Ft>>>16)+(S>>>16)+(f>>>16),k=(It&65535)+(lt&65535)+(R>>>16),x=(It>>>16)+(lt>>>16)+(k>>>16),Ct=x<<16|k&65535,jt=R<<16|f&65535,f=(b&65535)+(St&65535),R=(b>>>16)+(St>>>16)+(f>>>16),k=(m&65535)+(Lt&65535)+(R>>>16),x=(m>>>16)+(Lt>>>16)+(k>>>16),mt=x<<16|k&65535,xt=R<<16|f&65535,f=(jt&65535)+(St&65535),R=(jt>>>16)+(St>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(k>>>16),m=x<<16|k&65535,b=R<<16|f&65535,lt=(m>>>28|b<<4)^(b>>>2|m<<30)^(b>>>7|m<<25),S=(b>>>28|m<<4)^(m>>>2|b<<30)^(m>>>7|b<<25),d=(mt>>>14|xt<<18)^(mt>>>18|xt<<14)^(xt>>>9|mt<<23),$=(xt>>>14|mt<<18)^(xt>>>18|mt<<14)^(mt>>>9|xt<<23),dt=m&y,bt=b&A,It=dt^m&D^ot,Ft=bt^b&X^_t,j=mt&nt^~mt&rt,F=xt&ct^~xt&ft,Lt=C[O+2],St=C[O+3],Ct=_[O+2],jt=_[O+3],f=(jt&65535)+(St&65535)+(F&65535)+($&65535)+(gt&65535),R=(jt>>>16)+(St>>>16)+(F>>>16)+($>>>16)+(gt>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(j&65535)+(d&65535)+(ut&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(j>>>16)+(d>>>16)+(ut>>>16)+(k>>>16),Lt=x<<16|k&65535,St=R<<16|f&65535,f=(Ft&65535)+(S&65535),R=(Ft>>>16)+(S>>>16)+(f>>>16),k=(It&65535)+(lt&65535)+(R>>>16),x=(It>>>16)+(lt>>>16)+(k>>>16),Ct=x<<16|k&65535,jt=R<<16|f&65535,f=(q&65535)+(St&65535),R=(q>>>16)+(St>>>16)+(f>>>16),k=(tt&65535)+(Lt&65535)+(R>>>16),x=(tt>>>16)+(Lt>>>16)+(k>>>16),ut=x<<16|k&65535,gt=R<<16|f&65535,f=(jt&65535)+(St&65535),R=(jt>>>16)+(St>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(k>>>16),tt=x<<16|k&65535,q=R<<16|f&65535,lt=(tt>>>28|q<<4)^(q>>>2|tt<<30)^(q>>>7|tt<<25),S=(q>>>28|tt<<4)^(tt>>>2|q<<30)^(tt>>>7|q<<25),d=(ut>>>14|gt<<18)^(ut>>>18|gt<<14)^(gt>>>9|ut<<23),$=(gt>>>14|ut<<18)^(gt>>>18|ut<<14)^(ut>>>9|gt<<23),Ut=tt&m,Pt=q&b,It=Ut^tt&y^dt,Ft=Pt^q&A^bt,j=ut&mt^~ut&nt,F=gt&xt^~gt&ct,Lt=C[O+4],St=C[O+5],Ct=_[O+4],jt=_[O+5],f=(jt&65535)+(St&65535)+(F&65535)+($&65535)+(ft&65535),R=(jt>>>16)+(St>>>16)+(F>>>16)+($>>>16)+(ft>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(j&65535)+(d&65535)+(rt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(j>>>16)+(d>>>16)+(rt>>>16)+(k>>>16),Lt=x<<16|k&65535,St=R<<16|f&65535,f=(Ft&65535)+(S&65535),R=(Ft>>>16)+(S>>>16)+(f>>>16),k=(It&65535)+(lt&65535)+(R>>>16),x=(It>>>16)+(lt>>>16)+(k>>>16),Ct=x<<16|k&65535,jt=R<<16|f&65535,f=(X&65535)+(St&65535),R=(X>>>16)+(St>>>16)+(f>>>16),k=(D&65535)+(Lt&65535)+(R>>>16),x=(D>>>16)+(Lt>>>16)+(k>>>16),rt=x<<16|k&65535,ft=R<<16|f&65535,f=(jt&65535)+(St&65535),R=(jt>>>16)+(St>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(k>>>16),D=x<<16|k&65535,X=R<<16|f&65535,lt=(D>>>28|X<<4)^(X>>>2|D<<30)^(X>>>7|D<<25),S=(X>>>28|D<<4)^(D>>>2|X<<30)^(D>>>7|X<<25),d=(rt>>>14|ft<<18)^(rt>>>18|ft<<14)^(ft>>>9|rt<<23),$=(ft>>>14|rt<<18)^(ft>>>18|rt<<14)^(rt>>>9|ft<<23),Ot=D&tt,yt=X&q,It=Ot^D&m^Ut,Ft=yt^X&b^Pt,j=rt&ut^~rt&mt,F=ft>^~ft&xt,Lt=C[O+6],St=C[O+7],Ct=_[O+6],jt=_[O+7],f=(jt&65535)+(St&65535)+(F&65535)+($&65535)+(ct&65535),R=(jt>>>16)+(St>>>16)+(F>>>16)+($>>>16)+(ct>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(j&65535)+(d&65535)+(nt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(j>>>16)+(d>>>16)+(nt>>>16)+(k>>>16),Lt=x<<16|k&65535,St=R<<16|f&65535,f=(Ft&65535)+(S&65535),R=(Ft>>>16)+(S>>>16)+(f>>>16),k=(It&65535)+(lt&65535)+(R>>>16),x=(It>>>16)+(lt>>>16)+(k>>>16),Ct=x<<16|k&65535,jt=R<<16|f&65535,f=(A&65535)+(St&65535),R=(A>>>16)+(St>>>16)+(f>>>16),k=(y&65535)+(Lt&65535)+(R>>>16),x=(y>>>16)+(Lt>>>16)+(k>>>16),nt=x<<16|k&65535,ct=R<<16|f&65535,f=(jt&65535)+(St&65535),R=(jt>>>16)+(St>>>16)+(f>>>16),k=(Ct&65535)+(Lt&65535)+(R>>>16),x=(Ct>>>16)+(Lt>>>16)+(k>>>16),y=x<<16|k&65535,A=R<<16|f&65535;f=(p&65535)+(A&65535),R=(p>>>16)+(A>>>16)+(f>>>16),k=(B&65535)+(y&65535)+(R>>>16),x=(B>>>16)+(y>>>16)+(k>>>16),this.h0h=x<<16|k&65535,this.h0l=R<<16|f&65535,f=(Z&65535)+(X&65535),R=(Z>>>16)+(X>>>16)+(f>>>16),k=(L&65535)+(D&65535)+(R>>>16),x=(L>>>16)+(D>>>16)+(k>>>16),this.h1h=x<<16|k&65535,this.h1l=R<<16|f&65535,f=(G&65535)+(q&65535),R=(G>>>16)+(q>>>16)+(f>>>16),k=(K&65535)+(tt&65535)+(R>>>16),x=(K>>>16)+(tt>>>16)+(k>>>16),this.h2h=x<<16|k&65535,this.h2l=R<<16|f&65535,f=(w&65535)+(b&65535),R=(w>>>16)+(b>>>16)+(f>>>16),k=(et&65535)+(m&65535)+(R>>>16),x=(et>>>16)+(m>>>16)+(k>>>16),this.h3h=x<<16|k&65535,this.h3l=R<<16|f&65535,f=(E&65535)+(ct&65535),R=(E>>>16)+(ct>>>16)+(f>>>16),k=(g&65535)+(nt&65535)+(R>>>16),x=(g>>>16)+(nt>>>16)+(k>>>16),this.h4h=x<<16|k&65535,this.h4l=R<<16|f&65535,f=(Q&65535)+(ft&65535),R=(Q>>>16)+(ft>>>16)+(f>>>16),k=(U&65535)+(rt&65535)+(R>>>16),x=(U>>>16)+(rt>>>16)+(k>>>16),this.h5h=x<<16|k&65535,this.h5l=R<<16|f&65535,f=(Y&65535)+(gt&65535),R=(Y>>>16)+(gt>>>16)+(f>>>16),k=(T&65535)+(ut&65535)+(R>>>16),x=(T>>>16)+(ut>>>16)+(k>>>16),this.h6h=x<<16|k&65535,this.h6l=R<<16|f&65535,f=(V&65535)+(xt&65535),R=(V>>>16)+(xt>>>16)+(f>>>16),k=(J&65535)+(mt&65535)+(R>>>16),x=(J>>>16)+(mt>>>16)+(k>>>16),this.h7h=x<<16|k&65535,this.h7l=R<<16|f&65535},W.prototype.hex=function(){this.finalize();var B=this.h0h,p=this.h0l,L=this.h1h,Z=this.h1l,K=this.h2h,G=this.h2l,et=this.h3h,w=this.h3l,g=this.h4h,E=this.h4l,U=this.h5h,Q=this.h5l,T=this.h6h,Y=this.h6l,J=this.h7h,V=this.h7l,C=this.bits,O=l[B>>28&15]+l[B>>24&15]+l[B>>20&15]+l[B>>16&15]+l[B>>12&15]+l[B>>8&15]+l[B>>4&15]+l[B&15]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[p&15]+l[L>>28&15]+l[L>>24&15]+l[L>>20&15]+l[L>>16&15]+l[L>>12&15]+l[L>>8&15]+l[L>>4&15]+l[L&15]+l[Z>>28&15]+l[Z>>24&15]+l[Z>>20&15]+l[Z>>16&15]+l[Z>>12&15]+l[Z>>8&15]+l[Z>>4&15]+l[Z&15]+l[K>>28&15]+l[K>>24&15]+l[K>>20&15]+l[K>>16&15]+l[K>>12&15]+l[K>>8&15]+l[K>>4&15]+l[K&15]+l[G>>28&15]+l[G>>24&15]+l[G>>20&15]+l[G>>16&15]+l[G>>12&15]+l[G>>8&15]+l[G>>4&15]+l[G&15]+l[et>>28&15]+l[et>>24&15]+l[et>>20&15]+l[et>>16&15]+l[et>>12&15]+l[et>>8&15]+l[et>>4&15]+l[et&15];return C>=256&&(O+=l[w>>28&15]+l[w>>24&15]+l[w>>20&15]+l[w>>16&15]+l[w>>12&15]+l[w>>8&15]+l[w>>4&15]+l[w&15]),C>=384&&(O+=l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[g&15]+l[E>>28&15]+l[E>>24&15]+l[E>>20&15]+l[E>>16&15]+l[E>>12&15]+l[E>>8&15]+l[E>>4&15]+l[E&15]+l[U>>28&15]+l[U>>24&15]+l[U>>20&15]+l[U>>16&15]+l[U>>12&15]+l[U>>8&15]+l[U>>4&15]+l[U&15]+l[Q>>28&15]+l[Q>>24&15]+l[Q>>20&15]+l[Q>>16&15]+l[Q>>12&15]+l[Q>>8&15]+l[Q>>4&15]+l[Q&15]),C==512&&(O+=l[T>>28&15]+l[T>>24&15]+l[T>>20&15]+l[T>>16&15]+l[T>>12&15]+l[T>>8&15]+l[T>>4&15]+l[T&15]+l[Y>>28&15]+l[Y>>24&15]+l[Y>>20&15]+l[Y>>16&15]+l[Y>>12&15]+l[Y>>8&15]+l[Y>>4&15]+l[Y&15]+l[J>>28&15]+l[J>>24&15]+l[J>>20&15]+l[J>>16&15]+l[J>>12&15]+l[J>>8&15]+l[J>>4&15]+l[J&15]+l[V>>28&15]+l[V>>24&15]+l[V>>20&15]+l[V>>16&15]+l[V>>12&15]+l[V>>8&15]+l[V>>4&15]+l[V&15]),O},W.prototype.toString=W.prototype.hex,W.prototype.digest=function(){this.finalize();var B=this.h0h,p=this.h0l,L=this.h1h,Z=this.h1l,K=this.h2h,G=this.h2l,et=this.h3h,w=this.h3l,g=this.h4h,E=this.h4l,U=this.h5h,Q=this.h5l,T=this.h6h,Y=this.h6l,J=this.h7h,V=this.h7l,C=this.bits,O=[B>>24&255,B>>16&255,B>>8&255,B&255,p>>24&255,p>>16&255,p>>8&255,p&255,L>>24&255,L>>16&255,L>>8&255,L&255,Z>>24&255,Z>>16&255,Z>>8&255,Z&255,K>>24&255,K>>16&255,K>>8&255,K&255,G>>24&255,G>>16&255,G>>8&255,G&255,et>>24&255,et>>16&255,et>>8&255,et&255];return C>=256&&O.push(w>>24&255,w>>16&255,w>>8&255,w&255),C>=384&&O.push(g>>24&255,g>>16&255,g>>8&255,g&255,E>>24&255,E>>16&255,E>>8&255,E&255,U>>24&255,U>>16&255,U>>8&255,U&255,Q>>24&255,Q>>16&255,Q>>8&255,Q&255),C==512&&O.push(T>>24&255,T>>16&255,T>>8&255,T&255,Y>>24&255,Y>>16&255,Y>>8&255,Y&255,J>>24&255,J>>16&255,J>>8&255,J&255,V>>24&255,V>>16&255,V>>8&255,V&255),O},W.prototype.array=W.prototype.digest,W.prototype.arrayBuffer=function(){this.finalize();var B=this.bits,p=new ArrayBuffer(B/8),L=new DataView(p);return L.setUint32(0,this.h0h),L.setUint32(4,this.h0l),L.setUint32(8,this.h1h),L.setUint32(12,this.h1l),L.setUint32(16,this.h2h),L.setUint32(20,this.h2l),L.setUint32(24,this.h3h),B>=256&&L.setUint32(28,this.h3l),B>=384&&(L.setUint32(32,this.h4h),L.setUint32(36,this.h4l),L.setUint32(40,this.h5h),L.setUint32(44,this.h5l)),B==512&&(L.setUint32(48,this.h6h),L.setUint32(52,this.h6l),L.setUint32(56,this.h7h),L.setUint32(60,this.h7l)),p},W.prototype.clone=function(){var B=new W(this.bits,!1);return this.copyTo(B),B},W.prototype.copyTo=function(B){var p=0,L=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(p=0;p>6,et[w++]=128|g&63):g<55296||g>=57344?(et[w++]=224|g>>12,et[w++]=128|g>>6&63,et[w++]=128|g&63):(g=65536+((g&1023)<<10|B.charCodeAt(++E)&1023),et[w++]=240|g>>18,et[w++]=128|g>>12&63,et[w++]=128|g>>6&63,et[w++]=128|g&63);B=et}B.length>128&&(B=new W(p,!0).update(B).array());for(var U=[],Q=[],E=0;E<128;++E){var T=B[E]||0;U[E]=92^T,Q[E]=54^T}W.call(this,p,L),this.update(Q),this.oKeyPad=U,this.inner=!0,this.sharedMemory=L}H.prototype=new W,H.prototype.finalize=function(){if(W.prototype.finalize.call(this),this.inner){this.inner=!1;var B=this.array();W.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(B),W.prototype.finalize.call(this)}},H.prototype.clone=function(){var B=new H([],this.bits,!1);this.copyTo(B),B.inner=this.inner;for(var p=0;p1024||e%1||e!=e)&&mg.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return md.getRandomValues(t),D3(t)}/** + * @module @semaphore-protocol/identity + * @version 3.10.1 + * @file A library to create Semaphore identities. + * @copyright Ethereum Foundation 2022 + * @license MIT + * @see [Github]{@link https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity} +*/var DA={};const NA=BigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"),CV=8,p4=[56,57,56,60,60,63,64,63,60,66,60,65,70,60,64,68],g4=e=>{let t=e*e;return e*t*t%NA};function SV(e,t){const n=[];for(let r=0;rBigInt(l));if(n.length<=0)throw new Error("poseidon-lite: Not enough inputs");if(n.length>p4.length)throw new Error("poseidon-lite: Too many inputs");const r=n.length+1,i=CV,o=p4[r-2],{C:a,M:s}=t;if(s.length!==r)throw new Error(`poseidon-lite: Incorrect M length, expected ${r} got ${s.length}`);let u=[0n,...n];for(let l=0;l=i/2+o||c===0)&&(u[c]=g4(u[c]));u=SV(u,s)}return u[0]}var UA=FV,A0={};Object.defineProperty(A0,"__esModule",{value:!0});A0.default=yg;function yg(e){if(Array.isArray(e))return e.map(yg);if(typeof e=="object"){const r={};for(const[i,o]of Object.entries(e))r[i]=yg(o);return r}const n=[...Uint8Array.from(atob(e),r=>r.charCodeAt(0))].map(r=>r.toString(16).padStart(2,"0")).join("");return BigInt(`0x${n}`)}var x0={};Object.defineProperty(x0,"__esModule",{value:!0});x0.default=void 0;var IV={C:["CcRunsaOm9T+H6q6KUy6OKcaoXdTTN0bbH3A29Cr16c=","DANWUwiW7sQql+2TfzE1z8UUKzrkBbg0PB2D/6YEy4E=","Hiih2TVpitEULlEYK7VM9KAOpaq9Ymi9MX6pd8wVSjA=","J68tgxqdJ0gICWXbMOKY5A5XV8PgCNuWTPnisSuRJR8=","Hm8RzmD8j1E6ajz+Fq4XWkEpFGLyFM0Iear0NUW3TgM=","Kmc4TTu9XkOFQYGctoHwvgRGLtFMNhPY9xkgYmjRQtM=","C2b981YJOmEWCfjhL7/s8LmF44HwJRiJNkCPXVyfRdA=","AS7j7B541HCDDGEJPCreNwsmyDzFzr7t2qaFLb2wniE=","AlK6X2dgv739iPZ/gXXj/WzRxDGwmba7LRCOe0Rbsbk=","F5R0zOyl/2dsa+w871QpY1Q5Gok1/3HW71rqrXypMvE=","LCQmE3mlG/qSKP9KUD/U7Zwfl0omSWmzfholibvtK5E=","HMHXtiaS5j6sLyiL0GlbQ8L2P1AB/A/FU+ZsBVGAGwU=","JVBZMBqtqYuy7VX4UpeelgB4Tb8X+6zQXZ7/X9nJG1Y=","KEN746wcsuR54fXA7M0ys66iQjSXCoGTsRwpzn5Z79k=","KCFqRC8uH3EcpPprU3ZusRhUjaj7T3jUM4diw39fIEM=","LB9HzRf6Wt8fOfTnBW3QP+7h784DCUWBEx8jdzI0gsk=","B6utArel68SGMrzJNWzrfdna/KJ2Y4pjZGuFZqYhr8k=","AjAmRgH/3yknWzP/qrUd/pQp+QiAppzRN9oMTRX5bDw=","G8lzBU5R2QWg8WhlZJfKQKhkQUVX7iiecX5dZomaoKk=","Lhwi+WRDUAggbDFX6GNB7dJJr/XC2EIfKmsiKI8KZ/w=","EiTzjfZ8U3gSHB1fRhu8UJ6OoVmORsn3pwRSvCu6hrg=","AuTmnYulnlGSgLS9ntAGj9e/6M2d/toZadKYkYbN4g4=","Hx7Mw0qroBN/XfgfwE/z7k8Z7jZOZT8HbUfpc12YAY4=","FnKtPXCaNTl0JmwwOamnMRQkRIAyzRgZ6suKTUKE9YI=","KD4/3CxuQgxW9Er1GStK6c2mlh8oTSSZHS7WAt+Mj8c=","HCo9EgxVDs/Q2wlXFw+gE2g3Ufj9/1nWYU+9af85S8w=","IW+Eh3qsYXL3iXpzI0Vu/hQ6mkN3PqbylstrgXdlP70=","LA0nK+zyp1dkun6OPijRK86qR+phylmkEaH1FVL5R4g=","FuNCmYZcDihITuenTEVOnxcKVICr4FCPy0psPYlUb0M=","F1zrpZnpb1s3WiMqb7nMcXcgR3ZYAikPSM2Tl1VIj8U=","DHWURA3EjBb+rZ4XWLAoBmqkEL+8NU9U2MX/u0Sh7jI=","GjwpvDnyG7XEZtt9frb9j3YOIAE8z5EskkeYgtkZ/Y0=","DM/dkG80JuXAmG6gSbJTQAhV00kHT1pmlcjuq80i5o8=","FPa8gdnxhvYr20dc5slBGGanqKP9Bls84OaZtn3Z55Y=","CWK4J4n7PRKXAspwsvbFqswJmBDJxJXIiO3rc4a5cFI=","GogK9wdNGLO/IMed4lEnvBMoSrAe8CV1r+8Mj2oxqG0=","EMuhhBmmozLNXnfwIRwVSyCvKST8IP8/TDASu3rpMRs=","BX5iqaj4mz69x2umOp6sqPontzGcrjQGdWooSfMC8Q0=","KHyXHekdwKvUSt9ThLSYjLlhMDu/Zc/1r6BBO0QoDO4=","Id8ziK8Wh7uzvKnaDMqQjx5WK8RtSrpOb395YOMGiR0=","G+XIh9JbznA+JcyXTQk0zXid+PcLSY/YPv+LVg4WgrM=","Jo2jb3blaPtoEXF1zqLNDdLLXUL9pazqSNWcJwag1cE=","DherCR9urlDGCb6vVRDs7MXYu3QTXr0FvQZGDMJqXtY=","BNcn5yj/oKZ67lNasHSkMJHvYtjPg9JwBA9cqh9ir0A=","DdvXv5wpNBWBtUl2K8Ai7TNwKsEPG/2GKxVBfX45ym4=","J5DrM1FiF1J2gWLoKYnGwjT1sNHTr5tYiinEnIeJZUs=","HkV8YBpjtz5EcZUBk9ilcDlfPZq4sv0JhLdkIGFC+ek=","Ia5kMB3KliVjjWqyu+cTX/qQ7NDEP/kfxMaG/EbgkbA=","A3n2PIzjRo1NopMWb0lJKIVL6eNDLglVWFhTTu2NNQs=","AC1WQgNZ0CZqdEoICAngVMoOSSGkZoasjJ9YoyTDUEk=","EjFY5ZZbXZsdaLPNMuELvtqNYkWeIfQJD8LFr5Y1FaY=","C+KfxAhHqUFmHRS79svgQg+7K29Sg21OYMgOtJytnsE=","Gslpkd7CuwVXcWFCAVpFPDbbnYWcrV+aIzgC8k/fTBo=","FZZEP3Y9vMJfSWT8YdI7Pl4SyfqX8YqSUcozVbywYn4=","EuC802VL36drKGHU7Drq4PGFfZ8X5xWu1tBJ6uO6MhI=","D8krTxu+qCuepz1K+a8qUM6rrH83FUsZBObHbHz5ZLo=","H5wLFhBEZELW8uWSqAE/QLFPfHciI29PnH6WUjOHJ2I=","Dr10JErnJnX4zeBhV6eC9AUNkU2ji0wFjRWfZD279NM=","LLfw7Tnhbp9pqfr9SrlRwDsGcelzRu45eoOYOdzPxtE=","Gp1uLs/wIsxWBUQ+5BurIM52HQUUzlJmkMcrynNS2b8=","KhFUOWB/M1peqDw7xEqTMdDBMyapp7owh9oYLWSOxy8=","I/m2UptdBA0VuPp67j40EOc4tWMFzUTylTXBFcWkwGA=","BYcsFtsPcqIkmsa6SEu5w6POl8FtWLaLJg65OfDm6Kc=","EwC97gi7eCTKIPuAEYB19AIZthUdVbXFK2JKfN7d9qc=","Gbm2PS8QjhfmOBeGOo9sKI160pkW2YyxBy5Oe31Ss3Y=","AVvuE1fjwBW1vaI3ZoUi9hPRyIcmtexCJKIBKEgbT38=","KVNzbpS7a58blwek8WFeTv4eHOS6shjL6pLHhbEo/9E=","CwaTU7oJFhiGL4BhgMA4X4UbmNNytF9UTOcmbtZgjfw=","ME901GHMwTEV5OC8+5OBflWut+uTBrZOT1iKyX2B9Ck=","FbvxRs6bygnooz9ed9/k9arSoWSkYXpMuO5UFc3pE/w=","CrTf4MJ0LN5EkBAxSHlk7ZuPS4UEBcEMqf8jhZVyyMY=","DjLbMgoETjGX9F92SaGWde9e7f6lRt6pJR3jn5Y5d5o=","ChdWqh83jKSydjWni2iI5meXczqCd0iWoweO+lFtoBY=","BExKM7EPaTRH/RcXf5Uu+JXmHTKPhe+pQlTWoqJdk+8=","LtNhG3JbinC+ZVtTf2b3AP4IedeaSWiR03sHtUZsS4s=","H5uk6Lq3zkLI7MPXIqouDq3965z900e12DOepxIIWKo=","GyMwQwUujCiPfukHqE5RiqOOgqxFAgZtt0BW+GXF09o=","JDHhzBZLuNB0Axq3K9VbTJAgU7/A8U2wyi+XsCCHWVQ=","CC+TTJH1qsMwzWlToKfbRaE+MiCXWDMZp5Hyc5ZYAf0=","K5oKIj51OLCjS+B0MVVCo8dyReKufL6Zmta7kwxImXw=","DhzZHt0s+izOuFSDuIepvoFkFj51qKAOsLWJzHAhTn0=","Lh6sDyv9/WPJUfYUd+NpiZl3TxmFTQD1iNMkYBzr4vk=","DL+pXzf7dAYMdhWOdp1tFXNFeE2O/bM8I9dIEVtQC4M=","CPBbO+kj7UTWWtSdimHppnbZkeOndRPZmAwjLfpKT4Q=","InGeKgcLzQhSv44hmE0EQ+coSSXcB1ijJaLdUQwEfvY=","BB9Zap7hyyvAYPf8w6GrTHvb8DYRmYLA9B9isvJoMMA=","Iz/TXeG+UgqHYo6wb2sdTAIb4cLQ3EZKGfzdCYaxD4k=","BSS0bRqoel5DJeCkI+vIENMeB4qhtHB+78tFPGHJwmc=","LDT0JMgeVxbOR/ysiUuFgkInu5VLDzGZzESGI3xRUhE=","C18qS2M4eBkgfv/CtVQfty3SAltUV8yX8zAQMn3kkV4=","IiB4VggszFTFty/kOdLP1sF0NdL1evbOrvrEH+BcZZ8=","JNV6i/XaY/5OJBWbf4lQtc37IQGUyvefJ4VASM4sgXE=","Cvqxgf3V4Fg7Nx11vWk/mDdK1wl7sBqFc5Gbsjt5OW4=","LbqbEI8gh3KZilLvrHy9VnbABXGUwWwL8WKQ1isRKO4=","JjSbZu24sW9W+IHHiPU/g8u4PeC9WSslWv8T5rzkILM=","Ja984OXhA1doXpX5Izl1OtgaVtKOzBk7I1KIo+bxN9s=","JbTOe9IpQ5DAlNalXt1ouXDu16roiyv/H3wBh/41AR8=","IsVD8Q9siew4flPxkIqI5d6c7yjr3zCxjLnVTB4CtjE=","Ajb5PneJxHJPx5CKnxkeHkJekGqRnXo032aOdIgvh6k=","KTULQBFmygEOfSfjfQXamWUr2uEU6wFlnLSXr5gMS1I=","Du14fWWCDT9r0xu6tUf3WmXtt12ETruJ7hJgkWZSNj8=","B8wRcPE7RvIDanU/Ugsykf3NDpm9lCl9GQb2VvTeb60=","Irk5IzsdcgX0m89hOj0wsZCHhtf59dEMIFlDVonorOo=","AUUXYqCquByKrR3IvDPocHQPCDpaqFQ4rdZQrOYK5aY=","I1BrtdhyfURh+r8QJdRtH+MuqmHex9pX5wT+wIkvzok=","LkhMROg4rqC6wGrj9xvdCSo3CVMeHv6pf4vWiQc1VSI=","D0vH0H66/WQ3nnjFC9LkK69KWUVFztwlRUGNomg1tUw=","H008j2WD6eX6dmN4Yvqu6FFYI4hyXfRg5iCZbVDY504=","CTUU4McHEfgmYNB74OSpiPrgKrx7aB2RU+uby0j+c4k=","GtqwyOKzutNGaZorXzvANkPug+zkcijySljgo0fhU9g=","FnKxcmBX2Z3RRwnrtHRkGjeMG5S4ByusGiLb756A2tI=","Hf1T1Fdq8uOPRPU/3KtGjMXY4vrgrMTuMNR7I5tHnBQ=","DGiIoQt1sPOnCjYmOjfhf+bXfWQPb8PevH8gd1MgXGA=","Gt25M6Zb53CSs0p+d9Ev6GEaYeAO5oSLhQkezKnR5Qg=","ANdUDc0mioRcEK4Y0d6TPPY4/1Ql8K//eTVijimdF5E=","FAwOQmh+nq0BsoJ6VmTKnCb+3eSs2Z2x0xaTnSC4LA4=","Lww6EV1DF9GRuom40T0YBsIKD5sk+MXtwJHirlZWWYQ=","DE7neP98FFUwBu0iDPnIEAigz/ZwsiuC2MU4odyVjGE=","FwTydm1G+Cw2k/AEQMzDYJQk7SbArMZiJ8PXSF3nTGk=","Ly0ZzD6l146noCwbUdJEq/B2nJ+FROQCObZv6QCcPPo=","GuA4U7dfyrpQU/ES4qjo3N1+5suc/tnH1sdmqAb8Zik=","CXGqv3lSQd9R0THQ+mGqXzVWkhstbwFOTkGobdrwVtU=","FAjDFuYBThqR1M9rbg3nPtpiT4OA3xyHX1wp97/i9kY=","Fmfz/i7b6FAkir5CtUMJO2yJ8fdz7yhTQWkfOYIu9b0=","E798XQ0sQ3akiwoDVXzfkVuBcYQJ5cEzQkxpV2UA/jc=","B2IKbfsLbOwwFq3z01M8JAJLlTR4VreXGbwLp0OmLCw=","FXTH7wxDVF82qMoIvb3YsHXSlZ4vMitzFnXePhmCtNA=","Jp5LW3oushr9VnlwpxfO7FvUGEVxwlT9wG4Dp/+DePA="],M:[["Bm9vhdb2ioXsEDRTUaI6Oq8H84r4yVKnvOynC9KvetU=","K51LQRDJrpl3guFQmx0P2yCnwCu9i+pzBUYrn4Elseg="],["DMV827CFB9Yr9npEk8wmL7bAnVVwE//x9XP0MSIfj/k=","EnTmSaMu01WjGm7WlyThra3oV+hutcOhIbzRR5QyA8g="]]};x0.default=IV;Object.defineProperty(DA,"__esModule",{value:!0});var np=DA.poseidon1=MV,EV=$3(UA),BV=$3(A0),kV=$3(x0);function $3(e){return e&&e.__esModule?e:{default:e}}const PV=(0,BV.default)(kV.default);function MV(e){return(0,EV.default)(e,PV)}var $A={},L0={};Object.defineProperty(L0,"__esModule",{value:!0});L0.default=void 0;var TV={C:["DumlkrqalRjQWYbWVvQMIRTEmTwRuymTjSHUcwTNjm4=","APFEUjXyFIxZhlhxafwbzYh7CNTQCGjfVpb/9AlW6GQ=","CN/zSH6KyZ4fKaBY0PqAuTDHKHMLerNs6HnziQ7Pc/U=","Lye+aQ/a7kbDzij3UysTyFbDU0LIS9puIJZjEPrcAdA=","KyrhrPaLe40kFr6/PU9iNLdj/gS4BD7ki4MnvryhbPI=","AxnQYgcr737MperAb5fU1VlSwXWrawPq5ktEx9vxHPo=","KIE9yuuuqoKKN234evSmO8i3vyetScYpjvezh78oUm0=","JydnOyzLyQPxgb844cHUDSAzhlIAw1K8FQkord35y3g=","I07EXKJ3J8LnSr0rKhSUzW771D40BYfWuPueMeZcxjI=","FbUlNAMa4Y9/hiyyz3z3YKsQqBUKM3sczZn/boeX1Cg=","Dcj61tnks19e2aPRhrec444Oio0bWLEy1wHU7s9o0fY=","G82V/8IR+8pgD3BfrT+1Z+pOs3j2Lh/sl4BVGKR+TZw=","EFILCrchyt/p7/gbAW/DTcdto2wleJN4F8uXjQad5Vk=","H21IFJuOf32bJX2O1fu69CkySYB1/tCs6IqeuB9WJ/Y=","HZZV9lIwkBTSngDvNaIIm//43ByBbw3JyjS9tUYMhwU=","BN9aVv+VvK+wUfexzUOpm6cx/2fkcDIFj+PUGFaXzH0=","BnLZlfj/9kAVGz0pDO2vFIaQoQqMhCSn9uwoK25L6Cg=","CZlStBSIRFSyEgDX/6/dXwyancwG8nCOn8HYIJtcdbk=","BSy6IlXf0Ax8SDFDuo1GlEjkNYaptM2Rg/0OhDprn6Y=","C4ut7mkK246wvXRxK3mZr4LeVXByUa13Fgd8uTxGTdw=","EZsVkPEzB69aHuZRAgwHx0nBXWBoOoBQuWPQqOSyvdE=","AxULfNbV0XslKdNr4PZ7gyxKz8iE707lzhW+C/tKjQk=","LMYYLF4UVG488ZUfFzkSNVN077g9gImKvmnLMXyepWU=","AFAyVR5jeMRQz+EppASzdkIYyt7awU4rktLNcxEb8Pk=","IzI34yibqjS7FH6XLry5UWRpw5n8wGn7iPnaLMKCdrU=","Bcj09OvUpuPJgNMWdL++YyMDfyGzSuWk6AwtTCTWAoA=","CnsdsTBC05a6BdgYoxnyUlK8817zru2R7h8JslkPxls=","KnO3H5shDPWxQpZXLJ0y2/FW4rCG/0fcXfVCNlpATsA=","GsmwQXq8yaGTUQfp/8kdw+wY8sTb5/Ipdqdgu1xQxGA=","EsAzmuCDdII/q7B2cH70eSafPk1ssQQ0kBXuBG3JP8A=","C3R1sQKhZa1/WxjbTh5wT1KQCqMlO6rGgkZoLlbpoo4=","A3woSeGRyj7bHF5J9ui4kXyEPjeTZvLqMqs6qI1/hEg=","BaaBH4VW8BTpJnRmHiF+m9UgbFyToH3BRf2xdqcWNG8=","KaeV59mAKJRulHt11U6fBEB26Hp7KIO0e2de9fOL1m4=","IEOaDISzIutFo4V6/Bj1gm6Mc4LIoVhcUHvhmZgf0i8=","Lguo2U2ez0qU7CBQxzcf8btQ8neZqEttSipvKgmCyIc=","FD/RFc4I+yfKOOt8zoIrRReCLNIQkEjS5tDdzKF9ccg=","DGTL7LHHNLhXlo273PgTzfhhFlkyPby/yEMjYjvpyvE=","AoowWEfGg/ZG/KklwWP/WudPNI1iwrZw8UJs75QD2lM=","Lk71EP8Lb9pfqUCrTEOA8mpry2TYlCe4JNZ1W1254ww=","AIHJW8QzhOZj15JwyVbOO4kltPbQM7B4uWOE9QV5QA4=","LtXwyRy9l0kYfi+t5ofgXuJJGzScA5oLuoqfQCOguzg=","MFCZkfiNo1BLvzdO1ari8DRIoix2I0yMmQ8B8zpzUgY=","HD8g/VVAmlMiG3xNSaNWufChEZ+yBntBp1KQlEJOxq0=","ELTn86td8AMElRRFm24Y7sRrsiE+jhMeFwiHtH3cuWw=","KhmCl5w/9/Q93VQ9iRwqvd2A+ATAd9d1A5qjUC5Dre8=","HHTuZPFeHbb+3b6tVtbVXbpDHrw5bJr5XK0PExW9XJE=","B1M+yFC6f5jquTA8rOAbS55PLouCcIz6nC/kWgrhRqA=","IVdrQ45QBEmhUeTurxexVChcaPQtQsGAihGr83ZMB1A=","LxfAVZuP55YIrVyhk9YvELzoOEyBXwkGdD1pMINtSp4=","LUd+OGLQdwinnoqulGFwvJd1pCATGEdK5mWwsbficw4=","Fi9SQ5ZwZMOQ4JVXeYTyka+6ImbDj1q82Jvg9bJ0fqs=","K0yyM+3pukgmTs0siuUNGteoWWqH8p+Kd3enAJI5MxE=","LI+8st2Fc9wduvj0YihUd22y7s5thcTPQlTnw14DsHo=","HW80dyXkgWry/0U/DNVrGZ4bYen2Aemt5eiNuHCUnak=","IEsMOX9OvnHrwtiz31uRPfnmrAK2jTEyTNSa9cRWVSk=","DEy53DxP2BdPEUmzxjw8L57LgnzX3CVTT/j7dbx5xQI=","F0rWGhRIyJmiVBZHT0kwMB5cSUdSeeBjmmFt3EW8e1Q=","GpYXe89NjYn3Wd9OwvPN4uqqKMF3zA+hOpgW1Jo40u8=","Bm0EskMx1xzQ74BUvGDE/wUgLBJqIzwagkKs42C4owo=","KkxPxuwLDPUhlXgoccbdOzgcxl9y4CrVJwN6Yqob2AQ=","E6stE2zPN9RH6fLhSnztyV5yf4RG9tnX5Vr8ASGf1kk=","ESFVL8omBhYZ0k2EPcgnacGwT87Cb1UZTC4+hprMapo=","AO9lMyKxPWyIm8gXFcN9d6bNJn1ZXEqJCaVUbHyXz/E=","DiVIPkWmZSCLJh2Lp0BR5kAMd21lJZXZhFrKNdijl9M=","KfU23LnddoIkUmRlnhXYjjlaw9Td6S2MRkSNuXnuuok=","KlbvnyxT/rrf2jNXXb29iFoSTieAu+oXDkVrqs4Ppb4=","HINhx461z13s+3otF7XECfKuKZmkZ2Lo7kFiQKjLmvE=","FRr/XziyCg/ARzCJqvAga4Po5op2RQe/09CrS+dDGcU=","BMYYfkHtiB3BsjnIj3+dQ6n1L8jIts3R525HYVtR8QA=","E7N72A9NJ/sQ2EMx9vttU0uBxh7RV3ZEnoAbfdycKWc=","AaXFNic8LZ31eL+9MsF7eizjZkwqUgMskyHOscToqOQ=","KrNWGDTKc4Na0F9desuVC0qaLGZrlybagyI5Blt8OwI=","HU2OwpHnINsgD+bWhsDWE6yvavTpXTv2n37VFqWXtkY=","BBKU0sxITSKPV4T+eRn9K7klNRJAoEtxFRTJyAtlrx0=","FUrJjgFwjGEcT6cVmR8ASJj1eTnRJuOSBClx3ZDoH8Y=","CzOdisyn1Pg+7dhAk671EFCzaEyI+LCwRSRWO8bqTaQ=","CVXknmYQyUJUpPhM+6s0RZjw5x6v9Kfdge2VtQg5yC4=","BnRqYVbrpUQmueIiBvFavKmm9B5vU1xvNSVAHqBlRiY=","Dxj1oOzRQjxJbzggxUnCeDjleQ4r0KGWrJF8f/Mgd/s=","BPbuyhdR9zCKxZ7/W+smHku1Y1g+3nvJKnOCI9b3bhM=","K1aXM2TExPXBo+xNo83OA4gR6xFvs+RbwXaNJvwLN1g=","Ejdp3UnVsFTc12uJgEsby44TkrOFcWpdg/62XUN/Ke8=","IUe0JPxIyAqI7lK5EWmqzqmJ9kRkcRUJlCV7L7AcY+k=","D9wfWFSLhXAabFUF6jMqKWR+bzStQkPC6lStiXzr5U0=","Ejc6glH+oATfaKvPD3eG1Lzv8oxdu+DDlE9oXMCgsfI=","IeT06l81+FutfqUv90LJ6KZCdWtq9EID3YofNcGpADU=","FiQ5FtadLKPftHIiJNTEYrVzZkkvRekNioGTTxvDsUc=","HvvkbdeleLT2b5rbyItDeKvCFWbhoEU8oTpBWcrASsI=","B+pehTfPXdCIhgIOI6fzh9Ro1VJb5m+FO2csyWqIlpo=","BajE+ZaLiqO3tHijD5pbY2UPGadefOEcqf4WwLdsALw=","IPBXcSzCFlT7/lm9NF6NrD94GMcBuceILZ1Xtyoy6D8=","BKEu3tqd/WiWcvjGf+4xY23NjojQHUkBm9kLM+sz22k=","J+iNjBXzfc7kTx5UJaUd7L0TbOUJGmdn5J7JVEzNEBo=","L+7Re4QoXtm4pcjF6VpB9m4JZhmncDIjF2xB7kM95NE=","HtfMdu30XHxAQkFCD3Kc85TllCkRMSoNaXK4vVOv8rg=","FXQumbm/oyMVf/jFhvVmDqxng0dhRM3K3yh0vkVGaxo=","GqwoU4f2XoLIlfxoh930BXcQdFTG7AMXKE8DPyfQx4U=","JYUcPIRdR5D53a29tgVzV4MuLnpJd19x7HWpZVTWfHc=","FaWCFWXMLsLOeEV9sZft81O367osVSM3DdzMPZ8Uamc=","JBHVekgTuZgO+n4xodtZZtz2TzYEQndQLxVIXyjHFyc=","AC5vjWUgzUcT4zW4wLbS5kfpqY4S9M0lWIKLXvbLTJs=","L/e8j0OAzemX2gC2FrD80a+PDpHi/h7XOYg0YJ4DFdI=","ALmDG5SFJVle4CckRxvNGC6VIfa3u2jx6Tvk/rsNPL4=","Ci9TdouOv2qGkTsOV8BOARykCGSKR0OofXetvwycNRI=","ACSBVhQv0Dc6R5+R/yOelg9Zn/fpS+abfyopAwXhGY0=","Fx1WILh7+xMoz4wCqz8MmjlxlqpqVCwjUOtRKisrzak=","FwpPVVNvfclwCHx8ENb612DJUhct1U3ZnRBF5Ow0qAg=","KaujP3mf5mwu8xNK6gQzbsw344wc0hG6SC7KF+Lb+uE=","HpvBeaT911j90bsZRQiNR+cNEUoD9qDotbplA2nmSXM=","HdJpeZtmD61Y9/SJLfsLWv6q2GmpxLRPnJ4cQ72vjwk=","Is28i3ARetFAEYHQLhVFnnzNQm/oacfJXR3Syw8krzg=","DvBC5FR3HFM6n1elXFA/zv0xUPUu2Up81bqTucfazv0=","EWCeBq1sj+Lyh/MDYDfohRMY6LCKA1mgOzBP/KYugoQ=","EWbZ5VRhbbqedT7qQnwXt/7NWMB23+QnCLCPW3g6qa8=","LeUpiUMahZWTQTAmNUQT2xd/v0zSrAtW+FWoiDV+5GY=","MAbrT/x6hYGabaSS86isHfUa7lsXuOiddL8Bz19x6a0=","KvQfu2G6ioD9z2//nj9vQimT/o8KRjn5YjRMgiUUUIY=","EZ5oTeR2FV/lprQajryF24cYqyeInoXngbIUus5IJ8M=","GDW3huLokl4Yi+pZrjY1N7USSMI4KPBHz/eEuXs/2AA=","KCAaNMWU36NNeUmWxkM6INFSusKnkFySbEDihasy7rY=","CD79eifRdRCU6A/vr3iwAIZMgutXEYdySnYfiMIsxOc=","C2+Io1dxmVJhWOYc7qJ76BHBbfd3TdhRngeVZPYf0Ts=","Dsho5tFeUdlkT2bh1kcalFiVEcoA0p4QFDkObuQlT1s=","KvM+P4ZncScawMmz7S4RQuzT50uTnNQNANk3q4TJhZE=","C1ICEfkEtefQm12WHGrOdzRWjFR91oWLNkzl5HlR8Xg=","Cy1yLQkZoarY21jxAGKpLqDFasQnDoIsyiKGIBiKHUA=","H3kNTX+M8JTZgM6zfCRT6Ve1SpmRyji74AYdHtblYtQ=","AXHrld+/fR6uqXzThfeAFQiFwWI1oqao2pLOsB5QQjM=","DC0OO1/VdUkym/aIXaZrm3kLQN79LIZQdiMFOBsWiHM=","EWL7KGicJxVOWoIotOcrN3y8r6WJ4oPDXTgDBUQHoY0=","LxRZtl3uRBtkrThqkegxDygsWpKonhmSFiPvgklxG8A=","Hm/zIWtojD2ZbXQ2fVzUwbxInUZ1TrcSwkP3DRtTz7s=","AcqL5zgyuNBoFIfSfRV4AtdBpvNs3CoFdogfkyZHiHU=","H3c1cG/+n8WG+XbVvfIj3GgChggLEM6gC5td4xX5ZQ4=","JSK2D06jMHZAoMLc4EH7qSGsEKPV8JbvR0XKg4KF8Bk=","I/C+4AGxAp1SVQdd3JV/gzQYytT1K2w/jOFsI1VyV1s=","K8Gui43buB/KrC1EVV7VaF0UJjPp35BfZtlAEJMILVk=","D5QGuCllZKNzBFB7jbo+0WI3EnOgex/JgBH81q1yIF8=","I2Co6wzH3vpntymY3pBxThfnWxdKUu5KyxJsjNmV8Kg=","FYcaXN3q2XaATIA8uu8lXrSBWl6W34sAbcu8J2f4iUg=","GTpWdmmY7p4KhlLdLzsdoDYvT1T3I3lUT5V8ze77Qg8=","KjlKQ5NPhpgvm+Vv9PqxcDsuY8itM0g05DCYBed3rg8=","GFmVTP64aV8+i2NdyzRRkoks0RIjRDuntBZuiHbA0UI=","BOEYF2MFDlgBNETby5nxkCsRvCXZC73KQI04GfT+0ys=","D9slPe6Dhp1AwzXqZN6MW7EOuC2wi16LH15VUr/QXyM=","BYy+ippQJ72qTvtiOt6tYnXwhobxwImEqdfFuum08cA=","E4Ltzplx4YZJfq2xrrH1KyO0uDvvAjqw0VIotMzspZo=","A0ZJkPBFxu4IGcpR/RGwvn9huOuZ8Ut34eZjRgHZ6LU=","I/e/yHINwpb/8ztB+Y/4PG/KtGBdsutaqlvBN663Clg=","ClmhWOPuwhF+bpTn8OnezxjD/9XhUxqSGWNhWLuvYvI=","BuxUyAOBwFK1i/I7MS/9POLE66BlQgr49MI+0Adf0Hs=","EYhy3IMuDrVHa1ZkjoZ+yLCTQPenvLG0li8P+e0fnQE=","E9afoSfYNBZa1cfLp61Z7VLgsPDkLX/qleGQa1IJIbE=","FpoXf2PqaBJwscaHenPSG94UOUL7cdxV/YpJ8Z8Qx3s=","BO9RWRxurZfvQvKHrc5A2Tq+sDK5IvZv+36aWnRQVE0=","JW4XWh3AeTkOzXynA/suOxnsYYBdTwPO1fRe5t0Paew=","MBAtKGNqvV/l8q9BL/YAT3XMNg0yBd0toAKBPT4s7rI=","EJmOQt/NO78cBxS8c+sb9ARDo/qZvvSjH9Mb4YL8x5I=","GT7djp/PPXYl+n0ktZih2J8zYur01YLv7K12+HnjaGA=","GBaK/TTy2RXQNozoC3szR9HHpWHOYRQl8mZNeqUfC10=","KTg8AevTtqsMAXZW6+ZYtqMo7He8M2JuKeLpWzPqYRE=","EGRtLyYD3jmh9K5ed3GmSnAttuhvt2q2AL9XP5AQxxE=","C+teB9GycUX1dfE5WlW/Ey+QwltA2ns4ZNAkLcsRF/s=","FtaFJSB4wTPcDT7K1itciDD5W7LlS1mr3/vwGNlvozY=","Cmq9HYM5OPM8dBVOBAS0tApVW7vsId36/Wct1iBH8Bo=","GmefXTbre1yOoSpMLe3I/rEt/+7EUDFycKbxmzTPGGA=","CYD7IzvUVsI5dNUODr/eRyakI+raTo9v+8dZLj8bk9Y=","FhtCIy5huEy/GBCvk6OPwM7OPVYoySggA+ustcMSxys=","CtoQqQx/BSCVD31Hpg1eakk/CXh/FWTl0JID20feGgs=","GnMNNyMQuoIyA0WimsQjjtPweoorThIbtQ3bmvQH9FE=","LIEg8mjvBU+BcGTDad2n6pCDd/6rpcTf+9oQ71joxVY=","HHyIJPdYdT+lfAB4nGhCF7kw6VMTvLc+bnuGSaSWj3A=","LNntMfX4aRyOOeQHenT6oPQArYtJHrP3tHsn+j/Rz3c=","I/9PnUaBNFfPYNkvV2GDmaXgIqwyHKVQhUriORiiLuo=","CZRaXRR6T2bO7OZAXd3Z0K9aLFEDUpQH3/HqWPGAQm0=","GI2cUoAl1MK2dmDGt3G5D3x9puqinT8mim3SI+xvxjA=","MFDjeZZZa3+B9oMRQx2HNNun2SbTYzWV4MDY3fTw9H8=","Fa8RaTloMKkWAMqBAsNcQmzq5UYeP5XYnYKVGNMK/Xg=","HabQmIVDLqmgbZ83+HPZhdrpM+NRRmspBChNozINisw=","J5bqkNJpryn1+KzzOSESTk5PrT2+ZYlF5UbuQR3aqcs=","IC190doPa0sDJcizMHdC8B4VYS7I6TBKfLAxngHTLWA=","CW1nkNBbt1kVapUromPWcqLX+ceI9Mgxop2s5MD4vl8=","BU76H2Ww/OKDgIllJ12He0ONojzlsT4ZY3mMsUR9JaQ=","GxYvg9kX6T7bMwjCmALeudiqaQETsuFIZMz24Y5BZfE=","IeUkHhJWTdb9nxzdKg3jnu3+/BRmzFaOxc63RaBQbtw=","HPtWYujPWskiaoDuF7Nqvstzq1+H4WGSe0NJ4Q5L3wg=","DyEXfjAqdxu65tjR7LNztiyZrzRiIKwBKcU/Zm6yQQA=","FnFSI3RgaZKv+w3X9xsSvsQjau3mKQVGvO9+H1FcIyA=","D6PsW5SIJZwutM8kUBv62b4uyeQsXMjM1BnSppLK2HA=","GTwOBOC9KYNXyyZsFQYIDtNu3OhcZIzAhejFexq1S7o=","ECrfjvdHNaJ+kSgwbcvDyZ9vcpHNQGV4zhTqKtq6aPg=","D+CveFjkmFnipU1vGtlFsTFqokv73SOuQKbQy3DD6rE=","IW9nF7vH3tsIU2oiIIQ/Ti2l8dqp69796KXqc0R5jSI=","HaVcyQDw0h9KPmlDkZGKGzwjsqx3PGs++I4uQigyUWE="],M:[["EJt/QRug5MmytwyvXDansZS+fBGtJDeL/ttoWSuoEYs=","Fu1B4Tu5wMZq4RlCT928vJMU3J/b3upV1sZFQ9xJA+A=","K5C7oA/KBYn2F+fcv+guDfcGq2QM6yR7eRqTt042c20="],["KWnyfu0xpIC5w2x2Q3nbyizI/dFBXD3e1ilAvN4L13E=","LiQZ+ewC7DlMmHHIMpY9wbiddDyMe5ZAKbIxFoex/iM=","EBBx8AMjebaXMVh2aQ8FPRSNThCfX7BlyKrMVaD4m/o="],["FDAh7GhqPzMNX55lRjgGXObNeeKMWzdTMmJE7mWhsac=","F2zAKWla0CWCpw7/CKb9mdBX4S5Y59e2sWzfq8juKRE=","GaP8ClZwK/QXun/uOAJZP6ZERwMHBD93cyec1x0l1eA="]]};L0.default=TV;Object.defineProperty($A,"__esModule",{value:!0});var rp=$A.poseidon2=NV,OV=j3(UA),RV=j3(A0),zV=j3(L0);function j3(e){return e&&e.__esModule?e:{default:e}}const DV=(0,RV.default)(zV.default);function NV(e){return(0,OV.default)(e,DV)}function UV(e,t,n){if(typeof e!==n)throw new TypeError("Parameter '".concat(t,"' is not a ").concat(n))}function m4(e){return e===void 0&&(e=31),Ke.from(LV(e)).toBigInt()}function $V(e){try{return Array.isArray(JSON.parse(e))}catch{return!1}}var jV=function(){function e(t){if(t===void 0){this._trapdoor=m4(),this._nullifier=m4(),this._secret=rp([this._nullifier,this._trapdoor]),this._commitment=np([this._secret]);return}if(UV(t,"identityOrMessage","string"),!$V(t)){var n=wV.sha512(t).padStart(128,"0");this._trapdoor=BigInt("0x".concat(n.slice(64)))>>BigInt(3),this._nullifier=BigInt("0x".concat(n.slice(0,64)))>>BigInt(3),this._secret=rp([this._nullifier,this._trapdoor]),this._commitment=np([this._secret]);return}var r=JSON.parse(t),i=r[0],o=r[1];this._trapdoor=Ke.from(i).toBigInt(),this._nullifier=Ke.from(o).toBigInt(),this._secret=rp([this._nullifier,this._trapdoor]),this._commitment=np([this._secret])}return Object.defineProperty(e.prototype,"trapdoor",{get:function(){return this._trapdoor},enumerable:!1,configurable:!0}),e.prototype.getTrapdoor=function(){return this._trapdoor},Object.defineProperty(e.prototype,"nullifier",{get:function(){return this._nullifier},enumerable:!1,configurable:!0}),e.prototype.getNullifier=function(){return this._nullifier},Object.defineProperty(e.prototype,"secret",{get:function(){return this._secret},enumerable:!1,configurable:!0}),e.prototype.getSecret=function(){return this._secret},Object.defineProperty(e.prototype,"commitment",{get:function(){return this._commitment},enumerable:!1,configurable:!0}),e.prototype.getCommitment=function(){return this._commitment},e.prototype.toString=function(){return JSON.stringify(["0x".concat(this._trapdoor.toString(16)),"0x".concat(this._nullifier.toString(16))])},e}();const VV=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function C0(e,t){if(!t||t==10)return BigInt(e);if(t==16)return e.slice(0,2)=="0x"?BigInt(e):BigInt("0x"+e)}const Aa=C0;function qV(e,t){let n=BigInt(0);t=BigInt(t);for(let r=0;r>BigInt(t)}const GV=VA,HV=V3;function KV(e){return(BigInt(e)&BigInt(1))==BigInt(1)}function YV(e){let t=BigInt(e);const n=[];for(;t;){if(t&BigInt(1)){const r=2-Number(t%BigInt(4));n.push(r),t=t-BigInt(r)}else n.push(0);t=t>>BigInt(1)}return n}function ZV(e){let t=BigInt(e);const n=[];for(;t;)t&BigInt(1)?n.push(1):n.push(0),t=t>>BigInt(1);return n}function qA(e){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(e)}function XV(e,t){const n=[];let r=BigInt(e);for(t=BigInt(t);r;)n.unshift(Number(r%t)),r=r/t;return n}function JV(e,t){return BigInt(e)+BigInt(t)}function tq(e,t){return BigInt(e)-BigInt(t)}function eq(e){return-BigInt(e)}function nq(e,t){return BigInt(e)*BigInt(t)}function rq(e){return BigInt(e)*BigInt(e)}function iq(e,t){return BigInt(e)**BigInt(t)}function oq(e,t){return BigInt(e)**BigInt(t)}function aq(e){return BigInt(e)>=0?BigInt(e):-BigInt(e)}function sq(e,t){return BigInt(e)/BigInt(t)}function lq(e,t){return BigInt(e)%BigInt(t)}function cq(e,t){return BigInt(e)==BigInt(t)}function uq(e,t){return BigInt(e)!=BigInt(t)}function dq(e,t){return BigInt(e)BigInt(t)}function hq(e,t){return BigInt(e)<=BigInt(t)}function pq(e,t){return BigInt(e)>=BigInt(t)}function QA(e,t){return BigInt(e)&BigInt(t)}function gq(e,t){return BigInt(e)|BigInt(t)}function mq(e,t){return BigInt(e)^BigInt(t)}function yq(e,t){return BigInt(e)&&BigInt(t)}function vq(e,t){return BigInt(e)||BigInt(t)}function _q(e){return!BigInt(e)}function WA(e,t,n,r){const i="0000000"+n.toString(16),o=new Uint32Array(e.buffer,t,r/4),a=((i.length-7)*4-1>>5)+1;for(let s=0;s>5)+1;for(let s=0;si[i.length-a-1]=o.toString(16).padStart(8,"0")),C0(i.join(""),16)}function Aq(e,t,n){n=n||e.byteLength,t=t||0;const r=new DataView(e.buffer,e.byteOffset+t,n),i=new Array(n/4);for(let o=0;o0;){const c=u+l>un?un-u:l,h=new Uint8Array(this.buffers[s].buffer,this.buffers[s].byteOffset+u,c);if(c==r)return h.slice();a||(r<=un?a=new Uint8Array(r):a=new vg(r)),a.set(h,r-l),l=l-c,s++,u=0}return a}set(t,n){n===void 0&&(n=0);const r=t.byteLength;if(r==0)return;const i=Math.floor(n/un),o=Math.floor((n+r-1)/un);if(i==o)return t instanceof vg&&t.buffers.length==1?this.buffers[i].set(t.buffers[0],n%un):this.buffers[i].set(t,n%un);let a=i,s=n%un,u=r;for(;u>0;){const l=s+u>un?un-s:u,c=t.slice(r-u,r-u+l);new Uint8Array(this.buffers[a].buffer,this.buffers[a].byteOffset+s,l).set(c),u=u-l,a++,s=0}}};function Eq(e){let n,r;e&&(e.onmessage=function(c){let h;if(c.data?h=c.data:h=c,h[0].cmd=="INIT")i(h[0]).then(function(){e.postMessage(h.result)});else if(h[0].cmd=="TERMINATE")e.close();else{const _=l(h);e.postMessage(_)}});async function i(c){const h=new Uint8Array(c.code),_=await WebAssembly.compile(h);r=new WebAssembly.Memory({initial:c.init,maximum:32767}),n=await WebAssembly.instantiate(_,{env:{memory:r}})}function o(c){const h=new Uint32Array(r.buffer,0,1);for(;h[0]&3;)h[0]++;const _=h[0];if(h[0]+=c,h[0]+c>r.buffer.byteLength){const v=r.buffer.byteLength/65536;let P=Math.floor((h[0]+c)/65536)+1;P>32767&&(P=32767),r.grow(P-v)}return _}function a(c){const h=o(c.byteLength);return u(h,c),h}function s(c,h){const _=new Uint8Array(r.buffer);return new Uint8Array(_.buffer,_.byteOffset+c,h)}function u(c,h){new Uint8Array(r.buffer).set(new Uint8Array(h),c)}function l(c){if(c[0].cmd=="INIT")return i(c[0]);const h={vars:[],out:[]},v=new Uint32Array(r.buffer,0,1)[0];for(let N=0;N{n.pendingLoads.push({page:t,resolve:i,reject:o})});return n.__statusPage("After Load request: ",t),r}__statusPage(t,n){const r=[],i=this;if(!i.logHistory)return;r.push("=="+t+" "+n);let o="";for(let a=0;a "+n.history[t][r][i])}_triggerLoad(){const t=this;if(t.reading||t.pendingLoads.length==0)return;const n=Object.keys(t.pages),r=[];for(let s=0;s0&&(typeof t.pages[t.pendingLoads[0].page]<"u"||i>0||r.length>0);){const s=t.pendingLoads.shift();if(typeof t.pages[s.page]<"u"){t.pages[s.page].pendingOps++;const u=r.indexOf(s.page);u>=0&&r.splice(u,1),t.pages[s.page].loading?t.pages[s.page].loading.push(s):s.resolve(),t.__statusPage("After Load (cached): ",s.page)}else{if(i)i--;else{const u=r.shift();t.__statusPage("Before Unload: ",u),t.avBuffs.unshift(t.pages[u]),delete t.pages[u],t.__statusPage("After Unload: ",u)}s.page>=t.totalPages?(t.pages[s.page]=a(),s.resolve(),t.__statusPage("After Load (new): ",s.page)):(t.reading=!0,t.pages[s.page]=a(),t.pages[s.page].loading=[s],o.push(t.fd.read(t.pages[s.page].buff,0,t.pageSize,s.page*t.pageSize).then(u=>{t.pages[s.page].size=u.bytesRead;const l=t.pages[s.page].loading;delete t.pages[s.page].loading;for(let c=0;c{s.reject(u)})),t.__statusPage("After Load (loading): ",s.page))}}Promise.all(o).then(()=>{t.reading=!1,t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t)),t._tryClose()});function a(){if(t.avBuffs.length>0){const s=t.avBuffs.shift();return s.dirty=!1,s.pendingOps=1,s.size=0,s}else return{dirty:!1,buff:new Uint8Array(t.pageSize),pendingOps:1,size:0}}}_triggerWrite(){const t=this;if(t.writing)return;const n=Object.keys(t.pages),r=[];for(let i=0;i{o.writing=!1},a=>{console.log("ERROR Writing: "+a),t.error=a,t._tryClose()})))}t.writing&&Promise.all(r).then(()=>{t.writing=!1,setImmediate(t._triggerWrite.bind(t)),t._tryClose(),t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t))})}_getDirtyPage(){for(let t in this.pages)if(this.pages[t].dirty)return t;return-1}async write(t,n){if(t.byteLength==0)return;const r=this;if(typeof n>"u"&&(n=r.pos),r.pos=n+t.byteLength,r.totalSize0;){await a[s-i];const c=u+l>r.pageSize?r.pageSize-u:l,h=t.slice(t.byteLength-l,t.byteLength-l+c);new Uint8Array(r.pages[s].buff.buffer,u,c).set(h),r.pages[s].dirty=!0,r.pages[s].pendingOps--,r.pages[s].size=Math.max(u+c,r.pages[s].size),s>=r.totalPages&&(r.totalPages=s+1),l=l-c,s++,u=0,r.writing||setImmediate(r._triggerWrite.bind(r))}}async read(t,n){const r=this;let i=new Uint8Array(t);return await r.readToBuffer(i,0,t,n),i}async readToBuffer(t,n,r,i){if(r==0)return;const o=this;if(r>o.pageSize*o.maxPagesLoaded*.8){const _=Math.floor(r*1.1);this.maxPagesLoaded=Math.floor(_/o.pageSize)+1}if(typeof i>"u"&&(i=o.pos),o.pos=i+r,o.pendingClose)throw new Error("Reading a closing file");const a=Math.floor(i/o.pageSize),s=Math.floor((i+r-1)/o.pageSize),u=[];for(let _=a;_<=s;_++)u.push(o._loadPage(_));o._triggerLoad();let l=a,c=i%o.pageSize,h=i+r>o.totalSize?r-(i+r-o.totalSize):r;for(;h>0;){await u[l-a],o.__statusPage("After Await (read): ",l);const _=c+h>o.pageSize?o.pageSize-c:h,v=new Uint8Array(o.pages[l].buff.buffer,o.pages[l].buff.byteOffset+c,_);t.set(v,n+r-h),o.pages[l].pendingOps--,o.__statusPage("After Op done: ",l),h=h-_,l++,c=0,o.pendingLoads.length>0&&setImmediate(o._triggerLoad.bind(o))}this.pos=i+r}_tryClose(){const t=this;!t.pendingClose||(t.error&&t.pendingCloseReject(t.error),t._getDirtyPage()>=0||t.writing||t.reading||t.pendingLoads.length>0)||t.pendingClose()}close(){const t=this;if(t.pendingClose)throw new Error("Closing the file twice");return new Promise((n,r)=>{t.pendingClose=n,t.pendingCloseReject=r,t._tryClose()}).then(()=>{t.fd.close()},n=>{throw t.fd.close(),n})}async discard(){await this.close(),await Kc.promises.unlink(this.fileName)}async writeULE32(t,n){const r=this,i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,t,!0),await r.write(i,n)}async writeUBE32(t,n){const r=this,i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,t,!1),await r.write(i,n)}async writeULE64(t,n){const r=this,i=new Uint8Array(8),o=new DataView(i.buffer);o.setUint32(0,t&4294967295,!0),o.setUint32(4,Math.floor(t/4294967296),!0),await r.write(i,n)}async readULE32(t){const r=await this.read(4,t);return new Uint32Array(r.buffer)[0]}async readUBE32(t){const r=await this.read(4,t);return new DataView(r.buffer).getUint32(0,!1)}async readULE64(t){const r=await this.read(8,t),i=new Uint32Array(r.buffer);return i[1]*4294967296+i[0]}}function Mq(e){const t=e.initialSize||1048576,n=new YA;return n.o=e,n.o.data=new Uint8Array(t),n.allocSize=t,n.totalSize=0,n.readOnly=!1,n.pos=0,n}function Tq(e){const t=new YA;return t.o=e,t.allocSize=e.data.byteLength,t.totalSize=e.data.byteLength,t.readOnly=!0,t.pos=0,t}const _g=new Uint8Array(4),y4=new DataView(_g.buffer),KA=new Uint8Array(8),v4=new DataView(KA.buffer);class YA{constructor(){this.pageSize=1<<14}_resizeIfNeeded(t){if(t>this.allocSize){const n=Math.max(this.allocSize+1048576,Math.floor(this.allocSize*1.1),t),r=new Uint8Array(n);r.set(this.o.data),this.o.data=r,this.allocSize=n}}async write(t,n){if(typeof n>"u"&&(n=this.pos),this.readOnly)throw new Error("Writing a read only file");this._resizeIfNeeded(n+t.byteLength),this.o.data.set(t.slice(),n),n+t.byteLength>this.totalSize&&(this.totalSize=n+t.byteLength),this.pos=n+t.byteLength}async readToBuffer(t,n,r,i){if(typeof i>"u"&&(i=this.pos),this.readOnly&&i+r>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(i+r);const a=new Uint8Array(this.o.data.buffer,this.o.data.byteOffset+i,r);t.set(a,n),this.pos=i+r}async read(t,n){const r=this,i=new Uint8Array(t);return await r.readToBuffer(i,0,t,n),i}close(){this.o.data.byteLength!=this.totalSize&&(this.o.data=this.o.data.slice(0,this.totalSize))}async discard(){}async writeULE32(t,n){const r=this;y4.setUint32(0,t,!0),await r.write(_g,n)}async writeUBE32(t,n){const r=this;y4.setUint32(0,t,!1),await r.write(_g,n)}async writeULE64(t,n){const r=this;v4.setUint32(0,t&4294967295,!0),v4.setUint32(4,Math.floor(t/4294967296),!0),await r.write(KA,n)}async readULE32(t){const r=await this.read(4,t);return new Uint32Array(r.buffer)[0]}async readUBE32(t){const r=await this.read(4,t);return new DataView(r.buffer).getUint32(0,!1)}async readULE64(t){const r=await this.read(8,t),i=new Uint32Array(r.buffer);return i[1]*4294967296+i[0]}}const In=1<<22;function Oq(e){const t=e.initialSize||0,n=new XA;n.o=e;const r=t?Math.floor((t-1)/In)+1:0;n.o.data=[];for(let i=0;i"u"&&(n=r.pos),this.readOnly)throw new Error("Writing a read only file");this._resizeIfNeeded(n+t.byteLength);let o=Math.floor(n/In),a=n%In,s=t.byteLength;for(;s>0;){const u=a+s>In?In-a:s,l=t.slice(t.byteLength-s,t.byteLength-s+u);new Uint8Array(r.o.data[o].buffer,a,u).set(l),s=s-u,o++,a=0}this.pos=n+t.byteLength}async readToBuffer(t,n,r,i){const o=this;if(typeof i>"u"&&(i=o.pos),this.readOnly&&i+r>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(i+r);let s=Math.floor(i/In),u=i%In,l=r;for(;l>0;){const c=u+l>In?In-u:l,h=new Uint8Array(o.o.data[s].buffer,u,c);t.set(h,n+r-l),l=l-c,s++,u=0}this.pos=i+r}async read(t,n){const r=this,i=new Uint8Array(t);return await r.readToBuffer(i,0,t,n),i}close(){}async discard(){}async writeULE32(t,n){const r=this;_4.setUint32(0,t,!0),await r.write(bg,n)}async writeUBE32(t,n){const r=this;_4.setUint32(0,t,!1),await r.write(bg,n)}async writeULE64(t,n){const r=this;b4.setUint32(0,t&4294967295,!0),b4.setUint32(4,Math.floor(t/4294967296),!0),await r.write(ZA,n)}async readULE32(t){const r=await this.read(4,t);return new Uint32Array(r.buffer)[0]}async readUBE32(t){const r=await this.read(4,t);return new DataView(r.buffer).getUint32(0,!1)}async readULE64(t){const r=await this.read(8,t),i=new Uint32Array(r.buffer);return i[1]*4294967296+i[0]}}const JA=1<<16,tx=1<<13;async function ex(e,t,n){if(typeof e=="string"&&(e={type:"file",fileName:e,cacheSize:t||JA,pageSize:n||tx}),e.type=="file")return await HA(e.fileName,"w+",e.cacheSize,e.pageSize);if(e.type=="mem")return Mq(e);if(e.type=="bigMem")return Oq(e);throw new Error("Invalid FastFile type: "+e.type)}async function nx(e,t,n){if(e instanceof Uint8Array&&(e={type:"mem",data:e}),process.browser?typeof e=="string"&&(e={type:"mem",data:await fetch(e).then(function(i){return i.arrayBuffer()}).then(function(i){return new Uint8Array(i)})}):typeof e=="string"&&(e={type:"file",fileName:e,cacheSize:t||JA,pageSize:n||tx}),e.type=="file")return await HA(e.fileName,"r",e.cacheSize,e.pageSize);if(e.type=="mem")return await Tq(e);if(e.type=="bigMem")return await Rq(e);throw new Error("Invalid FastFile type: "+e.type)}async function w4(e,t,n,r,i){const o=await nx(e,r,i),a=await o.read(4);let s="";for(let h=0;h<4;h++)s+=String.fromCharCode(a[h]);if(s!=t)throw new Error(e+": Invalid File format");if(await o.readULE32()>n)throw new Error("Version not supported");const l=await o.readULE32();let c=[];for(let h=0;h"u"&&(c[_]=[]),c[_].push({p:o.pos,size:v}),o.pos+=v}return{fd:o,sections:c}}async function zq(e,t,n,r,i,o){const a=await ex(e,i,o),s=new Uint8Array(4);for(let u=0;u<4;u++)s[u]=t.charCodeAt(u);return await a.write(s,0),await a.writeULE32(n),await a.writeULE32(r),a}async function A4(e,t){if(typeof e.writingSection<"u")throw new Error("Already writing a section");await e.writeULE32(t),e.writingSection={pSectionSize:e.pos},await e.writeULE64(0)}async function x4(e){if(typeof e.writingSection>"u")throw new Error("Not writing a section");const t=e.pos-e.writingSection.pSectionSize-8,n=e.pos;e.pos=e.writingSection.pSectionSize,await e.writeULE64(t),e.pos=n,delete e.writingSection}async function S0(e,t,n){if(typeof e.readingSection<"u")throw new Error("Already reading a section");if(!t[n])throw new Error(e.fileName+": Missing section "+n);if(t[n].length>1)throw new Error(e.fileName+": Section Duplicated "+n);e.pos=t[n][0].p,e.readingSection=t[n][0]}async function F0(e,t){if(typeof e.readingSection>"u")throw new Error("Not reading a section");if(!t&&e.pos-e.readingSection.p!=e.readingSection.size)throw new Error("Invalid section size reading");delete e.readingSection}async function Dq(e,t,n,r){const i=new Uint8Array(n);GA.toRprLE(i,0,t,n),await e.write(i,r)}async function Ec(e,t,n){const r=await e.read(t,n);return GA.fromRprLE(r,0,t)}async function Do(e,t,n,r,i){if(r=typeof r>"u"?0:r,i=typeof i>"u"?t[n][0].size-r:i,r+i>t[n][0].size)throw new Error("Reading out of the range of the section");let o;return i<1<<30?o=new Uint8Array(i):o=new Iq(i),await e.readToBuffer(o,0,i,t[n][0].p+r),o}const Nq=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function rx(e,t){if(!t||t==10)return BigInt(e);if(t==16)return e.slice(0,2)=="0x"?BigInt(e):BigInt("0x"+e)}const Uq=rx;function $q(e,t){let n=BigInt(0);t=BigInt(t);for(let r=0;r>BigInt(t)}const Qq=ix,Wq=ox;function Gq(e){return(BigInt(e)&BigInt(1))==BigInt(1)}function Hq(e){let t=BigInt(e);const n=[];for(;t;){if(t&BigInt(1)){const r=2-Number(t%BigInt(4));n.push(r),t=t-BigInt(r)}else n.push(0);t=t>>BigInt(1)}return n}function Kq(e){let t=BigInt(e);const n=[];for(;t;)t&BigInt(1)?n.push(1):n.push(0),t=t>>BigInt(1);return n}function Yq(e){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(e)}function Zq(e,t){const n=[];let r=BigInt(e);for(t=BigInt(t);r;)n.unshift(Number(r%t)),r=r/t;return n}function Xq(e,t){return BigInt(e)+BigInt(t)}function Jq(e,t){return BigInt(e)-BigInt(t)}function tQ(e){return-BigInt(e)}function eQ(e,t){return BigInt(e)*BigInt(t)}function nQ(e){return BigInt(e)*BigInt(e)}function rQ(e,t){return BigInt(e)**BigInt(t)}function iQ(e,t){return BigInt(e)**BigInt(t)}function oQ(e){return BigInt(e)>=0?BigInt(e):-BigInt(e)}function aQ(e,t){return BigInt(e)/BigInt(t)}function sQ(e,t){return BigInt(e)%BigInt(t)}function lQ(e,t){return BigInt(e)==BigInt(t)}function cQ(e,t){return BigInt(e)!=BigInt(t)}function uQ(e,t){return BigInt(e)BigInt(t)}function fQ(e,t){return BigInt(e)<=BigInt(t)}function hQ(e,t){return BigInt(e)>=BigInt(t)}function pQ(e,t){return BigInt(e)&BigInt(t)}function gQ(e,t){return BigInt(e)|BigInt(t)}function mQ(e,t){return BigInt(e)^BigInt(t)}function yQ(e,t){return BigInt(e)&&BigInt(t)}function vQ(e,t){return BigInt(e)||BigInt(t)}function _Q(e){return!BigInt(e)}const bQ=Object.freeze(Object.defineProperty({__proto__:null,abs:oQ,add:Xq,band:pQ,bitLength:jq,bits:Kq,bor:gQ,bxor:mQ,div:aQ,e:Uq,eq:lQ,exp:iQ,fromArray:$q,fromString:rx,geq:hQ,gt:dQ,isNegative:Vq,isOdd:Gq,isZero:qq,land:yQ,leq:fQ,lnot:_Q,lor:vQ,lt:uQ,mod:sQ,mul:eQ,naf:Hq,neg:tQ,neq:cQ,pow:rQ,shiftLeft:ix,shiftRight:ox,shl:Qq,shr:Wq,square:nQ,sub:Jq,toArray:Zq,toNumber:Yq},Symbol.toStringTag,{value:"Module"}));var Tt={},wQ={get exports(){return Tt},set exports(e){Tt=e}};(function(e){var t=function(n){var r=1e7,i=7,o=9007199254740992,a=P(o),s="0123456789abcdefghijklmnopqrstuvwxyz",u=typeof BigInt=="function";function l(j,F,y,A){return typeof j>"u"?l[0]:typeof F<"u"?+F==10&&!y?Ct(j):Pt(j,F,y,A):Ct(j)}function c(j,F){this.value=j,this.sign=F,this.isSmall=!1}c.prototype=Object.create(l.prototype);function h(j){this.value=j,this.sign=j<0,this.isSmall=!0}h.prototype=Object.create(l.prototype);function _(j){this.value=j}_.prototype=Object.create(l.prototype);function v(j){return-o0?Math.floor(j):Math.ceil(j)}function W(j,F){var y=j.length,A=F.length,D=new Array(y),X=0,tt=r,q,m;for(m=0;m=tt?1:0,D[m]=q-X*tt;for(;m0&&D.push(X),D}function H(j,F){return j.length>=F.length?W(j,F):W(F,j)}function it(j,F){var y=j.length,A=new Array(y),D=r,X,tt;for(tt=0;tt0;)A[tt++]=F%D,F=Math.floor(F/D);return A}c.prototype.add=function(j){var F=Ct(j);if(this.sign!==F.sign)return this.subtract(F.negate());var y=this.value,A=F.value;return F.isSmall?new c(it(y,Math.abs(A)),this.sign):new c(H(y,A),this.sign)},c.prototype.plus=c.prototype.add,h.prototype.add=function(j){var F=Ct(j),y=this.value;if(y<0!==F.sign)return this.subtract(F.negate());var A=F.value;if(F.isSmall){if(v(y+A))return new h(y+A);A=P(Math.abs(A))}return new c(it(A,Math.abs(y)),y<0)},h.prototype.plus=h.prototype.add,_.prototype.add=function(j){return new _(this.value+Ct(j).value)},_.prototype.plus=_.prototype.add;function B(j,F){var y=j.length,A=F.length,D=new Array(y),X=0,tt=r,q,m;for(q=0;q=0?A=B(j,F):(A=B(F,j),y=!y),A=N(A),typeof A=="number"?(y&&(A=-A),new h(A)):new c(A,y)}function L(j,F,y){var A=j.length,D=new Array(A),X=-F,tt=r,q,m;for(q=0;q=0)},h.prototype.minus=h.prototype.subtract,_.prototype.subtract=function(j){return new _(this.value-Ct(j).value)},_.prototype.minus=_.prototype.subtract,c.prototype.negate=function(){return new c(this.value,!this.sign)},h.prototype.negate=function(){var j=this.sign,F=new h(-this.value);return F.sign=!j,F},_.prototype.negate=function(){return new _(-this.value)},c.prototype.abs=function(){return new c(this.value,!1)},h.prototype.abs=function(){return new h(Math.abs(this.value))},_.prototype.abs=function(){return new _(this.value>=0?this.value:-this.value)};function Z(j,F){var y=j.length,A=F.length,D=y+A,X=z(D),tt=r,q,m,b,nt,ct;for(b=0;b0;)A[q++]=X%D,X=Math.floor(X/D);return A}function G(j,F){for(var y=[];F-- >0;)y.push(0);return y.concat(j)}function et(j,F){var y=Math.max(j.length,F.length);if(y<=30)return Z(j,F);y=Math.ceil(y/2);var A=j.slice(y),D=j.slice(0,y),X=F.slice(y),tt=F.slice(0,y),q=et(D,tt),m=et(A,X),b=et(H(D,A),H(tt,X)),nt=H(H(q,G(B(B(b,q),m),y)),G(m,2*y));return M(nt),nt}function w(j,F){return-.012*j-.012*F+15e-6*j*F>0}c.prototype.multiply=function(j){var F=Ct(j),y=this.value,A=F.value,D=this.sign!==F.sign,X;if(F.isSmall){if(A===0)return l[0];if(A===1)return this;if(A===-1)return this.negate();if(X=Math.abs(A),X=0;ct--){for(nt=D-1,m[ct+A]!==tt&&(nt=Math.floor((m[ct+A]*D+m[ct+A-1])/tt)),rt=0,ft=0,gt=b.length,ut=0;utA&&(b=(b+1)*tt),q=Math.ceil(b/nt);do{if(ct=K(F,q),J(ct,X)<=0)break;q--}while(q);D.push(q),X=B(X,ct)}return D.reverse(),[N(D),N(X)]}function T(j,F){var y=j.length,A=z(y),D=r,X,tt,q,m;for(q=0,X=y-1;X>=0;--X)m=q*D+j[X],tt=I(m/F),q=m-tt*F,A[X]=tt|0;return[A,q|0]}function Y(j,F){var y,A=Ct(F);if(u)return[new _(j.value/A.value),new _(j.value%A.value)];var D=j.value,X=A.value,tt;if(X===0)throw new Error("Cannot divide by zero");if(j.isSmall)return A.isSmall?[new h(I(D/X)),new h(D%X)]:[l[0],j];if(A.isSmall){if(X===1)return[j,l[0]];if(X==-1)return[j.negate(),l[0]];var q=Math.abs(X);if(qF.length?1:-1;for(var y=j.length-1;y>=0;y--)if(j[y]!==F[y])return j[y]>F[y]?1:-1;return 0}c.prototype.compareAbs=function(j){var F=Ct(j),y=this.value,A=F.value;return F.isSmall?1:J(y,A)},h.prototype.compareAbs=function(j){var F=Ct(j),y=Math.abs(this.value),A=F.value;return F.isSmall?(A=Math.abs(A),y===A?0:y>A?1:-1):-1},_.prototype.compareAbs=function(j){var F=this.value,y=Ct(j).value;return F=F>=0?F:-F,y=y>=0?y:-y,F===y?0:F>y?1:-1},c.prototype.compare=function(j){if(j===1/0)return-1;if(j===-1/0)return 1;var F=Ct(j),y=this.value,A=F.value;return this.sign!==F.sign?F.sign?1:-1:F.isSmall?this.sign?-1:1:J(y,A)*(this.sign?-1:1)},c.prototype.compareTo=c.prototype.compare,h.prototype.compare=function(j){if(j===1/0)return-1;if(j===-1/0)return 1;var F=Ct(j),y=this.value,A=F.value;return F.isSmall?y==A?0:y>A?1:-1:y<0!==F.sign?y<0?-1:1:y<0?1:-1},h.prototype.compareTo=h.prototype.compare,_.prototype.compare=function(j){if(j===1/0)return-1;if(j===-1/0)return 1;var F=this.value,y=Ct(j).value;return F===y?0:F>y?1:-1},_.prototype.compareTo=_.prototype.compare,c.prototype.equals=function(j){return this.compare(j)===0},_.prototype.eq=_.prototype.equals=h.prototype.eq=h.prototype.equals=c.prototype.eq=c.prototype.equals,c.prototype.notEquals=function(j){return this.compare(j)!==0},_.prototype.neq=_.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=c.prototype.neq=c.prototype.notEquals,c.prototype.greater=function(j){return this.compare(j)>0},_.prototype.gt=_.prototype.greater=h.prototype.gt=h.prototype.greater=c.prototype.gt=c.prototype.greater,c.prototype.lesser=function(j){return this.compare(j)<0},_.prototype.lt=_.prototype.lesser=h.prototype.lt=h.prototype.lesser=c.prototype.lt=c.prototype.lesser,c.prototype.greaterOrEquals=function(j){return this.compare(j)>=0},_.prototype.geq=_.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals,c.prototype.lesserOrEquals=function(j){return this.compare(j)<=0},_.prototype.leq=_.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals,c.prototype.isEven=function(){return(this.value[0]&1)===0},h.prototype.isEven=function(){return(this.value&1)===0},_.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},c.prototype.isOdd=function(){return(this.value[0]&1)===1},h.prototype.isOdd=function(){return(this.value&1)===1},_.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},c.prototype.isPositive=function(){return!this.sign},h.prototype.isPositive=function(){return this.value>0},_.prototype.isPositive=h.prototype.isPositive,c.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},_.prototype.isNegative=h.prototype.isNegative,c.prototype.isUnit=function(){return!1},h.prototype.isUnit=function(){return Math.abs(this.value)===1},_.prototype.isUnit=function(){return this.abs().value===BigInt(1)},c.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return this.value===0},_.prototype.isZero=function(){return this.value===BigInt(0)},c.prototype.isDivisibleBy=function(j){var F=Ct(j);return F.isZero()?!1:F.isUnit()?!0:F.compareAbs(2)===0?this.isEven():this.mod(F).isZero()},_.prototype.isDivisibleBy=h.prototype.isDivisibleBy=c.prototype.isDivisibleBy;function V(j){var F=j.abs();if(F.isUnit())return!1;if(F.equals(2)||F.equals(3)||F.equals(5))return!0;if(F.isEven()||F.isDivisibleBy(3)||F.isDivisibleBy(5))return!1;if(F.lesser(49))return!0}function C(j,F){for(var y=j.prev(),A=y,D=0,X,tt,q;A.isEven();)A=A.divide(2),D++;t:for(tt=0;tt-o?new h(j-1):new c(a,!0)},_.prototype.prev=function(){return new _(this.value-BigInt(1))};for(var O=[1];2*O[O.length-1]<=r;)O.push(2*O[O.length-1]);var lt=O.length,S=O[lt-1];function d(j){return Math.abs(j)<=r}c.prototype.shiftLeft=function(j){var F=Ct(j).toJSNumber();if(!d(F))throw new Error(String(F)+" is too large for shifting.");if(F<0)return this.shiftRight(-F);var y=this;if(y.isZero())return y;for(;F>=lt;)y=y.multiply(S),F-=lt-1;return y.multiply(O[F])},_.prototype.shiftLeft=h.prototype.shiftLeft=c.prototype.shiftLeft,c.prototype.shiftRight=function(j){var F,y=Ct(j).toJSNumber();if(!d(y))throw new Error(String(y)+" is too large for shifting.");if(y<0)return this.shiftLeft(-y);for(var A=this;y>=lt;){if(A.isZero()||A.isNegative()&&A.isUnit())return A;F=Y(A,S),A=F[1].isNegative()?F[0].prev():F[0],y-=lt-1}return F=Y(A,O[y]),F[1].isNegative()?F[0].prev():F[0]},_.prototype.shiftRight=h.prototype.shiftRight=c.prototype.shiftRight;function $(j,F,y){F=Ct(F);for(var A=j.isNegative(),D=F.isNegative(),X=A?j.not():j,tt=D?F.not():F,q=0,m=0,b=null,nt=null,ct=[];!X.isZero()||!tt.isZero();)b=Y(X,S),q=b[1].toJSNumber(),A&&(q=S-1-q),nt=Y(tt,S),m=nt[1].toJSNumber(),D&&(m=S-1-m),X=b[0],tt=nt[0],ct.push(y(q,m));for(var rt=y(A?1:0,D?1:0)!==0?t(-1):t(0),ft=ct.length-1;ft>=0;ft-=1)rt=rt.multiply(S).add(t(ct[ft]));return rt}c.prototype.not=function(){return this.negate().prev()},_.prototype.not=h.prototype.not=c.prototype.not,c.prototype.and=function(j){return $(this,j,function(F,y){return F&y})},_.prototype.and=h.prototype.and=c.prototype.and,c.prototype.or=function(j){return $(this,j,function(F,y){return F|y})},_.prototype.or=h.prototype.or=c.prototype.or,c.prototype.xor=function(j){return $(this,j,function(F,y){return F^y})},_.prototype.xor=h.prototype.xor=c.prototype.xor;var f=1<<30,R=(r&-r)*(r&-r)|f;function k(j){var F=j.value,y=typeof F=="number"?F|f:typeof F=="bigint"?F|BigInt(f):F[0]+F[1]*r|R;return y&-y}function x(j,F){if(F.compareTo(j)<=0){var y=x(j,F.square(F)),A=y.p,D=y.e,X=A.multiply(F);return X.compareTo(j)<=0?{p:X,e:D*2+1}:{p:A,e:D*2}}return{p:t(1),e:0}}c.prototype.bitLength=function(){var j=this;return j.compareTo(t(0))<0&&(j=j.negate().subtract(t(1))),j.compareTo(t(0))===0?t(0):t(x(j,t(2)).e).add(t(1))},_.prototype.bitLength=h.prototype.bitLength=c.prototype.bitLength;function ot(j,F){return j=Ct(j),F=Ct(F),j.greater(F)?j:F}function _t(j,F){return j=Ct(j),F=Ct(F),j.lesser(F)?j:F}function dt(j,F){if(j=Ct(j).abs(),F=Ct(F).abs(),j.equals(F))return j;if(j.isZero())return F;if(F.isZero())return j;for(var y=l[1],A,D;j.isEven()&&F.isEven();)A=_t(k(j),k(F)),j=j.divide(A),F=F.divide(A),y=y.multiply(A);for(;j.isEven();)j=j.divide(k(j));do{for(;F.isEven();)F=F.divide(k(F));j.greater(F)&&(D=F,F=j,j=D),F=F.subtract(j)}while(!F.isZero());return y.isUnit()?j:j.multiply(y)}function bt(j,F){return j=Ct(j).abs(),F=Ct(F).abs(),j.divide(dt(j,F)).multiply(F)}function Ut(j,F,y){j=Ct(j),F=Ct(F);var A=y||Math.random,D=_t(j,F),X=ot(j,F),tt=X.subtract(D).add(1);if(tt.isSmall)return D.add(Math.floor(A()*tt));for(var q=It(tt,r).value,m=[],b=!0,nt=0;nt=tt){if(m==="1"&&tt===1)continue;throw new Error(m+" is not a valid digit in base "+F+".")}}F=Ct(F);var b=[],nt=j[0]==="-";for(X=nt?1:0;X"&&X=0;X--)A=A.add(j[X].times(D)),D=D.times(F);return y?A.negate():A}function yt(j,F){return F=F||s,j"}function It(j,F){if(F=t(F),F.isZero()){if(j.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(F.equals(-1)){if(j.isZero())return{value:[0],isNegative:!1};if(j.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-j.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var y=Array.apply(null,Array(j.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return y.unshift([1]),{value:[].concat.apply([],y),isNegative:!1}}var A=!1;if(j.isNegative()&&F.isPositive()&&(A=!0,j=j.abs()),F.isUnit())return j.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(j.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:A};for(var D=[],X=j,tt;X.isNegative()||X.compareAbs(F)>=0;){tt=X.divmod(F),X=tt.quotient;var q=tt.remainder;q.isNegative()&&(q=F.minus(q).abs(),X=X.next()),D.push(q.toJSNumber())}return D.push(X.toJSNumber()),{value:D.reverse(),isNegative:A}}function Ft(j,F,y){var A=It(j,F);return(A.isNegative?"-":"")+A.value.map(function(D){return yt(D,y)}).join("")}c.prototype.toArray=function(j){return It(this,j)},h.prototype.toArray=function(j){return It(this,j)},_.prototype.toArray=function(j){return It(this,j)},c.prototype.toString=function(j,F){if(j===n&&(j=10),j!==10)return Ft(this,j,F);for(var y=this.value,A=y.length,D=String(y[--A]),X="0000000",tt;--A>=0;)tt=String(y[A]),D+=X.slice(tt.length)+tt;var q=this.sign?"-":"";return q+D},h.prototype.toString=function(j,F){return j===n&&(j=10),j!=10?Ft(this,j,F):String(this.value)},_.prototype.toString=h.prototype.toString,_.prototype.toJSON=c.prototype.toJSON=h.prototype.toJSON=function(){return this.toString()},c.prototype.valueOf=function(){return parseInt(this.toString(),10)},c.prototype.toJSNumber=c.prototype.valueOf,h.prototype.valueOf=function(){return this.value},h.prototype.toJSNumber=h.prototype.valueOf,_.prototype.valueOf=_.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Lt(j){if(v(+j)){var F=+j;if(F===I(F))return u?new _(BigInt(F)):new h(F);throw new Error("Invalid integer: "+j)}var y=j[0]==="-";y&&(j=j.slice(1));var A=j.split(/e/i);if(A.length>2)throw new Error("Invalid integer: "+A.join("e"));if(A.length===2){var D=A[1];if(D[0]==="+"&&(D=D.slice(1)),D=+D,D!==I(D)||!v(D))throw new Error("Invalid integer: "+D+" is not a valid exponent.");var X=A[0],tt=X.indexOf(".");if(tt>=0&&(D-=X.length-tt-1,X=X.slice(0,tt)+X.slice(tt+1)),D<0)throw new Error("Cannot include negative exponent part for integers");X+=new Array(D+1).join("0"),j=X}var q=/^([0-9][0-9]*)$/.test(j);if(!q)throw new Error("Invalid integer: "+j);if(u)return new _(BigInt(y?"-"+j:j));for(var m=[],b=j.length,nt=i,ct=b-nt;b>0;)m.push(+j.slice(ct,b)),ct-=nt,ct<0&&(ct=0),b-=nt;return M(m),new c(m,y)}function St(j){if(u)return new _(BigInt(j));if(v(j)){if(j!==I(j))throw new Error(j+" is not an integer.");return new h(j)}return Lt(j.toString())}function Ct(j){return typeof j=="number"?St(j):typeof j=="string"?Lt(j):typeof j=="bigint"?new _(j):j}for(var jt=0;jt<1e3;jt++)l[jt]=Ct(jt),jt>0&&(l[-jt]=Ct(-jt));return l.one=l[1],l.zero=l[0],l.minusOne=l[-1],l.max=ot,l.min=_t,l.gcd=dt,l.lcm=bt,l.isInstance=function(j){return j instanceof c||j instanceof h||j instanceof _},l.randBetween=Ut,l.fromArray=function(j,F,y){return Ot(j.map(Ct),Ct(F||10),y)},l}();e.hasOwnProperty("exports")&&(e.exports=t)})(wQ);function ax(e,t){return typeof e=="string"&&e.slice(0,2)=="0x"?Tt(e.slice(2),16):Tt(e,t)}const AQ=ax;function xQ(e,t){return Tt.fromArray(e,t)}function LQ(e){return Tt(e).bitLength()}function CQ(e){return Tt(e).isNegative()}function SQ(e){return Tt(e).isZero()}function sx(e,t){return Tt(e).shiftLeft(t)}function lx(e,t){return Tt(e).shiftRight(t)}const FQ=sx,IQ=lx;function EQ(e){return Tt(e).isOdd()}function BQ(e){let t=Tt(e);const n=[];for(;t.gt(Tt.zero);){if(t.isOdd()){const r=2-t.mod(4).toJSNumber();n.push(r),t=t.minus(r)}else n.push(0);t=t.shiftRight(1)}return n}function kQ(e){let t=Tt(e);const n=[];for(;t.gt(Tt.zero);)t.isOdd()?n.push(1):n.push(0),t=t.shiftRight(1);return n}function PQ(e){if(!e.lt(Tt("9007199254740992",10)))throw new Error("Number too big");return e.toJSNumber()}function MQ(e,t){return Tt(e).toArray(t)}function TQ(e,t){return Tt(e).add(Tt(t))}function OQ(e,t){return Tt(e).minus(Tt(t))}function RQ(e){return Tt.zero.minus(Tt(e))}function zQ(e,t){return Tt(e).times(Tt(t))}function DQ(e){return Tt(e).square()}function NQ(e,t){return Tt(e).pow(Tt(t))}function UQ(e,t){return Tt(e).pow(Tt(t))}function $Q(e){return Tt(e).abs()}function jQ(e,t){return Tt(e).divide(Tt(t))}function VQ(e,t){return Tt(e).mod(Tt(t))}function qQ(e,t){return Tt(e).eq(Tt(t))}function QQ(e,t){return Tt(e).neq(Tt(t))}function WQ(e,t){return Tt(e).lt(Tt(t))}function GQ(e,t){return Tt(e).gt(Tt(t))}function HQ(e,t){return Tt(e).leq(Tt(t))}function KQ(e,t){return Tt(e).geq(Tt(t))}function YQ(e,t){return Tt(e).and(Tt(t))}function ZQ(e,t){return Tt(e).or(Tt(t))}function XQ(e,t){return Tt(e).xor(Tt(t))}function JQ(e,t){return!Tt(e).isZero()&&!Tt(t).isZero()}function tW(e,t){return!Tt(e).isZero()||!Tt(t).isZero()}function eW(e){return Tt(e).isZero()}const nW=Object.freeze(Object.defineProperty({__proto__:null,abs:$Q,add:TQ,band:YQ,bitLength:LQ,bits:kQ,bor:ZQ,bxor:XQ,div:jQ,e:AQ,eq:qQ,exp:UQ,fromArray:xQ,fromString:ax,geq:KQ,gt:GQ,isNegative:CQ,isOdd:EQ,isZero:SQ,land:JQ,leq:HQ,lnot:eW,lor:tW,lt:WQ,mod:VQ,mul:zQ,naf:BQ,neg:RQ,neq:QQ,pow:NQ,shiftLeft:sx,shiftRight:lx,shl:FQ,shr:IQ,square:DQ,sub:OQ,toArray:MQ,toNumber:PQ},Symbol.toStringTag,{value:"Module"})),rW=typeof BigInt=="function";let Xe={};rW?Object.assign(Xe,bQ):Object.assign(Xe,nW);Xe.toRprLE=function(t,n,r,i){const o="0000000"+r.toString(16),a=new Uint32Array(t.buffer,n,i/4),s=((o.length-7)*4-1>>5)+1;for(let u=0;u>5)+1;for(let u=0;uo[o.length-s-1]=a.toString(16).padStart(8,"0")),Xe.fromString(o.join(""),16)};Xe.fromRprBE=function(t,n,r){r=r||t.byteLength,n=n||0;const i=new DataView(t.buffer,t.byteOffset+n,r),o=new Array(r/4);for(let a=0;a=0;o--)i=e.square(i),r[o]&&(i=e.mul(i,t));return i}function bx(e){if(e.m%2==1)if(qo(ri(e.p,4),1))if(qo(ri(e.p,8),1))if(qo(ri(e.p,16),1))xW(e);else if(qo(ri(e.p,16),9))LW(e);else throw new Error("Field withot sqrt");else if(qo(ri(e.p,8),5))CW(e);else throw new Error("Field withot sqrt");else qo(ri(e.p,4),3)&&SW(e);else{const t=ri(Yc(e.p,e.m/2),4);t==1?FW(e):t==3?IW(e):EW(e)}}function xW(e){for(e.sqrt_q=Yc(e.p,e.m),e.sqrt_s=0,e.sqrt_t=Oi(e.sqrt_q,1);!q3(e.sqrt_t);)e.sqrt_s=e.sqrt_s+1,e.sqrt_t=Ms(e.sqrt_t,2);let t=e.one;for(;e.eq(t,e.one);){const n=e.random();e.sqrt_z=e.pow(n,e.sqrt_t),t=e.pow(e.sqrt_z,2**(e.sqrt_s-1))}e.sqrt_tm1d2=Ms(Oi(e.sqrt_t,1),2),e.sqrt=function(n){const r=this;if(r.isZero(n))return r.zero;let i=r.pow(n,r.sqrt_tm1d2);const o=r.pow(r.mul(r.square(i),n),2**(r.sqrt_s-1));if(r.eq(o,r.negone))return null;let a=r.sqrt_s,s=r.mul(n,i),u=r.mul(s,i),l=r.sqrt_z;for(;!r.eq(u,r.one);){let c=r.square(u),h=1;for(;!r.eq(c,r.one);)c=r.square(c),h++;i=l;for(let _=0;_>>0,e[i]=(e[i]^e[t])>>>0,e[i]=(e[i]<<16|e[i]>>>16&65535)>>>0,e[r]=e[r]+e[i]>>>0,e[n]=(e[n]^e[r])>>>0,e[n]=(e[n]<<12|e[n]>>>20&4095)>>>0,e[t]=e[t]+e[n]>>>0,e[i]=(e[i]^e[t])>>>0,e[i]=(e[i]<<8|e[i]>>>24&255)>>>0,e[r]=e[r]+e[i]>>>0,e[n]=(e[n]^e[r])>>>0,e[n]=(e[n]<<7|e[n]>>>25&127)>>>0}function BW(e){eo(e,0,4,8,12),eo(e,1,5,9,13),eo(e,2,6,10,14),eo(e,3,7,11,15),eo(e,0,5,10,15),eo(e,1,6,11,12),eo(e,2,7,8,13),eo(e,3,4,9,14)}class kW{constructor(t){t=t||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return this.idx==16&&this.update(),this.buff[this.idx++]}nextU64(){return Q3(yx(this.nextU32(),4294967296),this.nextU32())}nextBool(){return(this.nextU32()&1)==1}update(){for(let t=0;t<16;t++)this.buff[t]=this.state[t];for(let t=0;t<10;t++)BW(this.buff);for(let t=0;t<16;t++)this.buff[t]=this.buff[t]+this.state[t]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,this.state[12]==0&&(this.state[13]=this.state[13]+1>>>0,this.state[13]==0&&(this.state[14]=this.state[14]+1>>>0,this.state[14]==0&&(this.state[15]=this.state[15]+1>>>0)))}}function W3(e){let t=new Uint8Array(e);if(process.browser)if(typeof globalThis.crypto<"u")globalThis.crypto.getRandomValues(t);else for(let n=0;n>>0;else Kc.randomFillSync(t);return t}function PW(){const e=W3(32),t=new Uint32Array(e.buffer),n=[];for(let r=0;r<8;r++)n.push(t[r]);return n}let Pu=null;function G3(){return Pu||(Pu=new kW(PW()),Pu)}let MW=class{constructor(t){this.type="F1",this.one=BigInt(1),this.zero=BigInt(0),this.p=BigInt(t),this.m=1,this.negone=this.p-this.one,this.two=BigInt(2),this.half=this.p>>this.one,this.bitLength=I0(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let r=this.pow(this.nqr,n);for(;!this.eq(r,this.negone);)this.nqr=this.nqr+this.one,r=this.pow(this.nqr,n);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),bx(this)}e(t,n){let r;if(n?n==16&&(r=BigInt("0x"+t)):r=BigInt(t),r<0){let i=-r;return i>=this.p&&(i=i%this.p),this.p-i}else return r>=this.p?r%this.p:r}add(t,n){const r=t+n;return r>=this.p?r-this.p:r}sub(t,n){return t>=n?t-n:this.p-n+t}neg(t){return t&&this.p-t}mul(t,n){return t*n%this.p}mulScalar(t,n){return t*this.e(n)%this.p}square(t){return t*t%this.p}eq(t,n){return t==n}neq(t,n){return t!=n}lt(t,n){const r=t>this.half?t-this.p:t,i=n>this.half?n-this.p:n;return rthis.half?t-this.p:t,i=n>this.half?n-this.p:n;return r>i}leq(t,n){const r=t>this.half?t-this.p:t,i=n>this.half?n-this.p:n;return r<=i}geq(t,n){const r=t>this.half?t-this.p:t,i=n>this.half?n-this.p:n;return r>=i}div(t,n){return this.mul(t,this.inv(n))}idiv(t,n){if(!n)throw new Error("Division by zero");return t/n}inv(t){if(!t)throw new Error("Division by zero");let n=this.zero,r=this.p,i=this.one,o=t%this.p;for(;o;){let a=r/o;[n,i]=[i,n-a*i],[r,o]=[o,r-a*o]}return n=this.p?r-this.p:r}bor(t,n){const r=(t|n)&this.mask;return r>=this.p?r-this.p:r}bxor(t,n){const r=(t^n)&this.mask;return r>=this.p?r-this.p:r}bnot(t){const n=t^this.mask;return n>=this.p?n-this.p:n}shl(t,n){if(Number(n)=this.p?r-this.p:r}else{const r=this.p-n;return Number(r)>r:this.zero}}shr(t,n){if(Number(n)>n;{const r=this.p-n;if(Number(r)=this.p?i-this.p:i}else return 0}}land(t,n){return t&&n?this.one:this.zero}lor(t,n){return t||n?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let r=this.s,i=this.nqr_to_t,o=this.pow(t,this.t),a=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let s=this.square(o),u=1;for(;s!=this.one;)u++,s=this.square(s);let l=i;for(let c=0;cthis.p>>this.one&&(a=this.neg(a)),a}normalize(t,n){if(t=BigInt(t,n),t<0){let r=-t;return r>=this.p&&(r=r%this.p),this.p-r}else return t>=this.p?t%this.p:t}random(){const t=this.bitLength*2/8;let n=this.zero;for(let r=0;rthis.half?r="-"+(this.p-t).toString(n):r=t.toString(n),r}isZero(t){return t==this.zero}fromRng(t){let n;do{n=this.zero;for(let r=0;r=this.p);return n=n*this.Ri%this.p,n}};class TW{constructor(t){this.type="F1",this.one=Tt.one,this.zero=Tt.zero,this.p=Tt(t),this.m=1,this.negone=this.p.minus(Tt.one),this.two=Tt(2),this.half=this.p.shiftRight(1),this.bitLength=this.p.bitLength(),this.mask=Tt.one.shiftLeft(this.bitLength).minus(Tt.one),this.n64=Math.floor((this.bitLength-1)/64)+1,this.n32=this.n64*2,this.n8=this.n64*8,this.R=Tt.one.shiftLeft(this.n64*64),this.Ri=this.inv(this.R);const n=this.negone.shiftRight(this.one);this.nqr=this.two;let r=this.pow(this.nqr,n);for(;!r.equals(this.negone);)this.nqr=this.nqr.add(this.one),r=this.pow(this.nqr,n);for(this.s=this.zero,this.t=this.negone;!this.t.isOdd();)this.s=this.s.add(this.one),this.t=this.t.shiftRight(this.one);this.nqr_to_t=this.pow(this.nqr,this.t),bx(this)}e(t,n){const r=Tt(t,n);return this.normalize(r)}add(t,n){let r=t.add(n);return r.geq(this.p)&&(r=r.minus(this.p)),r}sub(t,n){return t.geq(n)?t.minus(n):this.p.minus(n.minus(t))}neg(t){return t.isZero()?t:this.p.minus(t)}mul(t,n){return t.times(n).mod(this.p)}mulScalar(t,n){return t.times(Tt(n)).mod(this.p)}square(t){return t.square().mod(this.p)}eq(t,n){return t.eq(n)}neq(t,n){return t.neq(n)}lt(t,n){const r=t.gt(this.half)?t.minus(this.p):t,i=n.gt(this.half)?n.minus(this.p):n;return r.lt(i)}gt(t,n){const r=t.gt(this.half)?t.minus(this.p):t,i=n.gt(this.half)?n.minus(this.p):n;return r.gt(i)}leq(t,n){const r=t.gt(this.half)?t.minus(this.p):t,i=n.gt(this.half)?n.minus(this.p):n;return r.leq(i)}geq(t,n){const r=t.gt(this.half)?t.minus(this.p):t,i=n.gt(this.half)?n.minus(this.p):n;return r.geq(i)}div(t,n){if(n.isZero())throw new Error("Division by zero");return t.times(n.modInv(this.p)).mod(this.p)}idiv(t,n){if(n.isZero())throw new Error("Division by zero");return t.divide(n)}inv(t){if(t.isZero())throw new Error("Division by zero");return t.modInv(this.p)}mod(t,n){return t.mod(n)}pow(t,n){return t.modPow(n,this.p)}exp(t,n){return t.modPow(n,this.p)}band(t,n){return t.and(n).and(this.mask).mod(this.p)}bor(t,n){return t.or(n).and(this.mask).mod(this.p)}bxor(t,n){return t.xor(n).and(this.mask).mod(this.p)}bnot(t){return t.xor(this.mask).mod(this.p)}shl(t,n){if(n.lt(this.bitLength))return t.shiftLeft(n).and(this.mask).mod(this.p);{const r=this.p.minus(n);return r.lt(this.bitLength)?this.shr(t,r):Tt.zero}}shr(t,n){if(n.lt(this.bitLength))return t.shiftRight(n);{const r=this.p.minus(n);return r.lt(this.bitLength)?this.shl(t,r):Tt.zero}}land(t,n){return t.isZero()||n.isZero()?Tt.zero:Tt.one}lor(t,n){return t.isZero()&&n.isZero()?Tt.zero:Tt.one}lnot(t){return t.isZero()?Tt.one:Tt.zero}sqrt_old(t){if(t.equals(this.zero))return this.zero;if(!this.pow(t,this.negone.shiftRight(this.one)).equals(this.one))return null;let r=parseInt(this.s),i=this.nqr_to_t,o=this.pow(t,this.t),a=this.pow(t,this.add(this.t,this.one).shiftRight(this.one));for(;!o.equals(this.one);){let s=this.square(o),u=1;for(;!s.equals(this.one);)u++,s=this.square(s);let l=i;for(let c=0;c>1&&E>1,g>>1)))),B.addCode(p.setLocal(G,p.i64_add(p.getLocal(G),p.i64_shr_u(p.getLocal(K),p.i64_const(32)))))),g>0&&(B.addCode(p.setLocal(K,p.i64_add(p.i64_and(p.getLocal(K),p.i64_const(4294967295)),p.i64_and(p.getLocal(et),p.i64_const(4294967295))))),B.addCode(p.setLocal(G,p.i64_add(p.i64_add(p.getLocal(G),p.i64_shr_u(p.getLocal(K),p.i64_const(32))),p.getLocal(w))))),B.addCode(p.i64_store32(p.getLocal("r"),g*4,p.getLocal(K))),B.addCode(p.setLocal(et,p.getLocal(G)),p.setLocal(w,p.i64_shr_u(p.getLocal(et),p.i64_const(32))))}B.addCode(p.i64_store32(p.getLocal("r"),o*4*2-4,p.getLocal(et)))}function z(){const B=t.addFunction(i+"_squareOld");B.addParam("x","i32"),B.addParam("r","i32");const p=B.getCodeBuilder();B.addCode(p.call(i+"_mul",p.getLocal("x"),p.getLocal("x"),p.getLocal("r")))}function I(){const B=t.addFunction(i+"__mul1");B.addParam("px","i32"),B.addParam("y","i64"),B.addParam("pr","i32"),B.addLocal("c","i64");const p=B.getCodeBuilder();B.addCode(p.setLocal("c",p.i64_mul(p.i64_load32_u(p.getLocal("px"),0,0),p.getLocal("y")))),B.addCode(p.i64_store32(p.getLocal("pr"),0,0,p.getLocal("c")));for(let L=1;L>v)),[...l.setLocal("b",l.i32_sub(l.getLocal("b"),l.i32_const(128>>v))),...l.call(i,l.getLocal("r"),c,l.getLocal("r"))]));return _}},K3=NW;function NW(e,t){const n=e.modules[t].n64*8,r=e.addFunction(t+"_batchInverse");r.addParam("pIn","i32"),r.addParam("inStep","i32"),r.addParam("n","i32"),r.addParam("pOut","i32"),r.addParam("outStep","i32"),r.addLocal("itAux","i32"),r.addLocal("itIn","i32"),r.addLocal("itOut","i32"),r.addLocal("i","i32");const i=r.getCodeBuilder(),o=i.i32_const(e.alloc(n));r.addCode(i.setLocal("itAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("itAux"),i.i32_mul(i.i32_add(i.getLocal("n"),i.i32_const(1)),i.i32_const(n))))),r.addCode(i.call(t+"_one",i.getLocal("itAux")),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(t+"_isZero",i.getLocal("itIn")),i.call(t+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(n)),i.getLocal("itAux")),i.call(t+"_mul",i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(n)),i.getLocal("itAux"))),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("itOut",i.i32_add(i.getLocal("pOut"),i.i32_mul(i.i32_sub(i.getLocal("n"),i.i32_const(1)),i.getLocal("outStep")))),i.call(t+"_inverse",i.getLocal("itAux"),i.getLocal("itAux")),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.if(i.call(t+"_isZero",i.getLocal("itIn")),[...i.call(t+"_copy",i.getLocal("itAux"),i.i32_sub(i.getLocal("itAux"),i.i32_const(n))),...i.call(t+"_zero",i.getLocal("itOut"))],[...i.call(t+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(n)),o),...i.call(t+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(n))),...i.call(t+"_mul",i.getLocal("itAux"),o,i.getLocal("itOut"))]),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itOut",i.i32_sub(i.getLocal("itOut"),i.getLocal("outStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),r.addCode(i.i32_store(i.i32_const(0),i.getLocal("itAux")))}var Ax=UW;function UW(e,t,n,r,i,o){typeof o>"u"&&(r"u"&&(r=s&&k.addCode(x.i64_store32(x.getLocal("r"),(It-s)*4,x.getLocal(Ot))),[Ot,yt]=[yt,Ot],k.addCode(x.setLocal(yt,x.i64_shr_u(x.getLocal(Ot),x.i64_const(32))))}k.addCode(x.i64_store32(x.getLocal("r"),s*4-4,x.getLocal(Ot))),k.addCode(x.if(x.i32_wrap_i64(x.getLocal(yt)),x.drop(x.call(c+"_sub",x.getLocal("r"),x.i32_const(h),x.getLocal("r"))),x.if(x.call(c+"_gte",x.getLocal("r"),x.i32_const(h)),x.drop(x.call(c+"_sub",x.getLocal("r"),x.i32_const(h),x.getLocal("r"))))))}function et(){const k=t.addFunction(l+"_square");k.addParam("x","i32"),k.addParam("r","i32"),k.addLocal("c0","i64"),k.addLocal("c1","i64"),k.addLocal("c0_old","i64"),k.addLocal("c1_old","i64"),k.addLocal("np32","i64");for(let Ft=0;Ft>1&&Lt>1,Ft>>1)))),k.addCode(x.setLocal(Ot,x.i64_add(x.getLocal(Ot),x.i64_shr_u(x.getLocal(Pt),x.i64_const(32)))))),Ft>0&&(k.addCode(x.setLocal(Pt,x.i64_add(x.i64_and(x.getLocal(Pt),x.i64_const(4294967295)),x.i64_and(x.getLocal(yt),x.i64_const(4294967295))))),k.addCode(x.setLocal(Ot,x.i64_add(x.i64_add(x.getLocal(Ot),x.i64_shr_u(x.getLocal(Pt),x.i64_const(32))),x.getLocal(It)))));for(let Lt=Math.max(1,Ft-s+1);Lt<=Ft&&Lt=s&&k.addCode(x.i64_store32(x.getLocal("r"),(Ft-s)*4,x.getLocal(Pt))),k.addCode(x.setLocal(yt,x.getLocal(Ot)),x.setLocal(It,x.i64_shr_u(x.getLocal(yt),x.i64_const(32))))}k.addCode(x.i64_store32(x.getLocal("r"),s*4-4,x.getLocal(yt))),k.addCode(x.if(x.i32_wrap_i64(x.getLocal(It)),x.drop(x.call(c+"_sub",x.getLocal("r"),x.i32_const(h),x.getLocal("r"))),x.if(x.call(c+"_gte",x.getLocal("r"),x.i32_const(h)),x.drop(x.call(c+"_sub",x.getLocal("r"),x.i32_const(h),x.getLocal("r"))))))}function w(){const k=t.addFunction(l+"_squareOld");k.addParam("x","i32"),k.addParam("r","i32");const x=k.getCodeBuilder();k.addCode(x.call(l+"_mul",x.getLocal("x"),x.getLocal("x"),x.getLocal("r")))}function g(){const k=t.addFunction(l+"_toMontgomery");k.addParam("x","i32"),k.addParam("r","i32");const x=k.getCodeBuilder();k.addCode(x.call(l+"_mul",x.getLocal("x"),x.i32_const(_),x.getLocal("r")))}function E(){const k=t.alloc(u*2),x=t.addFunction(l+"_fromMontgomery");x.addParam("x","i32"),x.addParam("r","i32");const ot=x.getCodeBuilder();x.addCode(ot.call(c+"_copy",ot.getLocal("x"),ot.i32_const(k))),x.addCode(ot.call(c+"_zero",ot.i32_const(k+u))),x.addCode(ot.call(l+"_mReduct",ot.i32_const(k),ot.getLocal("r")))}function U(){const k=t.addFunction(l+"_inverse");k.addParam("x","i32"),k.addParam("r","i32");const x=k.getCodeBuilder();k.addCode(x.call(l+"_fromMontgomery",x.getLocal("x"),x.getLocal("r"))),k.addCode(x.call(c+"_inverseMod",x.getLocal("r"),x.i32_const(h),x.getLocal("r"))),k.addCode(x.call(l+"_toMontgomery",x.getLocal("r"),x.getLocal("r")))}let Q=Fn(2);if(o.isPrime())for(;!Q.modPow(M,o).equals(N);)Q=Q.add(Fn.one);t.alloc(Dr.bigInt2BytesLE(Q.shiftLeft(a*64).mod(o),u));let T=0,Y=N;for(;!Y.isOdd()&&!Y.isZero();)T++,Y=Y.shiftRight(1);const J=t.alloc(u,Dr.bigInt2BytesLE(Y,u)),V=Q.modPow(Y,o),C=t.alloc(Dr.bigInt2BytesLE(V.shiftLeft(a*64).mod(o),u)),O=Y.add(1).shiftRight(1),lt=t.alloc(u,Dr.bigInt2BytesLE(O,u));function S(){const k=t.addFunction(l+"_sqrt");k.addParam("n","i32"),k.addParam("r","i32"),k.addLocal("m","i32"),k.addLocal("i","i32"),k.addLocal("j","i32");const x=k.getCodeBuilder(),ot=x.i32_const(v),_t=x.i32_const(t.alloc(u)),dt=x.i32_const(t.alloc(u)),bt=x.i32_const(t.alloc(u)),Ut=x.i32_const(t.alloc(u)),Pt=x.i32_const(t.alloc(u));k.addCode(x.if(x.call(l+"_isZero",x.getLocal("n")),x.ret(x.call(l+"_zero",x.getLocal("r")))),x.setLocal("m",x.i32_const(T)),x.call(l+"_copy",x.i32_const(C),_t),x.call(l+"_exp",x.getLocal("n"),x.i32_const(J),x.i32_const(u),dt),x.call(l+"_exp",x.getLocal("n"),x.i32_const(lt),x.i32_const(u),bt),x.block(x.loop(x.br_if(1,x.call(l+"_eq",dt,ot)),x.call(l+"_square",dt,Ut),x.setLocal("i",x.i32_const(1)),x.block(x.loop(x.br_if(1,x.call(l+"_eq",Ut,ot)),x.call(l+"_square",Ut,Ut),x.setLocal("i",x.i32_add(x.getLocal("i"),x.i32_const(1))),x.br(0))),x.call(l+"_copy",_t,Pt),x.setLocal("j",x.i32_sub(x.i32_sub(x.getLocal("m"),x.getLocal("i")),x.i32_const(1))),x.block(x.loop(x.br_if(1,x.i32_eqz(x.getLocal("j"))),x.call(l+"_square",Pt,Pt),x.setLocal("j",x.i32_sub(x.getLocal("j"),x.i32_const(1))),x.br(0))),x.setLocal("m",x.getLocal("i")),x.call(l+"_square",Pt,_t),x.call(l+"_mul",dt,_t,dt),x.call(l+"_mul",bt,Pt,bt),x.br(0))),x.if(x.call(l+"_isNegative",bt),x.call(l+"_neg",bt,x.getLocal("r")),x.call(l+"_copy",bt,x.getLocal("r"))))}function d(){const k=t.addFunction(l+"_isSquare");k.addParam("n","i32"),k.setReturnType("i32");const x=k.getCodeBuilder(),ot=x.i32_const(v),_t=x.i32_const(t.alloc(u));k.addCode(x.if(x.call(l+"_isZero",x.getLocal("n")),x.ret(x.i32_const(1))),x.call(l+"_exp",x.getLocal("n"),x.i32_const(z),x.i32_const(u),_t),x.call(l+"_eq",_t,ot))}function $(){const k=t.addFunction(l+"_load");k.addParam("scalar","i32"),k.addParam("scalarLen","i32"),k.addParam("r","i32"),k.addLocal("p","i32"),k.addLocal("l","i32"),k.addLocal("i","i32"),k.addLocal("j","i32");const x=k.getCodeBuilder(),ot=x.i32_const(t.alloc(u)),_t=t.alloc(u),dt=x.i32_const(_t);k.addCode(x.call(c+"_zero",x.getLocal("r")),x.setLocal("i",x.i32_const(u)),x.setLocal("p",x.getLocal("scalar")),x.block(x.loop(x.br_if(1,x.i32_gt_u(x.getLocal("i"),x.getLocal("scalarLen"))),x.if(x.i32_eq(x.getLocal("i"),x.i32_const(u)),x.call(l+"_one",ot),x.call(l+"_mul",ot,x.i32_const(_),ot)),x.call(l+"_mul",x.getLocal("p"),ot,dt),x.call(l+"_add",x.getLocal("r"),dt,x.getLocal("r")),x.setLocal("p",x.i32_add(x.getLocal("p"),x.i32_const(u))),x.setLocal("i",x.i32_add(x.getLocal("i"),x.i32_const(u))),x.br(0))),x.setLocal("l",x.i32_rem_u(x.getLocal("scalarLen"),x.i32_const(u))),x.if(x.i32_eqz(x.getLocal("l")),x.ret([])),x.call(c+"_zero",dt),x.setLocal("j",x.i32_const(0)),x.block(x.loop(x.br_if(1,x.i32_eq(x.getLocal("j"),x.getLocal("l"))),x.i32_store8(x.getLocal("j"),_t,x.i32_load8_u(x.getLocal("p"))),x.setLocal("p",x.i32_add(x.getLocal("p"),x.i32_const(1))),x.setLocal("j",x.i32_add(x.getLocal("j"),x.i32_const(1))),x.br(0))),x.if(x.i32_eq(x.getLocal("i"),x.i32_const(u)),x.call(l+"_one",ot),x.call(l+"_mul",ot,x.i32_const(_),ot)),x.call(l+"_mul",dt,ot,dt),x.call(l+"_add",x.getLocal("r"),dt,x.getLocal("r")))}function f(){const k=t.addFunction(l+"_timesScalar");k.addParam("x","i32"),k.addParam("scalar","i32"),k.addParam("scalarLen","i32"),k.addParam("r","i32");const x=k.getCodeBuilder(),ot=x.i32_const(t.alloc(u));k.addCode(x.call(l+"_load",x.getLocal("scalar"),x.getLocal("scalarLen"),ot),x.call(l+"_toMontgomery",ot,ot),x.call(l+"_mul",x.getLocal("x"),ot,x.getLocal("r")))}function R(){const k=t.addFunction(l+"_isOne");k.addParam("x","i32"),k.setReturnType("i32");const x=k.getCodeBuilder();k.addCode(x.ret(x.call(c+"_eq",x.getLocal("x"),x.i32_const(v))))}return t.exportFunction(c+"_copy",l+"_copy"),t.exportFunction(c+"_zero",l+"_zero"),t.exportFunction(c+"_isZero",l+"_isZero"),t.exportFunction(c+"_eq",l+"_eq"),R(),it(),B(),p(),K(),G(),et(),w(),g(),E(),L(),Z(),U(),H(),$(),f(),QW(t,l),ip(t,l+"_batchToMontgomery",l+"_toMontgomery",u,u),ip(t,l+"_batchFromMontgomery",l+"_fromMontgomery",u,u),ip(t,l+"_batchNeg",l+"_neg",u,u),op(t,l+"_batchAdd",l+"_add",u,u),op(t,l+"_batchSub",l+"_sub",u,u),op(t,l+"_batchMul",l+"_mul",u,u),t.exportFunction(l+"_add"),t.exportFunction(l+"_sub"),t.exportFunction(l+"_neg"),t.exportFunction(l+"_isNegative"),t.exportFunction(l+"_isOne"),t.exportFunction(l+"_sign"),t.exportFunction(l+"_mReduct"),t.exportFunction(l+"_mul"),t.exportFunction(l+"_square"),t.exportFunction(l+"_squareOld"),t.exportFunction(l+"_fromMontgomery"),t.exportFunction(l+"_toMontgomery"),t.exportFunction(l+"_inverse"),t.exportFunction(l+"_one"),t.exportFunction(l+"_load"),t.exportFunction(l+"_timesScalar"),qW(t,l+"_exp",u,l+"_mul",l+"_square",c+"_copy",l+"_one"),t.exportFunction(l+"_exp"),t.exportFunction(l+"_batchInverse"),o.isPrime()&&(S(),d(),t.exportFunction(l+"_sqrt"),t.exportFunction(l+"_isSquare")),t.exportFunction(l+"_batchToMontgomery"),t.exportFunction(l+"_batchFromMontgomery"),l};const WW=Tt,GW=Y3;var xx=function(t,n,r,i,o){const a=WW(n),s=Math.floor((a.minus(1).bitLength()-1)/64)+1,u=s*8,l=r||"f1";if(t.modules[l])return l;t.modules[l]={n64:s};const c=o||"int",h=GW(t,a,i,c),_=t.modules[h].pR2,v=t.modules[h].pq,P=t.modules[h].pePlusOne;function N(){const W=t.alloc(u),H=t.addFunction(l+"_mul");H.addParam("x","i32"),H.addParam("y","i32"),H.addParam("r","i32");const it=H.getCodeBuilder();H.addCode(it.call(h+"_mul",it.getLocal("x"),it.getLocal("y"),it.i32_const(W))),H.addCode(it.call(h+"_mul",it.i32_const(W),it.i32_const(_),it.getLocal("r")))}function M(){const W=t.addFunction(l+"_square");W.addParam("x","i32"),W.addParam("r","i32");const H=W.getCodeBuilder();W.addCode(H.call(l+"_mul",H.getLocal("x"),H.getLocal("x"),H.getLocal("r")))}function z(){const W=t.addFunction(l+"_inverse");W.addParam("x","i32"),W.addParam("r","i32");const H=W.getCodeBuilder();W.addCode(H.call(c+"_inverseMod",H.getLocal("x"),H.i32_const(v),H.getLocal("r")))}function I(){const W=t.addFunction(l+"_isNegative");W.addParam("x","i32"),W.setReturnType("i32");const H=W.getCodeBuilder();W.addCode(H.call(c+"_gte",H.getLocal("x"),H.i32_const(P)))}return N(),M(),z(),I(),t.exportFunction(h+"_add",l+"_add"),t.exportFunction(h+"_sub",l+"_sub"),t.exportFunction(h+"_neg",l+"_neg"),t.exportFunction(l+"_mul"),t.exportFunction(l+"_square"),t.exportFunction(l+"_inverse"),t.exportFunction(l+"_isNegative"),t.exportFunction(h+"_copy",l+"_copy"),t.exportFunction(h+"_zero",l+"_zero"),t.exportFunction(h+"_one",l+"_one"),t.exportFunction(h+"_isZero",l+"_isZero"),t.exportFunction(h+"_eq",l+"_eq"),l};const HW=H3,KW=K3,Ba=Tt,ap=Gi;var Lx=function(t,n,r,i){if(t.modules[r])return r;const o=t.modules[i].n64*8,a=t.modules[i].q;t.modules[r]={n64:t.modules[i].n64*2};function s(){const et=t.addFunction(r+"_add");et.addParam("x","i32"),et.addParam("y","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("y"),Q=w.i32_add(w.getLocal("y"),w.i32_const(o)),T=w.getLocal("r"),Y=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_add",g,U,T),w.call(i+"_add",E,Q,Y))}function u(){const et=t.addFunction(r+"_timesScalar");et.addParam("x","i32"),et.addParam("scalar","i32"),et.addParam("scalarLen","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_timesScalar",g,w.getLocal("scalar"),w.getLocal("scalarLen"),U),w.call(i+"_timesScalar",E,w.getLocal("scalar"),w.getLocal("scalarLen"),Q))}function l(){const et=t.addFunction(r+"_sub");et.addParam("x","i32"),et.addParam("y","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("y"),Q=w.i32_add(w.getLocal("y"),w.i32_const(o)),T=w.getLocal("r"),Y=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_sub",g,U,T),w.call(i+"_sub",E,Q,Y))}function c(){const et=t.addFunction(r+"_neg");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_neg",g,U),w.call(i+"_neg",E,Q))}function h(){const et=t.addFunction(r+"_conjugate");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_copy",g,U),w.call(i+"_neg",E,Q))}function _(){const et=t.addFunction(r+"_isNegative");et.addParam("x","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.if(w.call(i+"_isZero",E),w.ret(w.call(i+"_isNegative",g))),w.ret(w.call(i+"_isNegative",E)))}function v(){const et=t.addFunction(r+"_mul");et.addParam("x","i32"),et.addParam("y","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("y"),Q=w.i32_add(w.getLocal("y"),w.i32_const(o)),T=w.getLocal("r"),Y=w.i32_add(w.getLocal("r"),w.i32_const(o)),J=w.i32_const(t.alloc(o)),V=w.i32_const(t.alloc(o)),C=w.i32_const(t.alloc(o)),O=w.i32_const(t.alloc(o));et.addCode(w.call(i+"_mul",g,U,J),w.call(i+"_mul",E,Q,V),w.call(i+"_add",g,E,C),w.call(i+"_add",U,Q,O),w.call(i+"_mul",C,O,C),w.call(n,V,T),w.call(i+"_add",J,T,T),w.call(i+"_add",J,V,Y),w.call(i+"_sub",C,Y,Y))}function P(){const et=t.addFunction(r+"_mul1");et.addParam("x","i32"),et.addParam("y","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("y"),Q=w.getLocal("r"),T=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_mul",g,U,Q),w.call(i+"_mul",E,U,T))}function N(){const et=t.addFunction(r+"_square");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o)),T=w.i32_const(t.alloc(o)),Y=w.i32_const(t.alloc(o)),J=w.i32_const(t.alloc(o)),V=w.i32_const(t.alloc(o));et.addCode(w.call(i+"_mul",g,E,T),w.call(i+"_add",g,E,Y),w.call(n,E,J),w.call(i+"_add",g,J,J),w.call(n,T,V),w.call(i+"_add",V,T,V),w.call(i+"_mul",Y,J,U),w.call(i+"_sub",U,V,U),w.call(i+"_add",T,T,Q))}function M(){const et=t.addFunction(r+"_toMontgomery");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_toMontgomery",g,U),w.call(i+"_toMontgomery",E,Q))}function z(){const et=t.addFunction(r+"_fromMontgomery");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_fromMontgomery",g,U),w.call(i+"_fromMontgomery",E,Q))}function I(){const et=t.addFunction(r+"_copy");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o));et.addCode(w.call(i+"_copy",g,U),w.call(i+"_copy",E,Q))}function W(){const et=t.addFunction(r+"_zero");et.addParam("x","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.call(i+"_zero",g),w.call(i+"_zero",E))}function H(){const et=t.addFunction(r+"_one");et.addParam("x","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.call(i+"_one",g),w.call(i+"_zero",E))}function it(){const et=t.addFunction(r+"_eq");et.addParam("x","i32"),et.addParam("y","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("y"),Q=w.i32_add(w.getLocal("y"),w.i32_const(o));et.addCode(w.i32_and(w.call(i+"_eq",g,U),w.call(i+"_eq",E,Q)))}function B(){const et=t.addFunction(r+"_isZero");et.addParam("x","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.i32_and(w.call(i+"_isZero",g),w.call(i+"_isZero",E)))}function p(){const et=t.addFunction(r+"_inverse");et.addParam("x","i32"),et.addParam("r","i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o)),U=w.getLocal("r"),Q=w.i32_add(w.getLocal("r"),w.i32_const(o)),T=w.i32_const(t.alloc(o)),Y=w.i32_const(t.alloc(o)),J=w.i32_const(t.alloc(o)),V=w.i32_const(t.alloc(o));et.addCode(w.call(i+"_square",g,T),w.call(i+"_square",E,Y),w.call(n,Y,J),w.call(i+"_sub",T,J,J),w.call(i+"_inverse",J,V),w.call(i+"_mul",g,V,U),w.call(i+"_mul",E,V,Q),w.call(i+"_neg",Q,Q))}function L(){const et=t.addFunction(r+"_sign");et.addParam("x","i32"),et.addLocal("s","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.setLocal("s",w.call(i+"_sign",E)),w.if(w.getLocal("s"),w.ret(w.getLocal("s"))),w.ret(w.call(i+"_sign",g)))}function Z(){const et=t.addFunction(r+"_isOne");et.addParam("x","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.getLocal("x"),E=w.i32_add(w.getLocal("x"),w.i32_const(o));et.addCode(w.ret(w.i32_and(w.call(i+"_isOne",g),w.call(i+"_isZero",E))))}function K(){const et=t.addFunction(r+"_sqrt");et.addParam("a","i32"),et.addParam("pr","i32");const w=et.getCodeBuilder(),g=w.i32_const(t.alloc(ap.bigInt2BytesLE(Ba(a).minus(Ba(3)).divide(4),o))),E=w.i32_const(t.alloc(ap.bigInt2BytesLE(Ba(a).minus(Ba(1)).divide(2),o))),U=w.getLocal("a"),Q=w.i32_const(t.alloc(o*2)),T=w.i32_const(t.alloc(o*2)),Y=w.i32_const(t.alloc(o*2)),J=t.alloc(o*2),V=w.i32_const(J),C=w.i32_const(J),O=w.i32_const(J+o),lt=w.i32_const(t.alloc(o*2)),S=w.i32_const(t.alloc(o*2));et.addCode(w.call(r+"_one",V),w.call(r+"_neg",V,V),w.call(r+"_exp",U,g,w.i32_const(o),Q),w.call(r+"_square",Q,T),w.call(r+"_mul",U,T,T),w.call(r+"_conjugate",T,Y),w.call(r+"_mul",Y,T,Y),w.if(w.call(r+"_eq",Y,V),w.unreachable()),w.call(r+"_mul",Q,U,lt),w.if(w.call(r+"_eq",T,V),[...w.call(i+"_zero",C),...w.call(i+"_one",O),...w.call(r+"_mul",V,lt,w.getLocal("pr"))],[...w.call(r+"_one",S),...w.call(r+"_add",S,T,S),...w.call(r+"_exp",S,E,w.i32_const(o),S),...w.call(r+"_mul",S,lt,w.getLocal("pr"))]))}function G(){const et=t.addFunction(r+"_isSquare");et.addParam("a","i32"),et.setReturnType("i32");const w=et.getCodeBuilder(),g=w.i32_const(t.alloc(ap.bigInt2BytesLE(Ba(a).minus(Ba(3)).divide(4),o))),E=w.getLocal("a"),U=w.i32_const(t.alloc(o*2)),Q=w.i32_const(t.alloc(o*2)),T=w.i32_const(t.alloc(o*2)),Y=t.alloc(o*2),J=w.i32_const(Y);et.addCode(w.call(r+"_one",J),w.call(r+"_neg",J,J),w.call(r+"_exp",E,g,w.i32_const(o),U),w.call(r+"_square",U,Q),w.call(r+"_mul",E,Q,Q),w.call(r+"_conjugate",Q,T),w.call(r+"_mul",T,Q,T),w.if(w.call(r+"_eq",T,J),w.ret(w.i32_const(0))),w.ret(w.i32_const(1)))}return B(),Z(),W(),H(),I(),v(),P(),N(),s(),l(),c(),h(),M(),z(),it(),p(),u(),L(),_(),t.exportFunction(r+"_isZero"),t.exportFunction(r+"_isOne"),t.exportFunction(r+"_zero"),t.exportFunction(r+"_one"),t.exportFunction(r+"_copy"),t.exportFunction(r+"_mul"),t.exportFunction(r+"_mul1"),t.exportFunction(r+"_square"),t.exportFunction(r+"_add"),t.exportFunction(r+"_sub"),t.exportFunction(r+"_neg"),t.exportFunction(r+"_sign"),t.exportFunction(r+"_conjugate"),t.exportFunction(r+"_fromMontgomery"),t.exportFunction(r+"_toMontgomery"),t.exportFunction(r+"_eq"),t.exportFunction(r+"_inverse"),KW(t,r),HW(t,r+"_exp",o*2,r+"_mul",r+"_square",r+"_copy",r+"_one"),K(),G(),t.exportFunction(r+"_exp"),t.exportFunction(r+"_timesScalar"),t.exportFunction(r+"_batchInverse"),t.exportFunction(r+"_sqrt"),t.exportFunction(r+"_isSquare"),t.exportFunction(r+"_isNegative"),r};const YW=H3,ZW=K3;var Cx=function(t,n,r,i){if(t.modules[r])return r;const o=t.modules[i].n64*8;t.modules[r]={n64:t.modules[i].n64*3};function a(){const p=t.addFunction(r+"_add");p.addParam("x","i32"),p.addParam("y","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("y"),w=L.i32_add(L.getLocal("y"),L.i32_const(o)),g=L.i32_add(L.getLocal("y"),L.i32_const(2*o)),E=L.getLocal("r"),U=L.i32_add(L.getLocal("r"),L.i32_const(o)),Q=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_add",Z,et,E),L.call(i+"_add",K,w,U),L.call(i+"_add",G,g,Q))}function s(){const p=t.addFunction(r+"_timesScalar");p.addParam("x","i32"),p.addParam("scalar","i32"),p.addParam("scalarLen","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_timesScalar",Z,L.getLocal("scalar"),L.getLocal("scalarLen"),et),L.call(i+"_timesScalar",K,L.getLocal("scalar"),L.getLocal("scalarLen"),w),L.call(i+"_timesScalar",G,L.getLocal("scalar"),L.getLocal("scalarLen"),g))}function u(){const p=t.addFunction(r+"_sub");p.addParam("x","i32"),p.addParam("y","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("y"),w=L.i32_add(L.getLocal("y"),L.i32_const(o)),g=L.i32_add(L.getLocal("y"),L.i32_const(2*o)),E=L.getLocal("r"),U=L.i32_add(L.getLocal("r"),L.i32_const(o)),Q=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_sub",Z,et,E),L.call(i+"_sub",K,w,U),L.call(i+"_sub",G,g,Q))}function l(){const p=t.addFunction(r+"_neg");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_neg",Z,et),L.call(i+"_neg",K,w),L.call(i+"_neg",G,g))}function c(){const p=t.addFunction(r+"_isNegative");p.addParam("x","i32"),p.setReturnType("i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o));p.addCode(L.if(L.call(i+"_isZero",G),L.if(L.call(i+"_isZero",K),L.ret(L.call(i+"_isNegative",Z)),L.ret(L.call(i+"_isNegative",K)))),L.ret(L.call(i+"_isNegative",G)))}function h(){const p=t.addFunction(r+"_mul");p.addParam("x","i32"),p.addParam("y","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("y"),w=L.i32_add(L.getLocal("y"),L.i32_const(o)),g=L.i32_add(L.getLocal("y"),L.i32_const(2*o)),E=L.getLocal("r"),U=L.i32_add(L.getLocal("r"),L.i32_const(o)),Q=L.i32_add(L.getLocal("r"),L.i32_const(2*o)),T=L.i32_const(t.alloc(o)),Y=L.i32_const(t.alloc(o)),J=L.i32_const(t.alloc(o)),V=L.i32_const(t.alloc(o)),C=L.i32_const(t.alloc(o)),O=L.i32_const(t.alloc(o)),lt=L.i32_const(t.alloc(o)),S=L.i32_const(t.alloc(o)),d=L.i32_const(t.alloc(o)),$=L.i32_const(t.alloc(o)),f=L.i32_const(t.alloc(o)),R=L.i32_const(t.alloc(o)),k=L.i32_const(t.alloc(o));p.addCode(L.call(i+"_mul",Z,et,T),L.call(i+"_mul",K,w,Y),L.call(i+"_mul",G,g,J),L.call(i+"_add",Z,K,V),L.call(i+"_add",et,w,C),L.call(i+"_add",Z,G,O),L.call(i+"_add",et,g,lt),L.call(i+"_add",K,G,S),L.call(i+"_add",w,g,d),L.call(i+"_add",T,Y,$),L.call(i+"_add",T,J,f),L.call(i+"_add",Y,J,R),L.call(i+"_mul",S,d,E),L.call(i+"_sub",E,R,E),L.call(n,E,E),L.call(i+"_add",T,E,E),L.call(i+"_mul",V,C,U),L.call(i+"_sub",U,$,U),L.call(n,J,k),L.call(i+"_add",U,k,U),L.call(i+"_mul",O,lt,Q),L.call(i+"_sub",Q,f,Q),L.call(i+"_add",Q,Y,Q))}function _(){const p=t.addFunction(r+"_square");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o)),E=L.i32_const(t.alloc(o)),U=L.i32_const(t.alloc(o)),Q=L.i32_const(t.alloc(o)),T=L.i32_const(t.alloc(o)),Y=L.i32_const(t.alloc(o)),J=L.i32_const(t.alloc(o)),V=L.i32_const(t.alloc(o));p.addCode(L.call(i+"_square",Z,E),L.call(i+"_mul",Z,K,U),L.call(i+"_add",U,U,Q),L.call(i+"_sub",Z,K,T),L.call(i+"_add",T,G,T),L.call(i+"_square",T,T),L.call(i+"_mul",K,G,Y),L.call(i+"_add",Y,Y,J),L.call(i+"_square",G,V),L.call(n,J,et),L.call(i+"_add",E,et,et),L.call(n,V,w),L.call(i+"_add",Q,w,w),L.call(i+"_add",E,V,g),L.call(i+"_sub",J,g,g),L.call(i+"_add",T,g,g),L.call(i+"_add",Q,g,g))}function v(){const p=t.addFunction(r+"_toMontgomery");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_toMontgomery",Z,et),L.call(i+"_toMontgomery",K,w),L.call(i+"_toMontgomery",G,g))}function P(){const p=t.addFunction(r+"_fromMontgomery");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_fromMontgomery",Z,et),L.call(i+"_fromMontgomery",K,w),L.call(i+"_fromMontgomery",G,g))}function N(){const p=t.addFunction(r+"_copy");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o));p.addCode(L.call(i+"_copy",Z,et),L.call(i+"_copy",K,w),L.call(i+"_copy",G,g))}function M(){const p=t.addFunction(r+"_zero");p.addParam("x","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o));p.addCode(L.call(i+"_zero",Z),L.call(i+"_zero",K),L.call(i+"_zero",G))}function z(){const p=t.addFunction(r+"_one");p.addParam("x","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o));p.addCode(L.call(i+"_one",Z),L.call(i+"_zero",K),L.call(i+"_zero",G))}function I(){const p=t.addFunction(r+"_eq");p.addParam("x","i32"),p.addParam("y","i32"),p.setReturnType("i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("y"),w=L.i32_add(L.getLocal("y"),L.i32_const(o)),g=L.i32_add(L.getLocal("y"),L.i32_const(2*o));p.addCode(L.i32_and(L.i32_and(L.call(i+"_eq",Z,et),L.call(i+"_eq",K,w)),L.call(i+"_eq",G,g)))}function W(){const p=t.addFunction(r+"_isZero");p.addParam("x","i32"),p.setReturnType("i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o));p.addCode(L.i32_and(L.i32_and(L.call(i+"_isZero",Z),L.call(i+"_isZero",K)),L.call(i+"_isZero",G)))}function H(){const p=t.addFunction(r+"_inverse");p.addParam("x","i32"),p.addParam("r","i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o)),et=L.getLocal("r"),w=L.i32_add(L.getLocal("r"),L.i32_const(o)),g=L.i32_add(L.getLocal("r"),L.i32_const(2*o)),E=L.i32_const(t.alloc(o)),U=L.i32_const(t.alloc(o)),Q=L.i32_const(t.alloc(o)),T=L.i32_const(t.alloc(o)),Y=L.i32_const(t.alloc(o)),J=L.i32_const(t.alloc(o)),V=L.i32_const(t.alloc(o)),C=L.i32_const(t.alloc(o)),O=L.i32_const(t.alloc(o)),lt=L.i32_const(t.alloc(o)),S=L.i32_const(t.alloc(o));p.addCode(L.call(i+"_square",Z,E),L.call(i+"_square",K,U),L.call(i+"_square",G,Q),L.call(i+"_mul",Z,K,T),L.call(i+"_mul",Z,G,Y),L.call(i+"_mul",K,G,J),L.call(n,J,V),L.call(i+"_sub",E,V,V),L.call(n,Q,C),L.call(i+"_sub",C,T,C),L.call(i+"_sub",U,Y,O),L.call(i+"_mul",G,C,lt),L.call(i+"_mul",K,O,S),L.call(i+"_add",lt,S,lt),L.call(n,lt,lt),L.call(i+"_mul",Z,V,S),L.call(i+"_add",S,lt,lt),L.call(i+"_inverse",lt,lt),L.call(i+"_mul",lt,V,et),L.call(i+"_mul",lt,C,w),L.call(i+"_mul",lt,O,g))}function it(){const p=t.addFunction(r+"_sign");p.addParam("x","i32"),p.addLocal("s","i32"),p.setReturnType("i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(2*o));p.addCode(L.setLocal("s",L.call(i+"_sign",G)),L.if(L.getLocal("s"),L.ret(L.getLocal("s"))),L.setLocal("s",L.call(i+"_sign",K)),L.if(L.getLocal("s"),L.ret(L.getLocal("s"))),L.ret(L.call(i+"_sign",Z)))}function B(){const p=t.addFunction(r+"_isOne");p.addParam("x","i32"),p.setReturnType("i32");const L=p.getCodeBuilder(),Z=L.getLocal("x"),K=L.i32_add(L.getLocal("x"),L.i32_const(o)),G=L.i32_add(L.getLocal("x"),L.i32_const(o*2));p.addCode(L.ret(L.i32_and(L.i32_and(L.call(i+"_isOne",Z),L.call(i+"_isZero",K)),L.call(i+"_isZero",G))))}return W(),B(),M(),z(),N(),h(),_(),a(),u(),l(),it(),v(),P(),I(),H(),s(),c(),t.exportFunction(r+"_isZero"),t.exportFunction(r+"_isOne"),t.exportFunction(r+"_zero"),t.exportFunction(r+"_one"),t.exportFunction(r+"_copy"),t.exportFunction(r+"_mul"),t.exportFunction(r+"_square"),t.exportFunction(r+"_add"),t.exportFunction(r+"_sub"),t.exportFunction(r+"_neg"),t.exportFunction(r+"_sign"),t.exportFunction(r+"_fromMontgomery"),t.exportFunction(r+"_toMontgomery"),t.exportFunction(r+"_eq"),t.exportFunction(r+"_inverse"),ZW(t,r),YW(t,r+"_exp",o*3,r+"_mul",r+"_square",r+"_copy",r+"_one"),t.exportFunction(r+"_exp"),t.exportFunction(r+"_timesScalar"),t.exportFunction(r+"_batchInverse"),t.exportFunction(r+"_isNegative"),r},XW=function(t,n,r,i,o,a,s,u){const l=t.addFunction(n);l.addParam("base","i32"),l.addParam("scalar","i32"),l.addParam("scalarLength","i32"),l.addParam("r","i32"),l.addLocal("old0","i32"),l.addLocal("nbits","i32"),l.addLocal("i","i32"),l.addLocal("last","i32"),l.addLocal("cur","i32"),l.addLocal("carry","i32"),l.addLocal("p","i32");const c=l.getCodeBuilder(),h=c.i32_const(t.alloc(r));function _(P){return c.i32_and(c.i32_shr_u(c.i32_load(c.i32_add(c.getLocal("scalar"),c.i32_and(c.i32_shr_u(P,c.i32_const(3)),c.i32_const(4294967292)))),c.i32_and(P,c.i32_const(31))),c.i32_const(1))}function v(P){return[...c.i32_store8(c.getLocal("p"),c.i32_const(P)),...c.setLocal("p",c.i32_add(c.getLocal("p"),c.i32_const(1)))]}l.addCode(c.if(c.i32_eqz(c.getLocal("scalarLength")),[...c.call(u,c.getLocal("r")),...c.ret([])]),c.setLocal("nbits",c.i32_shl(c.getLocal("scalarLength"),c.i32_const(3))),c.setLocal("old0",c.i32_load(c.i32_const(0))),c.setLocal("p",c.getLocal("old0")),c.i32_store(c.i32_const(0),c.i32_and(c.i32_add(c.i32_add(c.getLocal("old0"),c.i32_const(32)),c.getLocal("nbits")),c.i32_const(4294967288))),c.setLocal("i",c.i32_const(1)),c.setLocal("last",_(c.i32_const(0))),c.setLocal("carry",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("i"),c.getLocal("nbits"))),c.setLocal("cur",_(c.getLocal("i"))),c.if(c.getLocal("last"),c.if(c.getLocal("cur"),c.if(c.getLocal("carry"),[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(1)),...v(1)],[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(1)),...v(255)]),c.if(c.getLocal("carry"),[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(1)),...v(255)],[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(0)),...v(1)])),c.if(c.getLocal("cur"),c.if(c.getLocal("carry"),[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(1)),...v(0)],[...c.setLocal("last",c.i32_const(1)),...c.setLocal("carry",c.i32_const(0)),...v(0)]),c.if(c.getLocal("carry"),[...c.setLocal("last",c.i32_const(1)),...c.setLocal("carry",c.i32_const(0)),...v(0)],[...c.setLocal("last",c.i32_const(0)),...c.setLocal("carry",c.i32_const(0)),...v(0)]))),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0))),c.if(c.getLocal("last"),c.if(c.getLocal("carry"),[...v(255),...v(0),...v(1)],[...v(1)]),c.if(c.getLocal("carry"),[...v(0),...v(1)])),c.setLocal("p",c.i32_sub(c.getLocal("p"),c.i32_const(1))),c.call(s,c.getLocal("base"),h),c.call(u,c.getLocal("r")),c.block(c.loop(c.call(o,c.getLocal("r"),c.getLocal("r")),c.setLocal("cur",c.i32_load8_u(c.getLocal("p"))),c.if(c.getLocal("cur"),c.if(c.i32_eq(c.getLocal("cur"),c.i32_const(1)),c.call(i,c.getLocal("r"),h,c.getLocal("r")),c.call(a,c.getLocal("r"),h,c.getLocal("r")))),c.br_if(1,c.i32_eq(c.getLocal("old0"),c.getLocal("p"))),c.setLocal("p",c.i32_sub(c.getLocal("p"),c.i32_const(1))),c.br(0))),c.i32_store(c.i32_const(0),c.getLocal("old0")))},JW=function(t,n,r,i,o){const s=t.modules[n].n64*8;function u(){const _=t.addFunction(r+"_getChunk");_.addParam("pScalar","i32"),_.addParam("scalarSize","i32"),_.addParam("startBit","i32"),_.addParam("chunkSize","i32"),_.addLocal("bitsToEnd","i32"),_.addLocal("mask","i32"),_.setReturnType("i32");const v=_.getCodeBuilder();_.addCode(v.setLocal("bitsToEnd",v.i32_sub(v.i32_mul(v.getLocal("scalarSize"),v.i32_const(8)),v.getLocal("startBit"))),v.if(v.i32_gt_s(v.getLocal("chunkSize"),v.getLocal("bitsToEnd")),v.setLocal("mask",v.i32_sub(v.i32_shl(v.i32_const(1),v.getLocal("bitsToEnd")),v.i32_const(1))),v.setLocal("mask",v.i32_sub(v.i32_shl(v.i32_const(1),v.getLocal("chunkSize")),v.i32_const(1)))),v.i32_and(v.i32_shr_u(v.i32_load(v.i32_add(v.getLocal("pScalar"),v.i32_shr_u(v.getLocal("startBit"),v.i32_const(3))),0,0),v.i32_and(v.getLocal("startBit"),v.i32_const(7))),v.getLocal("mask")))}function l(){const _=t.addFunction(r+"_chunk");_.addParam("pBases","i32"),_.addParam("pScalars","i32"),_.addParam("scalarSize","i32"),_.addParam("n","i32"),_.addParam("startBit","i32"),_.addParam("chunkSize","i32"),_.addParam("pr","i32"),_.addLocal("nChunks","i32"),_.addLocal("itScalar","i32"),_.addLocal("endScalar","i32"),_.addLocal("itBase","i32"),_.addLocal("i","i32"),_.addLocal("j","i32"),_.addLocal("nTable","i32"),_.addLocal("pTable","i32"),_.addLocal("idx","i32"),_.addLocal("pIdxTable","i32");const v=_.getCodeBuilder();_.addCode(v.if(v.i32_eqz(v.getLocal("n")),[...v.call(n+"_zero",v.getLocal("pr")),...v.ret([])]),v.setLocal("nTable",v.i32_shl(v.i32_const(1),v.getLocal("chunkSize"))),v.setLocal("pTable",v.i32_load(v.i32_const(0))),v.i32_store(v.i32_const(0),v.i32_add(v.getLocal("pTable"),v.i32_mul(v.getLocal("nTable"),v.i32_const(s)))),v.setLocal("j",v.i32_const(0)),v.block(v.loop(v.br_if(1,v.i32_eq(v.getLocal("j"),v.getLocal("nTable"))),v.call(n+"_zero",v.i32_add(v.getLocal("pTable"),v.i32_mul(v.getLocal("j"),v.i32_const(s)))),v.setLocal("j",v.i32_add(v.getLocal("j"),v.i32_const(1))),v.br(0))),v.setLocal("itBase",v.getLocal("pBases")),v.setLocal("itScalar",v.getLocal("pScalars")),v.setLocal("endScalar",v.i32_add(v.getLocal("pScalars"),v.i32_mul(v.getLocal("n"),v.getLocal("scalarSize")))),v.block(v.loop(v.br_if(1,v.i32_eq(v.getLocal("itScalar"),v.getLocal("endScalar"))),v.setLocal("idx",v.call(r+"_getChunk",v.getLocal("itScalar"),v.getLocal("scalarSize"),v.getLocal("startBit"),v.getLocal("chunkSize"))),v.if(v.getLocal("idx"),[...v.setLocal("pIdxTable",v.i32_add(v.getLocal("pTable"),v.i32_mul(v.i32_sub(v.getLocal("idx"),v.i32_const(1)),v.i32_const(s)))),...v.call(i,v.getLocal("pIdxTable"),v.getLocal("itBase"),v.getLocal("pIdxTable"))]),v.setLocal("itScalar",v.i32_add(v.getLocal("itScalar"),v.getLocal("scalarSize"))),v.setLocal("itBase",v.i32_add(v.getLocal("itBase"),v.i32_const(o))),v.br(0))),v.call(r+"_reduceTable",v.getLocal("pTable"),v.getLocal("chunkSize")),v.call(n+"_copy",v.getLocal("pTable"),v.getLocal("pr")),v.i32_store(v.i32_const(0),v.getLocal("pTable")))}function c(){const _=t.addFunction(r);_.addParam("pBases","i32"),_.addParam("pScalars","i32"),_.addParam("scalarSize","i32"),_.addParam("n","i32"),_.addParam("pr","i32"),_.addLocal("chunkSize","i32"),_.addLocal("nChunks","i32"),_.addLocal("itScalar","i32"),_.addLocal("endScalar","i32"),_.addLocal("itBase","i32"),_.addLocal("itBit","i32"),_.addLocal("i","i32"),_.addLocal("j","i32"),_.addLocal("nTable","i32"),_.addLocal("pTable","i32"),_.addLocal("idx","i32"),_.addLocal("pIdxTable","i32");const v=_.getCodeBuilder(),P=v.i32_const(t.alloc(s)),N=t.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);_.addCode(v.call(n+"_zero",v.getLocal("pr")),v.if(v.i32_eqz(v.getLocal("n")),v.ret([])),v.setLocal("chunkSize",v.i32_load8_u(v.i32_clz(v.getLocal("n")),N)),v.setLocal("nChunks",v.i32_add(v.i32_div_u(v.i32_sub(v.i32_shl(v.getLocal("scalarSize"),v.i32_const(3)),v.i32_const(1)),v.getLocal("chunkSize")),v.i32_const(1))),v.setLocal("itBit",v.i32_mul(v.i32_sub(v.getLocal("nChunks"),v.i32_const(1)),v.getLocal("chunkSize"))),v.block(v.loop(v.br_if(1,v.i32_lt_s(v.getLocal("itBit"),v.i32_const(0))),v.if(v.i32_eqz(v.call(n+"_isZero",v.getLocal("pr"))),[...v.setLocal("j",v.i32_const(0)),...v.block(v.loop(v.br_if(1,v.i32_eq(v.getLocal("j"),v.getLocal("chunkSize"))),v.call(n+"_double",v.getLocal("pr"),v.getLocal("pr")),v.setLocal("j",v.i32_add(v.getLocal("j"),v.i32_const(1))),v.br(0)))]),v.call(r+"_chunk",v.getLocal("pBases"),v.getLocal("pScalars"),v.getLocal("scalarSize"),v.getLocal("n"),v.getLocal("itBit"),v.getLocal("chunkSize"),P),v.call(n+"_add",v.getLocal("pr"),P,v.getLocal("pr")),v.setLocal("itBit",v.i32_sub(v.getLocal("itBit"),v.getLocal("chunkSize"))),v.br(0))))}function h(){const _=t.addFunction(r+"_reduceTable");_.addParam("pTable","i32"),_.addParam("p","i32"),_.addLocal("half","i32"),_.addLocal("it1","i32"),_.addLocal("it2","i32"),_.addLocal("pAcc","i32");const v=_.getCodeBuilder();_.addCode(v.if(v.i32_eq(v.getLocal("p"),v.i32_const(1)),v.ret([])),v.setLocal("half",v.i32_shl(v.i32_const(1),v.i32_sub(v.getLocal("p"),v.i32_const(1)))),v.setLocal("it1",v.getLocal("pTable")),v.setLocal("it2",v.i32_add(v.getLocal("pTable"),v.i32_mul(v.getLocal("half"),v.i32_const(s)))),v.setLocal("pAcc",v.i32_sub(v.getLocal("it2"),v.i32_const(s))),v.block(v.loop(v.br_if(1,v.i32_eq(v.getLocal("it1"),v.getLocal("pAcc"))),v.call(n+"_add",v.getLocal("it1"),v.getLocal("it2"),v.getLocal("it1")),v.call(n+"_add",v.getLocal("pAcc"),v.getLocal("it2"),v.getLocal("pAcc")),v.setLocal("it1",v.i32_add(v.getLocal("it1"),v.i32_const(s))),v.setLocal("it2",v.i32_add(v.getLocal("it2"),v.i32_const(s))),v.br(0))),v.call(r+"_reduceTable",v.getLocal("pTable"),v.i32_sub(v.getLocal("p"),v.i32_const(1))),v.setLocal("p",v.i32_sub(v.getLocal("p"),v.i32_const(1))),v.block(v.loop(v.br_if(1,v.i32_eqz(v.getLocal("p"))),v.call(n+"_double",v.getLocal("pAcc"),v.getLocal("pAcc")),v.setLocal("p",v.i32_sub(v.getLocal("p"),v.i32_const(1))),v.br(0))),v.call(n+"_add",v.getLocal("pTable"),v.getLocal("pAcc"),v.getLocal("pTable")))}u(),h(),l(),c(),t.exportFunction(r),t.exportFunction(r+"_chunk")};const C4=XW,ul=Ax,S4=JW;var Sx=function(t,n,r,i){const o=t.modules[r].n64,a=o*8;if(t.modules[n])return n;t.modules[n]={n64:o*3};function s(){const S=t.addFunction(n+"_isZero");S.addParam("p1","i32"),S.setReturnType("i32");const d=S.getCodeBuilder();S.addCode(d.call(r+"_isZero",d.i32_add(d.getLocal("p1"),d.i32_const(a*2))))}function u(){const S=t.addFunction(n+"_isZeroAffine");S.addParam("p1","i32"),S.setReturnType("i32");const d=S.getCodeBuilder();S.addCode(d.i32_and(d.call(r+"_isZero",d.getLocal("p1")),d.call(r+"_isZero",d.i32_add(d.getLocal("p1"),d.i32_const(a)))))}function l(){const S=t.addFunction(n+"_copy");S.addParam("ps","i32"),S.addParam("pd","i32");const d=S.getCodeBuilder();for(let $=0;$=0;)P[N]=P[N+1].modPow(2,c),N--;const M=[],z=ka(1).shiftLeft(s*8).mod(c);for(let $=0;$>R);return f}const et=Array(256);for(let $=0;$<256;$++)et[$]=G($);const w=t.alloc(et);function g(){const $=t.addFunction(n+"__log2");$.addParam("n","i32"),$.setReturnType("i32"),$.addLocal("bits","i32"),$.addLocal("aux","i32");const f=$.getCodeBuilder();$.addCode(f.setLocal("aux",f.i32_shr_u(f.getLocal("n"),f.i32_const(1)))),$.addCode(f.setLocal("bits",f.i32_const(0))),$.addCode(f.block(f.loop(f.br_if(1,f.i32_eqz(f.getLocal("aux"))),f.setLocal("aux",f.i32_shr_u(f.getLocal("aux"),f.i32_const(1))),f.setLocal("bits",f.i32_add(f.getLocal("bits"),f.i32_const(1))),f.br(0)))),$.addCode(f.if(f.i32_ne(f.getLocal("n"),f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.unreachable())),$.addCode(f.if(f.i32_gt_u(f.getLocal("bits"),f.i32_const(_)),f.unreachable())),$.addCode(f.getLocal("bits"))}function E(){const $=t.addFunction(n+"_fft");$.addParam("px","i32"),$.addParam("n","i32"),$.addLocal("bits","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s));$.addCode(f.setLocal("bits",f.call(n+"__log2",f.getLocal("n"))),f.call(i+"_one",R),f.call(n+"_rawfft",f.getLocal("px"),f.getLocal("bits"),f.i32_const(0),R))}function U(){const $=t.addFunction(n+"_ifft");$.addParam("px","i32"),$.addParam("n","i32"),$.addLocal("bits","i32"),$.addLocal("pInv2","i32");const f=$.getCodeBuilder();$.addCode(f.setLocal("bits",f.call(n+"__log2",f.getLocal("n"))),f.setLocal("pInv2",f.i32_add(f.i32_const(it),f.i32_mul(f.getLocal("bits"),f.i32_const(s)))),f.call(n+"_rawfft",f.getLocal("px"),f.getLocal("bits"),f.i32_const(1),f.getLocal("pInv2")))}function Q(){const $=t.addFunction(n+"_rawfft");$.addParam("px","i32"),$.addParam("bits","i32"),$.addParam("reverse","i32"),$.addParam("mulFactor","i32"),$.addLocal("s","i32"),$.addLocal("k","i32"),$.addLocal("j","i32"),$.addLocal("m","i32"),$.addLocal("mdiv2","i32"),$.addLocal("n","i32"),$.addLocal("pwm","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l)),x=f.i32_const(t.alloc(l));$.addCode(f.call(n+"__reversePermutation",f.getLocal("px"),f.getLocal("bits")),f.setLocal("n",f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.setLocal("s",f.i32_const(1)),f.block(f.loop(f.br_if(1,f.i32_gt_u(f.getLocal("s"),f.getLocal("bits"))),f.setLocal("m",f.i32_shl(f.i32_const(1),f.getLocal("s"))),f.setLocal("pwm",f.i32_add(f.i32_const(I),f.i32_mul(f.getLocal("s"),f.i32_const(s)))),f.setLocal("k",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_ge_u(f.getLocal("k"),f.getLocal("n"))),f.call(i+"_one",R),f.setLocal("mdiv2",f.i32_shr_u(f.getLocal("m"),f.i32_const(1))),f.setLocal("j",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_ge_u(f.getLocal("j"),f.getLocal("mdiv2"))),f.setLocal("idx1",f.i32_add(f.getLocal("px"),f.i32_mul(f.i32_add(f.getLocal("k"),f.getLocal("j")),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("idx1"),f.i32_mul(f.getLocal("mdiv2"),f.i32_const(l)))),f.call(o,f.getLocal("idx2"),R,k),f.call(r+"_copy",f.getLocal("idx1"),x),f.call(r+"_add",x,k,f.getLocal("idx1")),f.call(r+"_sub",x,k,f.getLocal("idx2")),f.call(i+"_mul",R,f.getLocal("pwm"),R),f.setLocal("j",f.i32_add(f.getLocal("j"),f.i32_const(1))),f.br(0))),f.setLocal("k",f.i32_add(f.getLocal("k"),f.getLocal("m"))),f.br(0))),f.setLocal("s",f.i32_add(f.getLocal("s"),f.i32_const(1))),f.br(0))),f.call(n+"__fftFinal",f.getLocal("px"),f.getLocal("bits"),f.getLocal("reverse"),f.getLocal("mulFactor")))}function T(){const $=t.addFunction(n+"__fftFinal");$.addParam("px","i32"),$.addParam("bits","i32"),$.addParam("reverse","i32"),$.addParam("mulFactor","i32"),$.addLocal("n","i32"),$.addLocal("ndiv2","i32"),$.addLocal("pInv2","i32"),$.addLocal("i","i32"),$.addLocal("mask","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(l));$.addCode(f.if(f.i32_and(f.i32_eqz(f.getLocal("reverse")),f.call(i+"_isOne",f.getLocal("mulFactor"))),f.ret([])),f.setLocal("n",f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.setLocal("mask",f.i32_sub(f.getLocal("n"),f.i32_const(1))),f.setLocal("i",f.i32_const(1)),f.setLocal("ndiv2",f.i32_shr_u(f.getLocal("n"),f.i32_const(1))),f.block(f.loop(f.br_if(1,f.i32_ge_u(f.getLocal("i"),f.getLocal("ndiv2"))),f.setLocal("idx1",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("px"),f.i32_mul(f.i32_sub(f.getLocal("n"),f.getLocal("i")),f.i32_const(l)))),f.if(f.getLocal("reverse"),f.if(f.call(i+"_isOne",f.getLocal("mulFactor")),[...f.call(r+"_copy",f.getLocal("idx1"),R),...f.call(r+"_copy",f.getLocal("idx2"),f.getLocal("idx1")),...f.call(r+"_copy",R,f.getLocal("idx2"))],[...f.call(r+"_copy",f.getLocal("idx1"),R),...f.call(o,f.getLocal("idx2"),f.getLocal("mulFactor"),f.getLocal("idx1")),...f.call(o,R,f.getLocal("mulFactor"),f.getLocal("idx2"))]),f.if(f.call(i+"_isOne",f.getLocal("mulFactor")),[],[...f.call(o,f.getLocal("idx1"),f.getLocal("mulFactor"),f.getLocal("idx1")),...f.call(o,f.getLocal("idx2"),f.getLocal("mulFactor"),f.getLocal("idx2"))])),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))),f.if(f.call(i+"_isOne",f.getLocal("mulFactor")),[],[...f.call(o,f.getLocal("px"),f.getLocal("mulFactor"),f.getLocal("px")),...f.setLocal("idx2",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("ndiv2"),f.i32_const(l)))),...f.call(o,f.getLocal("idx2"),f.getLocal("mulFactor"),f.getLocal("idx2"))]))}function Y(){const $=t.addFunction(n+"__reversePermutation");$.addParam("px","i32"),$.addParam("bits","i32"),$.addLocal("n","i32"),$.addLocal("i","i32"),$.addLocal("ri","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(l));$.addCode(f.setLocal("n",f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("ri",f.call(n+"__rev",f.getLocal("i"),f.getLocal("bits"))),f.setLocal("idx2",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("ri"),f.i32_const(l)))),f.if(f.i32_lt_u(f.getLocal("i"),f.getLocal("ri")),[...f.call(r+"_copy",f.getLocal("idx1"),R),...f.call(r+"_copy",f.getLocal("idx2"),f.getLocal("idx1")),...f.call(r+"_copy",R,f.getLocal("idx2"))]),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function J(){const $=t.addFunction(n+"__rev");$.addParam("x","i32"),$.addParam("bits","i32"),$.setReturnType("i32");const f=$.getCodeBuilder();$.addCode(f.i32_rotl(f.i32_add(f.i32_add(f.i32_shl(f.i32_load8_u(f.i32_and(f.getLocal("x"),f.i32_const(255)),w,0),f.i32_const(24)),f.i32_shl(f.i32_load8_u(f.i32_and(f.i32_shr_u(f.getLocal("x"),f.i32_const(8)),f.i32_const(255)),w,0),f.i32_const(16))),f.i32_add(f.i32_shl(f.i32_load8_u(f.i32_and(f.i32_shr_u(f.getLocal("x"),f.i32_const(16)),f.i32_const(255)),w,0),f.i32_const(8)),f.i32_load8_u(f.i32_and(f.i32_shr_u(f.getLocal("x"),f.i32_const(24)),f.i32_const(255)),w,0))),f.getLocal("bits")))}function V(){const $=t.addFunction(n+"_fftJoin");$.addParam("pBuff1","i32"),$.addParam("pBuff2","i32"),$.addParam("n","i32"),$.addParam("first","i32"),$.addParam("inc","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l)),x=f.i32_const(t.alloc(l));$.addCode(f.call(i+"_copy",f.getLocal("first"),R),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff1"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("pBuff2"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.call(o,f.getLocal("idx2"),R,k),f.call(r+"_copy",f.getLocal("idx1"),x),f.call(r+"_add",x,k,f.getLocal("idx1")),f.call(r+"_sub",x,k,f.getLocal("idx2")),f.call(i+"_mul",R,f.getLocal("inc"),R),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function C(){const $=t.addFunction(n+"_fftJoinExt");$.addParam("pBuff1","i32"),$.addParam("pBuff2","i32"),$.addParam("n","i32"),$.addParam("first","i32"),$.addParam("inc","i32"),$.addParam("totalBits","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32"),$.addLocal("pShiftToM","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l));$.addCode(f.setLocal("pShiftToM",f.i32_add(f.i32_const(Z),f.i32_mul(f.getLocal("totalBits"),f.i32_const(s)))),f.call(i+"_copy",f.getLocal("first"),R),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff1"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("pBuff2"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.call(r+"_add",f.getLocal("idx1"),f.getLocal("idx2"),k),f.call(o,f.getLocal("idx2"),f.getLocal("pShiftToM"),f.getLocal("idx2")),f.call(r+"_add",f.getLocal("idx1"),f.getLocal("idx2"),f.getLocal("idx2")),f.call(o,f.getLocal("idx2"),R,f.getLocal("idx2")),f.call(r+"_copy",k,f.getLocal("idx1")),f.call(i+"_mul",R,f.getLocal("inc"),R),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function O(){const $=t.addFunction(n+"_fftJoinExtInv");$.addParam("pBuff1","i32"),$.addParam("pBuff2","i32"),$.addParam("n","i32"),$.addParam("first","i32"),$.addParam("inc","i32"),$.addParam("totalBits","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32"),$.addLocal("pShiftToM","i32"),$.addLocal("pSConst","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l));$.addCode(f.setLocal("pShiftToM",f.i32_add(f.i32_const(Z),f.i32_mul(f.getLocal("totalBits"),f.i32_const(s)))),f.setLocal("pSConst",f.i32_add(f.i32_const(K),f.i32_mul(f.getLocal("totalBits"),f.i32_const(s)))),f.call(i+"_copy",f.getLocal("first"),R),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff1"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("pBuff2"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.call(o,f.getLocal("idx2"),R,k),f.call(r+"_sub",f.getLocal("idx1"),k,f.getLocal("idx2")),f.call(o,f.getLocal("idx2"),f.getLocal("pSConst"),f.getLocal("idx2")),f.call(o,f.getLocal("idx1"),f.getLocal("pShiftToM"),f.getLocal("idx1")),f.call(r+"_sub",k,f.getLocal("idx1"),f.getLocal("idx1")),f.call(o,f.getLocal("idx1"),f.getLocal("pSConst"),f.getLocal("idx1")),f.call(i+"_mul",R,f.getLocal("inc"),R),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function lt(){const $=t.addFunction(n+"_prepareLagrangeEvaluation");$.addParam("pBuff1","i32"),$.addParam("pBuff2","i32"),$.addParam("n","i32"),$.addParam("first","i32"),$.addParam("inc","i32"),$.addParam("totalBits","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32"),$.addLocal("pShiftToM","i32"),$.addLocal("pSConst","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l));$.addCode(f.setLocal("pShiftToM",f.i32_add(f.i32_const(Z),f.i32_mul(f.getLocal("totalBits"),f.i32_const(s)))),f.setLocal("pSConst",f.i32_add(f.i32_const(K),f.i32_mul(f.getLocal("totalBits"),f.i32_const(s)))),f.call(i+"_copy",f.getLocal("first"),R),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff1"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("pBuff2"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.call(o,f.getLocal("idx1"),f.getLocal("pShiftToM"),k),f.call(r+"_sub",f.getLocal("idx2"),k,k),f.call(r+"_sub",f.getLocal("idx1"),f.getLocal("idx2"),f.getLocal("idx2")),f.call(o,k,f.getLocal("pSConst"),f.getLocal("idx1")),f.call(o,f.getLocal("idx2"),R,f.getLocal("idx2")),f.call(i+"_mul",R,f.getLocal("inc"),R),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function S(){const $=t.addFunction(n+"_fftMix");$.addParam("pBuff","i32"),$.addParam("n","i32"),$.addParam("exp","i32"),$.addLocal("nGroups","i32"),$.addLocal("nPerGroup","i32"),$.addLocal("nPerGroupDiv2","i32"),$.addLocal("pairOffset","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32"),$.addLocal("j","i32"),$.addLocal("pwm","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(s)),k=f.i32_const(t.alloc(l)),x=f.i32_const(t.alloc(l));$.addCode(f.setLocal("nPerGroup",f.i32_shl(f.i32_const(1),f.getLocal("exp"))),f.setLocal("nPerGroupDiv2",f.i32_shr_u(f.getLocal("nPerGroup"),f.i32_const(1))),f.setLocal("nGroups",f.i32_shr_u(f.getLocal("n"),f.getLocal("exp"))),f.setLocal("pairOffset",f.i32_mul(f.getLocal("nPerGroupDiv2"),f.i32_const(l))),f.setLocal("pwm",f.i32_add(f.i32_const(I),f.i32_mul(f.getLocal("exp"),f.i32_const(s)))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("nGroups"))),f.call(i+"_one",R),f.setLocal("j",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("j"),f.getLocal("nPerGroupDiv2"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff"),f.i32_mul(f.i32_add(f.i32_mul(f.getLocal("i"),f.getLocal("nPerGroup")),f.getLocal("j")),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("idx1"),f.getLocal("pairOffset"))),f.call(o,f.getLocal("idx2"),R,k),f.call(r+"_copy",f.getLocal("idx1"),x),f.call(r+"_add",x,k,f.getLocal("idx1")),f.call(r+"_sub",x,k,f.getLocal("idx2")),f.call(i+"_mul",R,f.getLocal("pwm"),R),f.setLocal("j",f.i32_add(f.getLocal("j"),f.i32_const(1))),f.br(0))),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}function d(){const $=t.addFunction(n+"_fftFinal");$.addParam("pBuff","i32"),$.addParam("n","i32"),$.addParam("factor","i32"),$.addLocal("idx1","i32"),$.addLocal("idx2","i32"),$.addLocal("i","i32"),$.addLocal("ndiv2","i32");const f=$.getCodeBuilder(),R=f.i32_const(t.alloc(l));$.addCode(f.setLocal("ndiv2",f.i32_shr_u(f.getLocal("n"),f.i32_const(1))),f.if(f.i32_and(f.getLocal("n"),f.i32_const(1)),f.call(o,f.i32_add(f.getLocal("pBuff"),f.i32_mul(f.getLocal("ndiv2"),f.i32_const(l))),f.getLocal("factor"),f.i32_add(f.getLocal("pBuff"),f.i32_mul(f.getLocal("ndiv2"),f.i32_const(l))))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_ge_u(f.getLocal("i"),f.getLocal("ndiv2"))),f.setLocal("idx1",f.i32_add(f.getLocal("pBuff"),f.i32_mul(f.getLocal("i"),f.i32_const(l)))),f.setLocal("idx2",f.i32_add(f.getLocal("pBuff"),f.i32_mul(f.i32_sub(f.i32_sub(f.getLocal("n"),f.i32_const(1)),f.getLocal("i")),f.i32_const(l)))),f.call(o,f.getLocal("idx2"),f.getLocal("factor"),R),f.call(o,f.getLocal("idx1"),f.getLocal("factor"),f.getLocal("idx2")),f.call(r+"_copy",R,f.getLocal("idx1")),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}J(),Y(),T(),Q(),g(),E(),U(),V(),C(),O(),S(),d(),lt(),t.exportFunction(n+"_fft"),t.exportFunction(n+"_ifft"),t.exportFunction(n+"_rawfft"),t.exportFunction(n+"_fftJoin"),t.exportFunction(n+"_fftJoinExt"),t.exportFunction(n+"_fftJoinExtInv"),t.exportFunction(n+"_fftMix"),t.exportFunction(n+"_fftFinal"),t.exportFunction(n+"_prepareLagrangeEvaluation")},Ix=function(t,n,r){const o=t.modules[r].n64*8;function a(){const u=t.addFunction(n+"_zero");u.addParam("px","i32"),u.addParam("n","i32"),u.addLocal("lastp","i32"),u.addLocal("p","i32");const l=u.getCodeBuilder();u.addCode(l.setLocal("p",l.getLocal("px")),l.setLocal("lastp",l.i32_add(l.getLocal("px"),l.i32_mul(l.getLocal("n"),l.i32_const(o)))),l.block(l.loop(l.br_if(1,l.i32_eq(l.getLocal("p"),l.getLocal("lastp"))),l.call(r+"_zero",l.getLocal("p")),l.setLocal("p",l.i32_add(l.getLocal("p"),l.i32_const(o))),l.br(0))))}function s(){const u=t.addFunction(n+"_constructLC");u.addParam("ppolynomials","i32"),u.addParam("psignals","i32"),u.addParam("nSignals","i32"),u.addParam("pres","i32"),u.addLocal("i","i32"),u.addLocal("j","i32"),u.addLocal("pp","i32"),u.addLocal("ps","i32"),u.addLocal("pd","i32"),u.addLocal("ncoefs","i32");const l=u.getCodeBuilder(),c=l.i32_const(t.alloc(o));u.addCode(l.setLocal("i",l.i32_const(0)),l.setLocal("pp",l.getLocal("ppolynomials")),l.setLocal("ps",l.getLocal("psignals")),l.block(l.loop(l.br_if(1,l.i32_eq(l.getLocal("i"),l.getLocal("nSignals"))),l.setLocal("ncoefs",l.i32_load(l.getLocal("pp"))),l.setLocal("pp",l.i32_add(l.getLocal("pp"),l.i32_const(4))),l.setLocal("j",l.i32_const(0)),l.block(l.loop(l.br_if(1,l.i32_eq(l.getLocal("j"),l.getLocal("ncoefs"))),l.setLocal("pd",l.i32_add(l.getLocal("pres"),l.i32_mul(l.i32_load(l.getLocal("pp")),l.i32_const(o)))),l.setLocal("pp",l.i32_add(l.getLocal("pp"),l.i32_const(4))),l.call(r+"_mul",l.getLocal("ps"),l.getLocal("pp"),c),l.call(r+"_add",c,l.getLocal("pd"),l.getLocal("pd")),l.setLocal("pp",l.i32_add(l.getLocal("pp"),l.i32_const(o))),l.setLocal("j",l.i32_add(l.getLocal("j"),l.i32_const(1))),l.br(0))),l.setLocal("ps",l.i32_add(l.getLocal("ps"),l.i32_const(o))),l.setLocal("i",l.i32_add(l.getLocal("i"),l.i32_const(1))),l.br(0))))}return a(),s(),t.exportFunction(n+"_zero"),t.exportFunction(n+"_constructLC"),n},Ex=function(t,n,r){const o=t.modules[r].n64*8;function a(){const l=t.addFunction(n+"_buildABC");l.addParam("pCoefs","i32"),l.addParam("nCoefs","i32"),l.addParam("pWitness","i32"),l.addParam("pA","i32"),l.addParam("pB","i32"),l.addParam("pC","i32"),l.addParam("offsetOut","i32"),l.addParam("nOut","i32"),l.addParam("offsetWitness","i32"),l.addParam("nWitness","i32"),l.addLocal("it","i32"),l.addLocal("ita","i32"),l.addLocal("itb","i32"),l.addLocal("last","i32"),l.addLocal("m","i32"),l.addLocal("c","i32"),l.addLocal("s","i32"),l.addLocal("pOut","i32");const c=l.getCodeBuilder(),h=c.i32_const(t.alloc(o));l.addCode(c.setLocal("ita",c.getLocal("pA")),c.setLocal("itb",c.getLocal("pB")),c.setLocal("last",c.i32_add(c.getLocal("pA"),c.i32_mul(c.getLocal("nOut"),c.i32_const(o)))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("ita"),c.getLocal("last"))),c.call(r+"_zero",c.getLocal("ita")),c.call(r+"_zero",c.getLocal("itb")),c.setLocal("ita",c.i32_add(c.getLocal("ita"),c.i32_const(o))),c.setLocal("itb",c.i32_add(c.getLocal("itb"),c.i32_const(o))),c.br(0))),c.setLocal("it",c.getLocal("pCoefs")),c.setLocal("last",c.i32_add(c.getLocal("pCoefs"),c.i32_mul(c.getLocal("nCoefs"),c.i32_const(o+12)))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("it"),c.getLocal("last"))),c.setLocal("s",c.i32_load(c.getLocal("it"),8)),c.if(c.i32_or(c.i32_lt_u(c.getLocal("s"),c.getLocal("offsetWitness")),c.i32_ge_u(c.getLocal("s"),c.i32_add(c.getLocal("offsetWitness"),c.getLocal("nWitness")))),[...c.setLocal("it",c.i32_add(c.getLocal("it"),c.i32_const(o+12))),...c.br(1)]),c.setLocal("m",c.i32_load(c.getLocal("it"))),c.if(c.i32_eq(c.getLocal("m"),c.i32_const(0)),c.setLocal("pOut",c.getLocal("pA")),c.if(c.i32_eq(c.getLocal("m"),c.i32_const(1)),c.setLocal("pOut",c.getLocal("pB")),[...c.setLocal("it",c.i32_add(c.getLocal("it"),c.i32_const(o+12))),...c.br(1)])),c.setLocal("c",c.i32_load(c.getLocal("it"),4)),c.if(c.i32_or(c.i32_lt_u(c.getLocal("c"),c.getLocal("offsetOut")),c.i32_ge_u(c.getLocal("c"),c.i32_add(c.getLocal("offsetOut"),c.getLocal("nOut")))),[...c.setLocal("it",c.i32_add(c.getLocal("it"),c.i32_const(o+12))),...c.br(1)]),c.setLocal("pOut",c.i32_add(c.getLocal("pOut"),c.i32_mul(c.i32_sub(c.getLocal("c"),c.getLocal("offsetOut")),c.i32_const(o)))),c.call(r+"_mul",c.i32_add(c.getLocal("pWitness"),c.i32_mul(c.i32_sub(c.getLocal("s"),c.getLocal("offsetWitness")),c.i32_const(o))),c.i32_add(c.getLocal("it"),c.i32_const(12)),h),c.call(r+"_add",c.getLocal("pOut"),h,c.getLocal("pOut")),c.setLocal("it",c.i32_add(c.getLocal("it"),c.i32_const(o+12))),c.br(0))),c.setLocal("ita",c.getLocal("pA")),c.setLocal("itb",c.getLocal("pB")),c.setLocal("it",c.getLocal("pC")),c.setLocal("last",c.i32_add(c.getLocal("pA"),c.i32_mul(c.getLocal("nOut"),c.i32_const(o)))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("ita"),c.getLocal("last"))),c.call(r+"_mul",c.getLocal("ita"),c.getLocal("itb"),c.getLocal("it")),c.setLocal("ita",c.i32_add(c.getLocal("ita"),c.i32_const(o))),c.setLocal("itb",c.i32_add(c.getLocal("itb"),c.i32_const(o))),c.setLocal("it",c.i32_add(c.getLocal("it"),c.i32_const(o))),c.br(0))))}function s(){const l=t.addFunction(n+"_joinABC");l.addParam("pA","i32"),l.addParam("pB","i32"),l.addParam("pC","i32"),l.addParam("n","i32"),l.addParam("pP","i32"),l.addLocal("ita","i32"),l.addLocal("itb","i32"),l.addLocal("itc","i32"),l.addLocal("itp","i32"),l.addLocal("last","i32");const c=l.getCodeBuilder(),h=c.i32_const(t.alloc(o));l.addCode(c.setLocal("ita",c.getLocal("pA")),c.setLocal("itb",c.getLocal("pB")),c.setLocal("itc",c.getLocal("pC")),c.setLocal("itp",c.getLocal("pP")),c.setLocal("last",c.i32_add(c.getLocal("pA"),c.i32_mul(c.getLocal("n"),c.i32_const(o)))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("ita"),c.getLocal("last"))),c.call(r+"_mul",c.getLocal("ita"),c.getLocal("itb"),h),c.call(r+"_sub",h,c.getLocal("itc"),c.getLocal("itp")),c.setLocal("ita",c.i32_add(c.getLocal("ita"),c.i32_const(o))),c.setLocal("itb",c.i32_add(c.getLocal("itb"),c.i32_const(o))),c.setLocal("itc",c.i32_add(c.getLocal("itc"),c.i32_const(o))),c.setLocal("itp",c.i32_add(c.getLocal("itp"),c.i32_const(o))),c.br(0))))}function u(){const l=t.addFunction(n+"_batchAdd");l.addParam("pa","i32"),l.addParam("pb","i32"),l.addParam("n","i32"),l.addParam("pr","i32"),l.addLocal("ita","i32"),l.addLocal("itb","i32"),l.addLocal("itr","i32"),l.addLocal("last","i32");const c=l.getCodeBuilder();l.addCode(c.setLocal("ita",c.getLocal("pa")),c.setLocal("itb",c.getLocal("pb")),c.setLocal("itr",c.getLocal("pr")),c.setLocal("last",c.i32_add(c.getLocal("pa"),c.i32_mul(c.getLocal("n"),c.i32_const(o)))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("ita"),c.getLocal("last"))),c.call(r+"_add",c.getLocal("ita"),c.getLocal("itb"),c.getLocal("itr")),c.setLocal("ita",c.i32_add(c.getLocal("ita"),c.i32_const(o))),c.setLocal("itb",c.i32_add(c.getLocal("itb"),c.i32_const(o))),c.setLocal("itr",c.i32_add(c.getLocal("itr"),c.i32_const(o))),c.br(0))))}return a(),s(),u(),t.exportFunction(n+"_buildABC"),t.exportFunction(n+"_joinABC"),t.exportFunction(n+"_batchAdd"),n},Bx=function(t,n,r,i,o,a,s,u){const l=t.addFunction(n);l.addParam("pIn","i32"),l.addParam("n","i32"),l.addParam("pFirst","i32"),l.addParam("pInc","i32"),l.addParam("pOut","i32"),l.addLocal("pOldFree","i32"),l.addLocal("i","i32"),l.addLocal("pFrom","i32"),l.addLocal("pTo","i32");const c=l.getCodeBuilder(),h=c.i32_const(t.alloc(s));l.addCode(c.setLocal("pFrom",c.getLocal("pIn")),c.setLocal("pTo",c.getLocal("pOut"))),l.addCode(c.call(i+"_copy",c.getLocal("pFirst"),h)),l.addCode(c.setLocal("i",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("i"),c.getLocal("n"))),c.call(u,c.getLocal("pFrom"),h,c.getLocal("pTo")),c.setLocal("pFrom",c.i32_add(c.getLocal("pFrom"),c.i32_const(o))),c.setLocal("pTo",c.i32_add(c.getLocal("pTo"),c.i32_const(a))),c.call(i+"_mul",h,c.getLocal("pInc"),h),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0)))),t.exportFunction(n)};const kt=Tt,Xt=Gi,tG=Y3,eG=xx,F4=Lx,nG=Cx,I4=Sx,sp=Fx,rG=Ix,iG=Ex,dl=Bx;var oG=function(t,n){const r=n||"bn128";if(t.modules[r])return r;const i=kt("21888242871839275222246405745257275088696311157297823662689037894645226208583"),o=kt("21888242871839275222246405745257275088548364400416034343698204186575808495617"),a=Math.floor((i.minus(1).bitLength()-1)/64)+1,s=a*8,u=s,l=s,c=l*2,h=l*12,_=t.alloc(Xt.bigInt2BytesLE(o,u)),v=tG(t,i,"f1m");eG(t,o,"fr","frm");const P=t.alloc(Xt.bigInt2BytesLE(H(kt(3)),l)),N=I4(t,"g1m","f1m",P);sp(t,"frm","frm","frm","frm_mul"),rG(t,"pol","frm"),iG(t,"qap","frm");const M=F4(t,"f1m_neg","f2m","f1m"),z=t.alloc([...Xt.bigInt2BytesLE(H(kt("19485874751759354771024239261021720505790618469301721065564631296452457478373")),l),...Xt.bigInt2BytesLE(H(kt("266929791119991161246907387137283842545076965332900288569378510910307636690")),l)]),I=I4(t,"g2m","f2m",z);function W(q,m){const b=t.addFunction(q);b.addParam("pG","i32"),b.addParam("pFr","i32"),b.addParam("pr","i32");const nt=b.getCodeBuilder(),ct=nt.i32_const(t.alloc(s));b.addCode(nt.call("frm_fromMontgomery",nt.getLocal("pFr"),ct),nt.call(m,nt.getLocal("pG"),ct,nt.i32_const(s),nt.getLocal("pr"))),t.exportFunction(q)}W("g1m_timesFr","g1m_timesScalar"),sp(t,"g1m","g1m","frm","g1m_timesFr"),W("g2m_timesFr","g2m_timesScalar"),sp(t,"g2m","g2m","frm","g2m_timesFr"),W("g1m_timesFrAffine","g1m_timesScalarAffine"),W("g2m_timesFrAffine","g2m_timesScalarAffine"),dl(t,"frm_batchApplyKey","fmr","frm",s,s,s,"frm_mul"),dl(t,"g1m_batchApplyKey","g1m","frm",s*3,s*3,s,"g1m_timesFr"),dl(t,"g1m_batchApplyKeyMixed","g1m","frm",s*2,s*3,s,"g1m_timesFrAffine"),dl(t,"g2m_batchApplyKey","g2m","frm",s*2*3,s*3*2,s,"g2m_timesFr"),dl(t,"g2m_batchApplyKeyMixed","g2m","frm",s*2*2,s*3*2,s,"g2m_timesFrAffine");function H(q){return kt(q).times(kt.one.shiftLeft(l*8)).mod(i)}const it=[kt("1"),kt("2"),kt.one],B=t.alloc([...Xt.bigInt2BytesLE(H(it[0]),l),...Xt.bigInt2BytesLE(H(it[1]),l),...Xt.bigInt2BytesLE(H(it[2]),l)]),p=[kt.zero,kt.one,kt.zero],L=t.alloc([...Xt.bigInt2BytesLE(H(p[0]),l),...Xt.bigInt2BytesLE(H(p[1]),l),...Xt.bigInt2BytesLE(H(p[2]),l)]),Z=[[kt("10857046999023057135944570762232829481370756359578518086990519993285655852781"),kt("11559732032986387107991004021392285783925812861821192530917403151452391805634")],[kt("8495653923123431417604973247489272438418190587263600148770280649306958101930"),kt("4082367875863433681332203403145435568316851327593401208105741076214120093531")],[kt.one,kt.zero]],K=t.alloc([...Xt.bigInt2BytesLE(H(Z[0][0]),l),...Xt.bigInt2BytesLE(H(Z[0][1]),l),...Xt.bigInt2BytesLE(H(Z[1][0]),l),...Xt.bigInt2BytesLE(H(Z[1][1]),l),...Xt.bigInt2BytesLE(H(Z[2][0]),l),...Xt.bigInt2BytesLE(H(Z[2][1]),l)]),G=[[kt.zero,kt.zero],[kt.one,kt.zero],[kt.zero,kt.zero]],et=t.alloc([...Xt.bigInt2BytesLE(H(G[0][0]),l),...Xt.bigInt2BytesLE(H(G[0][1]),l),...Xt.bigInt2BytesLE(H(G[1][0]),l),...Xt.bigInt2BytesLE(H(G[1][1]),l),...Xt.bigInt2BytesLE(H(G[2][0]),l),...Xt.bigInt2BytesLE(H(G[2][1]),l)]),w=t.alloc([...Xt.bigInt2BytesLE(H(1),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l),...Xt.bigInt2BytesLE(H(0),l)]),g=t.alloc([...Xt.bigInt2BytesLE(H(9),l),...Xt.bigInt2BytesLE(H(1),l)]),E=t.alloc([...Xt.bigInt2BytesLE(H(kt(2).modInv(i)),l),...Xt.bigInt2BytesLE(kt(0),l)]),U=g,Q=t.alloc([...Xt.bigInt2BytesLE(H("19485874751759354771024239261021720505790618469301721065564631296452457478373"),l),...Xt.bigInt2BytesLE(H("266929791119991161246907387137283842545076965332900288569378510910307636690"),l)]);function T(){const q=t.addFunction(r+"_mulNR6");q.addParam("x","i32"),q.addParam("pr","i32");const m=q.getCodeBuilder();q.addCode(m.call(M+"_mul",m.i32_const(g),m.getLocal("x"),m.getLocal("pr")))}T();const Y=nG(t,r+"_mulNR6","f6m","f2m");function J(){const q=t.addFunction(r+"_mulNR12");q.addParam("x","i32"),q.addParam("pr","i32");const m=q.getCodeBuilder();q.addCode(m.call(M+"_mul",m.i32_const(g),m.i32_add(m.getLocal("x"),m.i32_const(s*4)),m.getLocal("pr")),m.call(M+"_copy",m.getLocal("x"),m.i32_add(m.getLocal("pr"),m.i32_const(s*2))),m.call(M+"_copy",m.i32_add(m.getLocal("x"),m.i32_const(s*2)),m.i32_add(m.getLocal("pr"),m.i32_const(s*4))))}J();const V=F4(t,r+"_mulNR12","ftm",Y),C=kt("29793968203157093288"),O=_t(C),lt=t.alloc(O),S=3*c,d=O.length-1,f=O.reduce((q,m)=>q+(m!=0?1:0),0)+d+1,R=3*2*s,k=3*s*2+f*S;t.modules[r]={n64:a,pG1gen:B,pG1zero:L,pG1b:P,pG2gen:K,pG2zero:et,pG2b:z,pq:t.modules.f1m.pq,pr:_,pOneT:w,prePSize:R,preQSize:k,r:o.toString(),q:i.toString()};const x=kt("4965661367192848881");function ot(q){let m=q;const b=[];for(;m.gt(kt.zero);){if(m.isOdd()){const nt=2-m.mod(4).toJSNumber();b.push(nt),m=m.minus(nt)}else b.push(0);m=m.shiftRight(1)}return b}function _t(q){let m=q;const b=[];for(;m.gt(kt.zero);)m.isOdd()?b.push(1):b.push(0),m=m.shiftRight(1);return b}function dt(){const q=t.addFunction(r+"_prepareG1");q.addParam("pP","i32"),q.addParam("ppreP","i32");const m=q.getCodeBuilder();q.addCode(m.call(N+"_normalize",m.getLocal("pP"),m.getLocal("ppreP")))}function bt(){const q=t.addFunction(r+"_prepAddStep");q.addParam("pQ","i32"),q.addParam("pR","i32"),q.addParam("pCoef","i32");const m=q.getCodeBuilder(),b=m.getLocal("pQ"),nt=m.i32_add(m.getLocal("pQ"),m.i32_const(c)),ct=m.getLocal("pR"),rt=m.i32_add(m.getLocal("pR"),m.i32_const(c)),ft=m.i32_add(m.getLocal("pR"),m.i32_const(2*c)),ut=m.getLocal("pCoef"),gt=m.i32_add(m.getLocal("pCoef"),m.i32_const(c)),mt=m.i32_add(m.getLocal("pCoef"),m.i32_const(2*c)),xt=gt,vt=m.i32_const(t.alloc(c)),Bt=m.i32_const(t.alloc(c)),Vt=m.i32_const(t.alloc(c)),zt=m.i32_const(t.alloc(c)),Mt=m.i32_const(t.alloc(c)),Gt=m.i32_const(t.alloc(c)),Nt=m.i32_const(t.alloc(c));q.addCode(m.call(M+"_mul",b,ft,xt),m.call(M+"_sub",ct,xt,xt),m.call(M+"_mul",nt,ft,vt),m.call(M+"_sub",rt,vt,vt),m.call(M+"_square",xt,Bt),m.call(M+"_square",vt,Vt),m.call(M+"_mul",xt,Bt,zt),m.call(M+"_mul",ct,Bt,Mt),m.call(M+"_add",Mt,Mt,Nt),m.call(M+"_mul",ft,Vt,Gt),m.call(M+"_add",zt,Gt,Gt),m.call(M+"_sub",Gt,Nt,Gt),m.call(M+"_mul",xt,Gt,ct),m.call(M+"_mul",zt,rt,rt),m.call(M+"_sub",Mt,Gt,Nt),m.call(M+"_mul",vt,Nt,Nt),m.call(M+"_sub",Nt,rt,rt),m.call(M+"_mul",ft,zt,ft),m.call(M+"_mul",xt,nt,Nt),m.call(M+"_mul",vt,b,ut),m.call(M+"_sub",ut,Nt,ut),m.call(M+"_mul",ut,m.i32_const(U),ut),m.call(M+"_neg",vt,mt))}function Ut(){const q=t.addFunction(r+"_prepDblStep");q.addParam("pR","i32"),q.addParam("pCoef","i32");const m=q.getCodeBuilder(),b=m.getLocal("pR"),nt=m.i32_add(m.getLocal("pR"),m.i32_const(c)),ct=m.i32_add(m.getLocal("pR"),m.i32_const(2*c)),rt=m.getLocal("pCoef"),ft=m.i32_add(m.getLocal("pCoef"),m.i32_const(c)),ut=m.i32_add(m.getLocal("pCoef"),m.i32_const(2*c)),gt=m.i32_const(t.alloc(c)),mt=m.i32_const(t.alloc(c)),xt=m.i32_const(t.alloc(c)),vt=m.i32_const(t.alloc(c)),Bt=m.i32_const(t.alloc(c)),Vt=m.i32_const(t.alloc(c)),zt=m.i32_const(t.alloc(c)),Mt=m.i32_const(t.alloc(c)),Gt=m.i32_const(t.alloc(c)),Nt=m.i32_const(t.alloc(c)),Qt=m.i32_const(t.alloc(c)),Ht=m.i32_const(t.alloc(c));q.addCode(m.call(M+"_mul",nt,m.i32_const(E),gt),m.call(M+"_mul",b,gt,gt),m.call(M+"_square",nt,mt),m.call(M+"_square",ct,xt),m.call(M+"_add",xt,xt,vt),m.call(M+"_add",vt,xt,vt),m.call(M+"_mul",m.i32_const(Q),vt,Bt),m.call(M+"_add",Bt,Bt,Vt),m.call(M+"_add",Bt,Vt,Vt),m.call(M+"_add",mt,Vt,zt),m.call(M+"_mul",zt,m.i32_const(E),zt),m.call(M+"_add",mt,xt,Ht),m.call(M+"_add",nt,ct,Mt),m.call(M+"_square",Mt,Mt),m.call(M+"_sub",Mt,Ht,Mt),m.call(M+"_sub",Bt,mt,Gt),m.call(M+"_square",b,Nt),m.call(M+"_square",Bt,Qt),m.call(M+"_sub",mt,Vt,Ht),m.call(M+"_mul",gt,Ht,b),m.call(M+"_add",Qt,Qt,Ht),m.call(M+"_add",Qt,Ht,Ht),m.call(M+"_square",zt,nt),m.call(M+"_sub",nt,Ht,nt),m.call(M+"_mul",mt,Mt,ct),m.call(M+"_mul",m.i32_const(U),Gt,rt),m.call(M+"_neg",Mt,ft),m.call(M+"_add",Nt,Nt,ut),m.call(M+"_add",Nt,ut,ut))}function Pt(){const q=t.addFunction(r+"_mulByQ");q.addParam("p1","i32"),q.addParam("pr","i32");const m=q.getCodeBuilder(),b=m.getLocal("p1"),nt=m.i32_add(m.getLocal("p1"),m.i32_const(c)),ct=m.i32_add(m.getLocal("p1"),m.i32_const(c*2)),rt=m.getLocal("pr"),ft=m.i32_add(m.getLocal("pr"),m.i32_const(c)),ut=m.i32_add(m.getLocal("pr"),m.i32_const(c*2)),gt=m.i32_const(t.alloc([...Xt.bigInt2BytesLE(H("21575463638280843010398324269430826099269044274347216827212613867836435027261"),l),...Xt.bigInt2BytesLE(H("10307601595873709700152284273816112264069230130616436755625194854815875713954"),l)])),mt=m.i32_const(t.alloc([...Xt.bigInt2BytesLE(H("2821565182194536844548159561693502659359617185244120367078079554186484126554"),l),...Xt.bigInt2BytesLE(H("3505843767911556378687030309984248845540243509899259641013678093033130930403"),l)]));q.addCode(m.call(M+"_conjugate",b,rt),m.call(M+"_mul",gt,rt,rt),m.call(M+"_conjugate",nt,ft),m.call(M+"_mul",mt,ft,ft),m.call(M+"_conjugate",ct,ut))}function Ot(){Pt();const q=t.addFunction(r+"_prepareG2");q.addParam("pQ","i32"),q.addParam("ppreQ","i32"),q.addLocal("pCoef","i32"),q.addLocal("i","i32");const m=q.getCodeBuilder(),b=m.getLocal("pQ");m.i32_add(m.getLocal("pQ"),m.i32_const(c)),m.i32_add(m.getLocal("pQ"),m.i32_const(c*2));const nt=t.alloc(c*3),ct=m.i32_const(nt),rt=m.i32_const(nt),ft=m.i32_const(nt+c),ut=m.i32_const(nt+2*c),gt=m.i32_add(m.getLocal("ppreQ"),m.i32_const(0)),mt=m.i32_add(m.getLocal("ppreQ"),m.i32_const(c));m.i32_add(m.getLocal("ppreQ"),m.i32_const(c*2));const xt=t.alloc(c*3),vt=m.i32_const(xt),Bt=t.alloc(c*3),Vt=m.i32_const(Bt);m.i32_const(Bt);const zt=m.i32_const(Bt+c);m.i32_const(Bt+c*2),q.addCode(m.call(I+"_normalize",b,gt),m.call(M+"_copy",gt,rt),m.call(M+"_copy",mt,ft),m.call(M+"_one",ut)),q.addCode(m.setLocal("pCoef",m.i32_add(m.getLocal("ppreQ"),m.i32_const(c*3))),m.setLocal("i",m.i32_const(O.length-2)),m.block(m.loop(m.call(r+"_prepDblStep",ct,m.getLocal("pCoef")),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))),m.if(m.i32_load8_s(m.getLocal("i"),lt),[...m.call(r+"_prepAddStep",gt,ct,m.getLocal("pCoef")),...m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S)))]),m.br_if(1,m.i32_eqz(m.getLocal("i"))),m.setLocal("i",m.i32_sub(m.getLocal("i"),m.i32_const(1))),m.br(0)))),q.addCode(m.call(r+"_mulByQ",gt,vt),m.call(r+"_mulByQ",vt,Vt)),q.addCode(m.call(M+"_neg",zt,zt),m.call(r+"_prepAddStep",vt,ct,m.getLocal("pCoef")),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))),m.call(r+"_prepAddStep",Vt,ct,m.getLocal("pCoef")),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))))}function yt(){const q=t.addFunction(r+"__mulBy024Old");q.addParam("pEll0","i32"),q.addParam("pEllVW","i32"),q.addParam("pEllVV","i32"),q.addParam("pR","i32");const m=q.getCodeBuilder(),b=m.getLocal("pEll0"),nt=m.getLocal("pEllVV"),ct=m.getLocal("pEllVW"),rt=m.getLocal("pR"),ft=t.alloc(h),ut=m.i32_const(ft),gt=m.i32_const(ft),mt=m.i32_const(ft+c),xt=m.i32_const(ft+c*2),vt=m.i32_const(ft+c*3),Bt=m.i32_const(ft+c*4),Vt=m.i32_const(ft+c*5);q.addCode(m.call(M+"_copy",b,gt),m.call(M+"_zero",mt),m.call(M+"_copy",nt,xt),m.call(M+"_zero",vt),m.call(M+"_copy",ct,Bt),m.call(M+"_zero",Vt),m.call(V+"_mul",ut,rt,rt))}function It(){const q=t.addFunction(r+"__mulBy024");q.addParam("pEll0","i32"),q.addParam("pEllVW","i32"),q.addParam("pEllVV","i32"),q.addParam("pR","i32");const m=q.getCodeBuilder(),b=m.getLocal("pEll0"),nt=m.getLocal("pEllVV"),ct=m.getLocal("pEllVW"),rt=m.getLocal("pR"),ft=m.i32_add(m.getLocal("pR"),m.i32_const(2*s)),ut=m.i32_add(m.getLocal("pR"),m.i32_const(4*s)),gt=m.i32_add(m.getLocal("pR"),m.i32_const(6*s)),mt=m.i32_add(m.getLocal("pR"),m.i32_const(8*s)),xt=m.i32_add(m.getLocal("pR"),m.i32_const(10*s)),vt=m.i32_const(t.alloc(c)),Bt=m.i32_const(t.alloc(c)),Vt=m.i32_const(t.alloc(c)),zt=m.i32_const(t.alloc(c)),Mt=m.i32_const(t.alloc(c)),Gt=m.i32_const(t.alloc(c)),Nt=m.i32_const(t.alloc(c)),Qt=m.i32_const(t.alloc(c)),Ht=m.i32_const(t.alloc(c)),$t=m.i32_const(t.alloc(c)),Dt=m.i32_const(t.alloc(c));q.addCode(m.call(M+"_mul",rt,b,Nt),m.call(M+"_mul",ut,nt,Qt),m.call(M+"_mul",mt,ct,Ht),m.call(M+"_add",rt,mt,Vt),m.call(M+"_add",rt,ut,Bt),m.call(M+"_add",ft,gt,zt),m.call(M+"_add",zt,xt,zt),m.call(M+"_mul",ft,nt,$t),m.call(M+"_add",$t,Ht,Mt),m.call(M+"_mul",m.i32_const(g),Mt,Gt),m.call(M+"_add",Gt,Nt,rt),m.call(M+"_mul",xt,ct,Mt),m.call(M+"_add",$t,Mt,$t),m.call(M+"_add",Mt,Qt,Mt),m.call(M+"_mul",m.i32_const(g),Mt,Gt),m.call(M+"_mul",ft,b,Mt),m.call(M+"_add",$t,Mt,$t),m.call(M+"_add",Gt,Mt,ft),m.call(M+"_add",b,nt,vt),m.call(M+"_mul",Bt,vt,Mt),m.call(M+"_add",Nt,Qt,Dt),m.call(M+"_sub",Mt,Dt,Mt),m.call(M+"_mul",gt,ct,Gt),m.call(M+"_add",$t,Gt,$t),m.call(M+"_add",ut,mt,vt),m.call(M+"_add",Mt,Gt,ut),m.call(M+"_add",nt,ct,Bt),m.call(M+"_mul",Bt,vt,Mt),m.call(M+"_add",Qt,Ht,Dt),m.call(M+"_sub",Mt,Dt,Mt),m.call(M+"_mul",m.i32_const(g),Mt,Gt),m.call(M+"_mul",gt,b,Mt),m.call(M+"_add",$t,Mt,$t),m.call(M+"_add",Gt,Mt,gt),m.call(M+"_mul",xt,nt,Mt),m.call(M+"_add",$t,Mt,$t),m.call(M+"_mul",m.i32_const(g),Mt,Gt),m.call(M+"_add",b,ct,vt),m.call(M+"_mul",Vt,vt,Mt),m.call(M+"_add",Nt,Ht,Dt),m.call(M+"_sub",Mt,Dt,Mt),m.call(M+"_add",Gt,Mt,mt),m.call(M+"_add",b,nt,vt),m.call(M+"_add",vt,ct,vt),m.call(M+"_mul",zt,vt,Mt),m.call(M+"_sub",Mt,$t,xt))}function Ft(){const q=t.addFunction(r+"_millerLoop");q.addParam("ppreP","i32"),q.addParam("ppreQ","i32"),q.addParam("r","i32"),q.addLocal("pCoef","i32"),q.addLocal("i","i32");const m=q.getCodeBuilder(),b=m.getLocal("ppreP"),nt=m.i32_add(m.getLocal("ppreP"),m.i32_const(l)),ct=m.getLocal("pCoef"),rt=m.i32_add(m.getLocal("pCoef"),m.i32_const(c)),ft=m.i32_add(m.getLocal("pCoef"),m.i32_const(2*c)),ut=t.alloc(c),gt=m.i32_const(ut),mt=t.alloc(c),xt=m.i32_const(mt),vt=m.getLocal("r");q.addCode(m.call(V+"_one",vt),m.setLocal("pCoef",m.i32_add(m.getLocal("ppreQ"),m.i32_const(c*3))),m.setLocal("i",m.i32_const(O.length-2)),m.block(m.loop(m.call(V+"_square",vt,vt),m.call(M+"_mul1",rt,nt,gt),m.call(M+"_mul1",ft,b,xt),m.call(r+"__mulBy024",ct,gt,xt,vt),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))),m.if(m.i32_load8_s(m.getLocal("i"),lt),[...m.call(M+"_mul1",rt,nt,gt),...m.call(M+"_mul1",ft,b,xt),...m.call(r+"__mulBy024",ct,gt,xt,vt),...m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S)))]),m.br_if(1,m.i32_eqz(m.getLocal("i"))),m.setLocal("i",m.i32_sub(m.getLocal("i"),m.i32_const(1))),m.br(0)))),q.addCode(m.call(M+"_mul1",rt,nt,gt),m.call(M+"_mul1",ft,b,xt),m.call(r+"__mulBy024",ct,gt,xt,vt),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))),m.call(M+"_mul1",rt,nt,gt),m.call(M+"_mul1",ft,b,xt),m.call(r+"__mulBy024",ct,gt,xt,vt),m.setLocal("pCoef",m.i32_add(m.getLocal("pCoef"),m.i32_const(S))))}function Lt(q){const m=[[[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")]],[[kt("1"),kt("0")],[kt("8376118865763821496583973867626364092589906065868298776909617916018768340080"),kt("16469823323077808223889137241176536799009286646108169935659301613961712198316")],[kt("21888242871839275220042445260109153167277707414472061641714758635765020556617"),kt("0")],[kt("11697423496358154304825782922584725312912383441159505038794027105778954184319"),kt("303847389135065887422783454877609941456349188919719272345083954437860409601")],[kt("21888242871839275220042445260109153167277707414472061641714758635765020556616"),kt("0")],[kt("3321304630594332808241809054958361220322477375291206261884409189760185844239"),kt("5722266937896532885780051958958348231143373700109372999374820235121374419868")],[kt("21888242871839275222246405745257275088696311157297823662689037894645226208582"),kt("0")],[kt("13512124006075453725662431877630910996106405091429524885779419978626457868503"),kt("5418419548761466998357268504080738289687024511189653727029736280683514010267")],[kt("2203960485148121921418603742825762020974279258880205651966"),kt("0")],[kt("10190819375481120917420622822672549775783927716138318623895010788866272024264"),kt("21584395482704209334823622290379665147239961968378104390343953940207365798982")],[kt("2203960485148121921418603742825762020974279258880205651967"),kt("0")],[kt("18566938241244942414004596690298913868373833782006617400804628704885040364344"),kt("16165975933942742336466353786298926857552937457188450663314217659523851788715")]]],b=[[[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")],[kt("1"),kt("0")]],[[kt("1"),kt("0")],[kt("21575463638280843010398324269430826099269044274347216827212613867836435027261"),kt("10307601595873709700152284273816112264069230130616436755625194854815875713954")],[kt("21888242871839275220042445260109153167277707414472061641714758635765020556616"),kt("0")],[kt("3772000881919853776433695186713858239009073593817195771773381919316419345261"),kt("2236595495967245188281701248203181795121068902605861227855261137820944008926")],[kt("2203960485148121921418603742825762020974279258880205651966"),kt("0")],[kt("18429021223477853657660792034369865839114504446431234726392080002137598044644"),kt("9344045779998320333812420223237981029506012124075525679208581902008406485703")]],[[kt("1"),kt("0")],[kt("2581911344467009335267311115468803099551665605076196740867805258568234346338"),kt("19937756971775647987995932169929341994314640652964949448313374472400716661030")],[kt("2203960485148121921418603742825762020974279258880205651966"),kt("0")],[kt("5324479202449903542726783395506214481928257762400643279780343368557297135718"),kt("16208900380737693084919495127334387981393726419856888799917914180988844123039")],[kt("21888242871839275220042445260109153167277707414472061641714758635765020556616"),kt("0")],[kt("13981852324922362344252311234282257507216387789820983642040889267519694726527"),kt("7629828391165209371577384193250820201684255241773809077146787135900891633097")]]],nt=t.addFunction(r+"__frobeniusMap"+q);nt.addParam("x","i32"),nt.addParam("r","i32");const ct=nt.getCodeBuilder();for(let ft=0;ft<6;ft++){const ut=ft==0?ct.getLocal("x"):ct.i32_add(ct.getLocal("x"),ct.i32_const(ft*c)),gt=ut,mt=ct.i32_add(ct.getLocal("x"),ct.i32_const(ft*c+l)),xt=ft==0?ct.getLocal("r"):ct.i32_add(ct.getLocal("r"),ct.i32_const(ft*c)),vt=xt,Bt=ct.i32_add(ct.getLocal("r"),ct.i32_const(ft*c+l)),Vt=rt(m[Math.floor(ft/3)][q%12],b[ft%3][q%6]),zt=t.alloc([...Xt.bigInt2BytesLE(H(Vt[0]),32),...Xt.bigInt2BytesLE(H(Vt[1]),32)]);q%2==1?nt.addCode(ct.call(v+"_copy",gt,vt),ct.call(v+"_neg",mt,Bt),ct.call(M+"_mul",xt,ct.i32_const(zt),xt)):nt.addCode(ct.call(M+"_mul",ut,ct.i32_const(zt),xt))}function rt(ft,ut){const gt=kt(ft[0]),mt=kt(ft[1]),xt=kt(ut[0]),vt=kt(ut[1]),Bt=[gt.times(xt).minus(mt.times(vt)).mod(i),gt.times(vt).add(mt.times(xt)).mod(i)];return Bt[0].isNegative()&&(Bt[0]=Bt[0].add(i)),Bt}}function St(){const q=t.addFunction(r+"__finalExponentiationFirstChunk");q.addParam("x","i32"),q.addParam("r","i32");const m=q.getCodeBuilder(),b=m.getLocal("x"),nt=b,ct=m.i32_add(b,m.i32_const(s*6)),rt=m.getLocal("r"),ft=t.alloc(h),ut=m.i32_const(ft),gt=ut,mt=m.i32_const(ft+s*6),xt=m.i32_const(t.alloc(h)),vt=m.i32_const(t.alloc(h)),Bt=m.i32_const(t.alloc(h));q.addCode(m.call(Y+"_copy",nt,gt),m.call(Y+"_neg",ct,mt),m.call(V+"_inverse",b,xt),m.call(V+"_mul",ut,xt,vt),m.call(r+"__frobeniusMap2",vt,Bt),m.call(V+"_mul",vt,Bt,rt))}function Ct(){const q=t.addFunction(r+"__cyclotomicSquare");q.addParam("x","i32"),q.addParam("r","i32");const m=q.getCodeBuilder(),b=m.getLocal("x"),nt=m.i32_add(m.getLocal("x"),m.i32_const(c)),ct=m.i32_add(m.getLocal("x"),m.i32_const(2*c)),rt=m.i32_add(m.getLocal("x"),m.i32_const(3*c)),ft=m.i32_add(m.getLocal("x"),m.i32_const(4*c)),ut=m.i32_add(m.getLocal("x"),m.i32_const(5*c)),gt=m.getLocal("r"),mt=m.i32_add(m.getLocal("r"),m.i32_const(c)),xt=m.i32_add(m.getLocal("r"),m.i32_const(2*c)),vt=m.i32_add(m.getLocal("r"),m.i32_const(3*c)),Bt=m.i32_add(m.getLocal("r"),m.i32_const(4*c)),Vt=m.i32_add(m.getLocal("r"),m.i32_const(5*c)),zt=m.i32_const(t.alloc(c)),Mt=m.i32_const(t.alloc(c)),Gt=m.i32_const(t.alloc(c)),Nt=m.i32_const(t.alloc(c)),Qt=m.i32_const(t.alloc(c)),Ht=m.i32_const(t.alloc(c)),$t=m.i32_const(t.alloc(c)),Dt=m.i32_const(t.alloc(c));q.addCode(m.call(M+"_mul",b,ft,$t),m.call(M+"_mul",ft,m.i32_const(g),zt),m.call(M+"_add",b,zt,zt),m.call(M+"_add",b,ft,Dt),m.call(M+"_mul",Dt,zt,zt),m.call(M+"_mul",m.i32_const(g),$t,Dt),m.call(M+"_add",$t,Dt,Dt),m.call(M+"_sub",zt,Dt,zt),m.call(M+"_add",$t,$t,Mt),m.call(M+"_mul",rt,ct,$t),m.call(M+"_mul",ct,m.i32_const(g),Gt),m.call(M+"_add",rt,Gt,Gt),m.call(M+"_add",rt,ct,Dt),m.call(M+"_mul",Dt,Gt,Gt),m.call(M+"_mul",m.i32_const(g),$t,Dt),m.call(M+"_add",$t,Dt,Dt),m.call(M+"_sub",Gt,Dt,Gt),m.call(M+"_add",$t,$t,Nt),m.call(M+"_mul",nt,ut,$t),m.call(M+"_mul",ut,m.i32_const(g),Qt),m.call(M+"_add",nt,Qt,Qt),m.call(M+"_add",nt,ut,Dt),m.call(M+"_mul",Dt,Qt,Qt),m.call(M+"_mul",m.i32_const(g),$t,Dt),m.call(M+"_add",$t,Dt,Dt),m.call(M+"_sub",Qt,Dt,Qt),m.call(M+"_add",$t,$t,Ht),m.call(M+"_sub",zt,b,gt),m.call(M+"_add",gt,gt,gt),m.call(M+"_add",zt,gt,gt),m.call(M+"_add",Mt,ft,Bt),m.call(M+"_add",Bt,Bt,Bt),m.call(M+"_add",Mt,Bt,Bt),m.call(M+"_mul",Ht,m.i32_const(U),Dt),m.call(M+"_add",Dt,rt,vt),m.call(M+"_add",vt,vt,vt),m.call(M+"_add",Dt,vt,vt),m.call(M+"_sub",Qt,ct,xt),m.call(M+"_add",xt,xt,xt),m.call(M+"_add",Qt,xt,xt),m.call(M+"_sub",Gt,nt,mt),m.call(M+"_add",mt,mt,mt),m.call(M+"_add",Gt,mt,mt),m.call(M+"_add",Nt,ut,Vt),m.call(M+"_add",Vt,Vt,Vt),m.call(M+"_add",Nt,Vt,Vt))}function jt(q,m){const b=ot(q).map(mt=>mt==-1?255:mt),nt=t.alloc(b);t.alloc(Xt.bigInt2BytesLE(q,32));const ct=t.addFunction(r+"__cyclotomicExp_"+m);ct.addParam("x","i32"),ct.addParam("r","i32"),ct.addLocal("bit","i32"),ct.addLocal("i","i32");const rt=ct.getCodeBuilder(),ft=rt.getLocal("x"),ut=rt.getLocal("r"),gt=rt.i32_const(t.alloc(h));ct.addCode(rt.call(V+"_conjugate",ft,gt),rt.call(V+"_one",ut),rt.if(rt.teeLocal("bit",rt.i32_load8_s(rt.i32_const(b.length-1),nt)),rt.if(rt.i32_eq(rt.getLocal("bit"),rt.i32_const(1)),rt.call(V+"_mul",ut,ft,ut),rt.call(V+"_mul",ut,gt,ut))),rt.setLocal("i",rt.i32_const(b.length-2)),rt.block(rt.loop(rt.call(r+"__cyclotomicSquare",ut,ut),rt.if(rt.teeLocal("bit",rt.i32_load8_s(rt.getLocal("i"),nt)),rt.if(rt.i32_eq(rt.getLocal("bit"),rt.i32_const(1)),rt.call(V+"_mul",ut,ft,ut),rt.call(V+"_mul",ut,gt,ut))),rt.br_if(1,rt.i32_eqz(rt.getLocal("i"))),rt.setLocal("i",rt.i32_sub(rt.getLocal("i"),rt.i32_const(1))),rt.br(0))))}function j(){Ct(),jt(x,"w0");const q=t.addFunction(r+"__finalExponentiationLastChunk");q.addParam("x","i32"),q.addParam("r","i32");const m=q.getCodeBuilder(),b=m.getLocal("x"),nt=m.getLocal("r"),ct=m.i32_const(t.alloc(h)),rt=m.i32_const(t.alloc(h)),ft=m.i32_const(t.alloc(h)),ut=m.i32_const(t.alloc(h)),gt=m.i32_const(t.alloc(h)),mt=m.i32_const(t.alloc(h)),xt=m.i32_const(t.alloc(h)),vt=m.i32_const(t.alloc(h)),Bt=m.i32_const(t.alloc(h)),Vt=m.i32_const(t.alloc(h)),zt=m.i32_const(t.alloc(h)),Mt=m.i32_const(t.alloc(h)),Gt=m.i32_const(t.alloc(h)),Nt=m.i32_const(t.alloc(h)),Qt=m.i32_const(t.alloc(h)),Ht=m.i32_const(t.alloc(h)),$t=m.i32_const(t.alloc(h)),Dt=m.i32_const(t.alloc(h)),ne=m.i32_const(t.alloc(h)),te=m.i32_const(t.alloc(h)),re=m.i32_const(t.alloc(h));q.addCode(m.call(r+"__cyclotomicExp_w0",b,ct),m.call(V+"_conjugate",ct,ct),m.call(r+"__cyclotomicSquare",ct,rt),m.call(r+"__cyclotomicSquare",rt,ft),m.call(V+"_mul",ft,rt,ut),m.call(r+"__cyclotomicExp_w0",ut,gt),m.call(V+"_conjugate",gt,gt),m.call(r+"__cyclotomicSquare",gt,mt),m.call(r+"__cyclotomicExp_w0",mt,xt),m.call(V+"_conjugate",xt,xt),m.call(V+"_conjugate",ut,vt),m.call(V+"_conjugate",xt,Bt),m.call(V+"_mul",Bt,gt,Vt),m.call(V+"_mul",Vt,vt,zt),m.call(V+"_mul",zt,rt,Mt),m.call(V+"_mul",zt,gt,Gt),m.call(V+"_mul",Gt,b,Nt),m.call(r+"__frobeniusMap1",Mt,Qt),m.call(V+"_mul",Qt,Nt,Ht),m.call(r+"__frobeniusMap2",zt,$t),m.call(V+"_mul",$t,Ht,Dt),m.call(V+"_conjugate",b,ne),m.call(V+"_mul",ne,Mt,te),m.call(r+"__frobeniusMap3",te,re),m.call(V+"_mul",re,Dt,nt))}function F(){St(),j();const q=t.addFunction(r+"_finalExponentiation");q.addParam("x","i32"),q.addParam("r","i32");const m=q.getCodeBuilder(),b=m.getLocal("x"),nt=m.getLocal("r"),ct=m.i32_const(t.alloc(h));q.addCode(m.call(r+"__finalExponentiationFirstChunk",b,ct),m.call(r+"__finalExponentiationLastChunk",ct,nt))}function y(){const q=t.addFunction(r+"_finalExponentiationOld");q.addParam("x","i32"),q.addParam("r","i32");const m=kt("552484233613224096312617126783173147097382103762957654188882734314196910839907541213974502761540629817009608548654680343627701153829446747810907373256841551006201639677726139946029199968412598804882391702273019083653272047566316584365559776493027495458238373902875937659943504873220554161550525926302303331747463515644711876653177129578303191095900909191624817826566688241804408081892785725967931714097716709526092261278071952560171111444072049229123565057483750161460024353346284167282452756217662335528813519139808291170539072125381230815729071544861602750936964829313608137325426383735122175229541155376346436093930287402089517426973178917569713384748081827255472576937471496195752727188261435633271238710131736096299798168852925540549342330775279877006784354801422249722573783561685179618816480037695005515426162362431072245638324744480"),b=t.alloc(Xt.bigInt2BytesLE(m,352)),nt=q.getCodeBuilder();q.addCode(nt.call(V+"_exp",nt.getLocal("x"),nt.i32_const(b),nt.i32_const(352),nt.getLocal("r")))}const A=t.alloc(R),D=t.alloc(k);function X(q){const m=t.addFunction(r+"_pairingEq"+q);for(let rt=0;rtm+(b!=0?1:0),0)+S+1,f=3*2*s,R=3*s*2+$*lt,k=!0,x=Et("15132376222941642752");t.modules[r]={n64q:a,n64r:h,n8q:s,n8r:_,pG1gen:L,pG1zero:K,pG1b:M,pG2gen:et,pG2zero:g,pG2b:W,pq:t.modules.f1m.pq,pr:P,pOneT:E,r:o,q:i,prePSize:f,preQSize:R};function ot(m){let b=m;const nt=[];for(;b.gt(Et.zero);){if(b.isOdd()){const ct=2-b.mod(4).toJSNumber();nt.push(ct),b=b.minus(ct)}else nt.push(0);b=b.shiftRight(1)}return nt}function _t(m){let b=m;const nt=[];for(;b.gt(Et.zero);)b.isOdd()?nt.push(1):nt.push(0),b=b.shiftRight(1);return nt}function dt(){const m=t.addFunction(r+"_prepareG1");m.addParam("pP","i32"),m.addParam("ppreP","i32");const b=m.getCodeBuilder();m.addCode(b.call(z+"_normalize",b.getLocal("pP"),b.getLocal("ppreP")))}function bt(){const m=t.addFunction(r+"_prepDblStep");m.addParam("R","i32"),m.addParam("r","i32");const b=m.getCodeBuilder(),nt=b.getLocal("R"),ct=b.i32_add(b.getLocal("R"),b.i32_const(2*s)),rt=b.i32_add(b.getLocal("R"),b.i32_const(4*s)),ft=b.getLocal("r"),ut=b.i32_add(b.getLocal("r"),b.i32_const(2*s)),gt=b.i32_add(b.getLocal("r"),b.i32_const(4*s)),mt=b.i32_const(t.alloc(l)),xt=b.i32_const(t.alloc(l)),vt=b.i32_const(t.alloc(l)),Bt=b.i32_const(t.alloc(l)),Vt=b.i32_const(t.alloc(l));m.addCode(b.call(I+"_square",nt,ft),b.call(I+"_square",ct,xt),b.call(I+"_square",xt,vt),b.call(I+"_add",xt,nt,ut),b.call(I+"_square",ut,ut),b.call(I+"_sub",ut,ft,ut),b.call(I+"_sub",ut,vt,ut),b.call(I+"_add",ut,ut,ut),b.call(I+"_add",ft,ft,Bt),b.call(I+"_add",Bt,ft,Bt),b.call(I+"_add",nt,Bt,gt),b.call(I+"_square",Bt,Vt),b.call(I+"_square",rt,mt),b.call(I+"_sub",Vt,ut,nt),b.call(I+"_sub",nt,ut,nt),b.call(I+"_add",rt,ct,rt),b.call(I+"_square",rt,rt),b.call(I+"_sub",rt,xt,rt),b.call(I+"_sub",rt,mt,rt),b.call(I+"_sub",ut,nt,ct),b.call(I+"_mul",ct,Bt,ct),b.call(I+"_add",vt,vt,vt),b.call(I+"_add",vt,vt,vt),b.call(I+"_add",vt,vt,vt),b.call(I+"_sub",ct,vt,ct),b.call(I+"_mul",Bt,mt,ut),b.call(I+"_add",ut,ut,ut),b.call(I+"_neg",ut,ut),b.call(I+"_square",gt,gt),b.call(I+"_sub",gt,ft,gt),b.call(I+"_sub",gt,Vt,gt),b.call(I+"_add",xt,xt,xt),b.call(I+"_add",xt,xt,xt),b.call(I+"_sub",gt,xt,gt),b.call(I+"_mul",rt,mt,ft),b.call(I+"_add",ft,ft,ft))}function Ut(){const m=t.addFunction(r+"_prepAddStep");m.addParam("R","i32"),m.addParam("Q","i32"),m.addParam("r","i32");const b=m.getCodeBuilder(),nt=b.getLocal("R"),ct=b.i32_add(b.getLocal("R"),b.i32_const(2*s)),rt=b.i32_add(b.getLocal("R"),b.i32_const(4*s)),ft=b.getLocal("Q"),ut=b.i32_add(b.getLocal("Q"),b.i32_const(2*s)),gt=b.getLocal("r"),mt=b.i32_add(b.getLocal("r"),b.i32_const(2*s)),xt=b.i32_add(b.getLocal("r"),b.i32_const(4*s)),vt=b.i32_const(t.alloc(l)),Bt=b.i32_const(t.alloc(l)),Vt=b.i32_const(t.alloc(l)),zt=b.i32_const(t.alloc(l)),Mt=b.i32_const(t.alloc(l)),Gt=b.i32_const(t.alloc(l)),Nt=b.i32_const(t.alloc(l)),Qt=b.i32_const(t.alloc(l)),Ht=b.i32_const(t.alloc(l)),$t=b.i32_const(t.alloc(l)),Dt=b.i32_const(t.alloc(l));m.addCode(b.call(I+"_square",rt,vt),b.call(I+"_square",ut,Bt),b.call(I+"_mul",vt,ft,zt),b.call(I+"_add",ut,rt,mt),b.call(I+"_square",mt,mt),b.call(I+"_sub",mt,Bt,mt),b.call(I+"_sub",mt,vt,mt),b.call(I+"_mul",mt,vt,mt),b.call(I+"_sub",zt,nt,Mt),b.call(I+"_square",Mt,Gt),b.call(I+"_add",Gt,Gt,Nt),b.call(I+"_add",Nt,Nt,Nt),b.call(I+"_mul",Nt,Mt,Qt),b.call(I+"_sub",mt,ct,Ht),b.call(I+"_sub",Ht,ct,Ht),b.call(I+"_mul",Ht,ft,xt),b.call(I+"_mul",Nt,nt,$t),b.call(I+"_square",Ht,nt),b.call(I+"_sub",nt,Qt,nt),b.call(I+"_sub",nt,$t,nt),b.call(I+"_sub",nt,$t,nt),b.call(I+"_add",rt,Mt,rt),b.call(I+"_square",rt,rt),b.call(I+"_sub",rt,vt,rt),b.call(I+"_sub",rt,Gt,rt),b.call(I+"_add",ut,rt,gt),b.call(I+"_sub",$t,nt,Dt),b.call(I+"_mul",Dt,Ht,Dt),b.call(I+"_mul",ct,Qt,zt),b.call(I+"_add",zt,zt,zt),b.call(I+"_sub",Dt,zt,ct),b.call(I+"_square",gt,gt),b.call(I+"_sub",gt,Bt,gt),b.call(I+"_square",rt,Vt),b.call(I+"_sub",gt,Vt,gt),b.call(I+"_add",xt,xt,xt),b.call(I+"_sub",xt,gt,xt),b.call(I+"_add",rt,rt,gt),b.call(I+"_neg",Ht,Ht),b.call(I+"_add",Ht,Ht,mt))}function Pt(){const m=t.addFunction(r+"_prepareG2");m.addParam("pQ","i32"),m.addParam("ppreQ","i32"),m.addLocal("pCoef","i32"),m.addLocal("i","i32");const b=m.getCodeBuilder(),nt=b.getLocal("pQ"),ct=t.alloc(l*3),rt=b.i32_const(ct),ft=b.getLocal("ppreQ");m.addCode(b.call(H+"_normalize",nt,ft),b.if(b.call(H+"_isZero",ft),b.ret([])),b.call(H+"_copy",ft,rt),b.setLocal("pCoef",b.i32_add(b.getLocal("ppreQ"),b.i32_const(l*3)))),m.addCode(b.setLocal("i",b.i32_const(C.length-2)),b.block(b.loop(b.call(r+"_prepDblStep",rt,b.getLocal("pCoef")),b.setLocal("pCoef",b.i32_add(b.getLocal("pCoef"),b.i32_const(lt))),b.if(b.i32_load8_s(b.getLocal("i"),O),[...b.call(r+"_prepAddStep",rt,ft,b.getLocal("pCoef")),...b.setLocal("pCoef",b.i32_add(b.getLocal("pCoef"),b.i32_const(lt)))]),b.br_if(1,b.i32_eqz(b.getLocal("i"))),b.setLocal("i",b.i32_sub(b.getLocal("i"),b.i32_const(1))),b.br(0))))}function Ot(){const m=t.addFunction(T+"_mul1");m.addParam("pA","i32"),m.addParam("pC1","i32"),m.addParam("pR","i32");const b=m.getCodeBuilder(),nt=b.getLocal("pA"),ct=b.i32_add(b.getLocal("pA"),b.i32_const(u*2)),rt=b.i32_add(b.getLocal("pA"),b.i32_const(u*4)),ft=b.getLocal("pC1"),ut=b.getLocal("pR"),gt=b.i32_add(b.getLocal("pR"),b.i32_const(u*2)),mt=b.i32_add(b.getLocal("pR"),b.i32_const(u*4)),xt=b.i32_const(t.alloc(u*2)),vt=b.i32_const(t.alloc(u*2));m.addCode(b.call(I+"_add",nt,ct,xt),b.call(I+"_add",ct,rt,vt),b.call(I+"_mul",ct,ft,mt),b.call(I+"_mul",vt,ft,ut),b.call(I+"_sub",ut,mt,ut),b.call(I+"_mulNR",ut,ut),b.call(I+"_mul",xt,ft,gt),b.call(I+"_sub",gt,mt,gt))}Ot();function yt(){const m=t.addFunction(T+"_mul01");m.addParam("pA","i32"),m.addParam("pC0","i32"),m.addParam("pC1","i32"),m.addParam("pR","i32");const b=m.getCodeBuilder(),nt=b.getLocal("pA"),ct=b.i32_add(b.getLocal("pA"),b.i32_const(u*2)),rt=b.i32_add(b.getLocal("pA"),b.i32_const(u*4)),ft=b.getLocal("pC0"),ut=b.getLocal("pC1"),gt=b.getLocal("pR"),mt=b.i32_add(b.getLocal("pR"),b.i32_const(u*2)),xt=b.i32_add(b.getLocal("pR"),b.i32_const(u*4)),vt=b.i32_const(t.alloc(u*2)),Bt=b.i32_const(t.alloc(u*2)),Vt=b.i32_const(t.alloc(u*2)),zt=b.i32_const(t.alloc(u*2));m.addCode(b.call(I+"_mul",nt,ft,vt),b.call(I+"_mul",ct,ut,Bt),b.call(I+"_add",nt,ct,Vt),b.call(I+"_add",nt,rt,zt),b.call(I+"_add",ct,rt,gt),b.call(I+"_mul",gt,ut,gt),b.call(I+"_sub",gt,Bt,gt),b.call(I+"_mulNR",gt,gt),b.call(I+"_add",gt,vt,gt),b.call(I+"_add",ft,ut,mt),b.call(I+"_mul",mt,Vt,mt),b.call(I+"_sub",mt,vt,mt),b.call(I+"_sub",mt,Bt,mt),b.call(I+"_mul",zt,ft,xt),b.call(I+"_sub",xt,vt,xt),b.call(I+"_add",xt,Bt,xt))}yt();function It(){const m=t.addFunction(J+"_mul014");m.addParam("pA","i32"),m.addParam("pC0","i32"),m.addParam("pC1","i32"),m.addParam("pC4","i32"),m.addParam("pR","i32");const b=m.getCodeBuilder(),nt=b.getLocal("pA"),ct=b.i32_add(b.getLocal("pA"),b.i32_const(u*6)),rt=b.getLocal("pC0"),ft=b.getLocal("pC1"),ut=b.getLocal("pC4"),gt=b.i32_const(t.alloc(u*6)),mt=b.i32_const(t.alloc(u*6)),xt=b.i32_const(t.alloc(u*2)),vt=b.getLocal("pR"),Bt=b.i32_add(b.getLocal("pR"),b.i32_const(u*6));m.addCode(b.call(T+"_mul01",nt,rt,ft,gt),b.call(T+"_mul1",ct,ut,mt),b.call(I+"_add",ft,ut,xt),b.call(T+"_add",ct,nt,Bt),b.call(T+"_mul01",Bt,rt,xt,Bt),b.call(T+"_sub",Bt,gt,Bt),b.call(T+"_sub",Bt,mt,Bt),b.call(T+"_copy",mt,vt),b.call(T+"_mulNR",vt,vt),b.call(T+"_add",vt,gt,vt))}It();function Ft(){const m=t.addFunction(r+"_ell");m.addParam("pP","i32"),m.addParam("pCoefs","i32"),m.addParam("pF","i32");const b=m.getCodeBuilder(),nt=b.getLocal("pP"),ct=b.i32_add(b.getLocal("pP"),b.i32_const(s)),rt=b.getLocal("pF"),ft=b.getLocal("pCoefs"),ut=b.i32_add(b.getLocal("pCoefs"),b.i32_const(u)),gt=b.i32_add(b.getLocal("pCoefs"),b.i32_const(u*2)),mt=b.i32_add(b.getLocal("pCoefs"),b.i32_const(u*3)),xt=b.i32_add(b.getLocal("pCoefs"),b.i32_const(u*4)),vt=t.alloc(u*2),Bt=b.i32_const(vt),Vt=b.i32_const(vt),zt=b.i32_const(vt+u),Mt=t.alloc(u*2),Gt=b.i32_const(Mt),Nt=b.i32_const(Mt),Qt=b.i32_const(Mt+u);m.addCode(b.call(N+"_mul",ft,ct,Vt),b.call(N+"_mul",ut,ct,zt),b.call(N+"_mul",gt,nt,Nt),b.call(N+"_mul",mt,nt,Qt),b.call(J+"_mul014",rt,xt,Gt,Bt,rt))}Ft();function Lt(){const m=t.addFunction(r+"_millerLoop");m.addParam("ppreP","i32"),m.addParam("ppreQ","i32"),m.addParam("r","i32"),m.addLocal("pCoef","i32"),m.addLocal("i","i32");const b=m.getCodeBuilder(),nt=b.getLocal("ppreP");b.getLocal("ppreQ");const ct=b.getLocal("pCoef"),rt=b.getLocal("r");m.addCode(b.call(J+"_one",rt),b.if(b.call(z+"_isZero",nt),b.ret([])),b.if(b.call(z+"_isZero",b.getLocal("ppreQ")),b.ret([])),b.setLocal("pCoef",b.i32_add(b.getLocal("ppreQ"),b.i32_const(l*3))),b.setLocal("i",b.i32_const(C.length-2)),b.block(b.loop(b.call(r+"_ell",nt,ct,rt),b.setLocal("pCoef",b.i32_add(b.getLocal("pCoef"),b.i32_const(lt))),b.if(b.i32_load8_s(b.getLocal("i"),O),[...b.call(r+"_ell",nt,ct,rt),...b.setLocal("pCoef",b.i32_add(b.getLocal("pCoef"),b.i32_const(lt)))]),b.call(J+"_square",rt,rt),b.br_if(1,b.i32_eq(b.getLocal("i"),b.i32_const(1))),b.setLocal("i",b.i32_sub(b.getLocal("i"),b.i32_const(1))),b.br(0))),b.call(r+"_ell",nt,ct,rt)),m.addCode(b.call(J+"_conjugate",rt,rt))}function St(m){const b=[[[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")]],[[Et("1"),Et("0")],[Et("3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760"),Et("151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027")],[Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351"),Et("0")],[Et("2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530"),Et("1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257")],[Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),Et("0")],[Et("3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557"),Et("877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230")],[Et("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786"),Et("0")],[Et("151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027"),Et("3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760")],[Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),Et("0")],[Et("1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257"),Et("2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530")],[Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437"),Et("0")],[Et("877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230"),Et("3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557")]]],nt=[[[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")],[Et("1"),Et("0")]],[[Et("1"),Et("0")],[Et("0"),Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436")],[Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),Et("0")],[Et("0"),Et("1")],[Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),Et("0")],[Et("0"),Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350")]],[[Et("1"),Et("0")],[Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437"),Et("0")],[Et("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),Et("0")],[Et("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786"),Et("0")],[Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),Et("0")],[Et("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351"),Et("0")]]],ct=t.addFunction(J+"_frobeniusMap"+m);ct.addParam("x","i32"),ct.addParam("r","i32");const rt=ct.getCodeBuilder();for(let ut=0;ut<6;ut++){const gt=ut==0?rt.getLocal("x"):rt.i32_add(rt.getLocal("x"),rt.i32_const(ut*l)),mt=gt,xt=rt.i32_add(rt.getLocal("x"),rt.i32_const(ut*l+u)),vt=ut==0?rt.getLocal("r"):rt.i32_add(rt.getLocal("r"),rt.i32_const(ut*l)),Bt=vt,Vt=rt.i32_add(rt.getLocal("r"),rt.i32_const(ut*l+u)),zt=ft(b[Math.floor(ut/3)][m%12],nt[ut%3][m%6]),Mt=t.alloc([...Kt.bigInt2BytesLE(B(zt[0]),s),...Kt.bigInt2BytesLE(B(zt[1]),s)]);m%2==1?ct.addCode(rt.call(N+"_copy",mt,Bt),rt.call(N+"_neg",xt,Vt),rt.call(I+"_mul",vt,rt.i32_const(Mt),vt)):ct.addCode(rt.call(I+"_mul",gt,rt.i32_const(Mt),vt))}function ft(ut,gt){const mt=Et(ut[0]),xt=Et(ut[1]),vt=Et(gt[0]),Bt=Et(gt[1]),Vt=[mt.times(vt).minus(xt.times(Bt)).mod(i),mt.times(Bt).add(xt.times(vt)).mod(i)];return Vt[0].isNegative()&&(Vt[0]=Vt[0].add(i)),Vt}}function Ct(){const m=t.addFunction(r+"__cyclotomicSquare");m.addParam("x","i32"),m.addParam("r","i32");const b=m.getCodeBuilder(),nt=b.getLocal("x"),ct=b.i32_add(b.getLocal("x"),b.i32_const(l)),rt=b.i32_add(b.getLocal("x"),b.i32_const(2*l)),ft=b.i32_add(b.getLocal("x"),b.i32_const(3*l)),ut=b.i32_add(b.getLocal("x"),b.i32_const(4*l)),gt=b.i32_add(b.getLocal("x"),b.i32_const(5*l)),mt=b.getLocal("r"),xt=b.i32_add(b.getLocal("r"),b.i32_const(l)),vt=b.i32_add(b.getLocal("r"),b.i32_const(2*l)),Bt=b.i32_add(b.getLocal("r"),b.i32_const(3*l)),Vt=b.i32_add(b.getLocal("r"),b.i32_const(4*l)),zt=b.i32_add(b.getLocal("r"),b.i32_const(5*l)),Mt=b.i32_const(t.alloc(l)),Gt=b.i32_const(t.alloc(l)),Nt=b.i32_const(t.alloc(l)),Qt=b.i32_const(t.alloc(l)),Ht=b.i32_const(t.alloc(l)),$t=b.i32_const(t.alloc(l)),Dt=b.i32_const(t.alloc(l)),ne=b.i32_const(t.alloc(l));m.addCode(b.call(I+"_mul",nt,ut,Dt),b.call(I+"_mulNR",ut,Mt),b.call(I+"_add",nt,Mt,Mt),b.call(I+"_add",nt,ut,ne),b.call(I+"_mul",ne,Mt,Mt),b.call(I+"_mulNR",Dt,ne),b.call(I+"_add",Dt,ne,ne),b.call(I+"_sub",Mt,ne,Mt),b.call(I+"_add",Dt,Dt,Gt),b.call(I+"_mul",ft,rt,Dt),b.call(I+"_mulNR",rt,Nt),b.call(I+"_add",ft,Nt,Nt),b.call(I+"_add",ft,rt,ne),b.call(I+"_mul",ne,Nt,Nt),b.call(I+"_mulNR",Dt,ne),b.call(I+"_add",Dt,ne,ne),b.call(I+"_sub",Nt,ne,Nt),b.call(I+"_add",Dt,Dt,Qt),b.call(I+"_mul",ct,gt,Dt),b.call(I+"_mulNR",gt,Ht),b.call(I+"_add",ct,Ht,Ht),b.call(I+"_add",ct,gt,ne),b.call(I+"_mul",ne,Ht,Ht),b.call(I+"_mulNR",Dt,ne),b.call(I+"_add",Dt,ne,ne),b.call(I+"_sub",Ht,ne,Ht),b.call(I+"_add",Dt,Dt,$t),b.call(I+"_sub",Mt,nt,mt),b.call(I+"_add",mt,mt,mt),b.call(I+"_add",Mt,mt,mt),b.call(I+"_add",Gt,ut,Vt),b.call(I+"_add",Vt,Vt,Vt),b.call(I+"_add",Gt,Vt,Vt),b.call(I+"_mul",$t,b.i32_const(U),ne),b.call(I+"_add",ne,ft,Bt),b.call(I+"_add",Bt,Bt,Bt),b.call(I+"_add",ne,Bt,Bt),b.call(I+"_sub",Ht,rt,vt),b.call(I+"_add",vt,vt,vt),b.call(I+"_add",Ht,vt,vt),b.call(I+"_sub",Nt,ct,xt),b.call(I+"_add",xt,xt,xt),b.call(I+"_add",Nt,xt,xt),b.call(I+"_add",Qt,gt,zt),b.call(I+"_add",zt,zt,zt),b.call(I+"_add",Qt,zt,zt))}function jt(m,b,nt){const ct=ot(m).map(vt=>vt==-1?255:vt),rt=t.alloc(ct),ft=t.addFunction(r+"__cyclotomicExp_"+nt);ft.addParam("x","i32"),ft.addParam("r","i32"),ft.addLocal("bit","i32"),ft.addLocal("i","i32");const ut=ft.getCodeBuilder(),gt=ut.getLocal("x"),mt=ut.getLocal("r"),xt=ut.i32_const(t.alloc(c));ft.addCode(ut.call(J+"_conjugate",gt,xt),ut.call(J+"_one",mt),ut.if(ut.teeLocal("bit",ut.i32_load8_s(ut.i32_const(ct.length-1),rt)),ut.if(ut.i32_eq(ut.getLocal("bit"),ut.i32_const(1)),ut.call(J+"_mul",mt,gt,mt),ut.call(J+"_mul",mt,xt,mt))),ut.setLocal("i",ut.i32_const(ct.length-2)),ut.block(ut.loop(ut.call(r+"__cyclotomicSquare",mt,mt),ut.if(ut.teeLocal("bit",ut.i32_load8_s(ut.getLocal("i"),rt)),ut.if(ut.i32_eq(ut.getLocal("bit"),ut.i32_const(1)),ut.call(J+"_mul",mt,gt,mt),ut.call(J+"_mul",mt,xt,mt))),ut.br_if(1,ut.i32_eqz(ut.getLocal("i"))),ut.setLocal("i",ut.i32_sub(ut.getLocal("i"),ut.i32_const(1))),ut.br(0)))),b&&ft.addCode(ut.call(J+"_conjugate",mt,mt))}function j(){Ct(),jt(x,k,"w0");const m=t.addFunction(r+"_finalExponentiation");m.addParam("x","i32"),m.addParam("r","i32");const b=m.getCodeBuilder(),nt=b.getLocal("x"),ct=b.getLocal("r"),rt=b.i32_const(t.alloc(c)),ft=b.i32_const(t.alloc(c)),ut=b.i32_const(t.alloc(c)),gt=b.i32_const(t.alloc(c)),mt=b.i32_const(t.alloc(c)),xt=b.i32_const(t.alloc(c)),vt=b.i32_const(t.alloc(c));m.addCode(b.call(J+"_frobeniusMap6",nt,rt),b.call(J+"_inverse",nt,ft),b.call(J+"_mul",rt,ft,ut),b.call(J+"_copy",ut,ft),b.call(J+"_frobeniusMap2",ut,ut),b.call(J+"_mul",ut,ft,ut),b.call(r+"__cyclotomicSquare",ut,ft),b.call(J+"_conjugate",ft,ft),b.call(r+"__cyclotomicExp_w0",ut,gt),b.call(r+"__cyclotomicSquare",gt,mt),b.call(J+"_mul",ft,gt,xt),b.call(r+"__cyclotomicExp_w0",xt,ft),b.call(r+"__cyclotomicExp_w0",ft,rt),b.call(r+"__cyclotomicExp_w0",rt,vt),b.call(J+"_mul",vt,mt,vt),b.call(r+"__cyclotomicExp_w0",vt,mt),b.call(J+"_conjugate",xt,xt),b.call(J+"_mul",mt,xt,mt),b.call(J+"_mul",mt,ut,mt),b.call(J+"_conjugate",ut,xt),b.call(J+"_mul",ft,ut,ft),b.call(J+"_frobeniusMap3",ft,ft),b.call(J+"_mul",vt,xt,vt),b.call(J+"_frobeniusMap1",vt,vt),b.call(J+"_mul",gt,rt,gt),b.call(J+"_frobeniusMap2",gt,gt),b.call(J+"_mul",gt,ft,gt),b.call(J+"_mul",gt,vt,gt),b.call(J+"_mul",gt,mt,ct))}function F(){const m=t.addFunction(r+"_finalExponentiationOld");m.addParam("x","i32"),m.addParam("r","i32");const b=Et("322277361516934140462891564586510139908379969514828494218366688025288661041104682794998680497580008899973249814104447692778988208376779573819485263026159588510513834876303014016798809919343532899164848730280942609956670917565618115867287399623286813270357901731510188149934363360381614501334086825442271920079363289954510565375378443704372994881406797882676971082200626541916413184642520269678897559532260949334760604962086348898118982248842634379637598665468817769075878555493752214492790122785850202957575200176084204422751485957336465472324810982833638490904279282696134323072515220044451592646885410572234451732790590013479358343841220074174848221722017083597872017638514103174122784843925578370430843522959600095676285723737049438346544753168912974976791528535276317256904336520179281145394686565050419250614107803233314658825463117900250701199181529205942363159325765991819433914303908860460720581408201373164047773794825411011922305820065611121544561808414055302212057471395719432072209245600258134364584636810093520285711072578721435517884103526483832733289802426157301542744476740008494780363354305116978805620671467071400711358839553375340724899735460480144599782014906586543813292157922220645089192130209334926661588737007768565838519456601560804957985667880395221049249803753582637708560"),nt=t.alloc(Kt.bigInt2BytesLE(b,544)),ct=m.getCodeBuilder();m.addCode(ct.call(J+"_exp",ct.getLocal("x"),ct.i32_const(nt),ct.i32_const(544),ct.getLocal("r")))}const y=t.alloc(f),A=t.alloc(R);function D(m){const b=t.addFunction(r+"_pairingEq"+m);for(let ft=0;ft{t[r]=Lg(e[r])}),t}else return e}function Cg(e){if(typeof e=="string"&&/^[0-9]+$/.test(e))return BigInt(e);if(typeof e=="string"&&/^0x[0-9a-fA-F]+$/.test(e))return BigInt(e);if(Array.isArray(e))return e.map(Cg);if(typeof e=="object"){if(e===null)return null;const t={};return Object.keys(e).forEach(r=>{t[r]=Cg(e[r])}),t}else return e}function pG(e){let t=BigInt(0),n=e.length,r=0;const i=new DataView(e.buffer,e.byteOffset,e.byteLength);for(;n>0;)n>=4?(n-=4,t+=BigInt(i.getUint32(n))<=2?(n-=2,t+=BigInt(i.getUint16(n))<0;)o-4>=0?(o-=4,i.setUint32(o,Number(n&BigInt(4294967295))),n=n>>BigInt(32)):o-2>=0?(o-=2,i.setUint16(o,Number(n&BigInt(65535))),n=n>>BigInt(16)):(o-=1,i.setUint8(o,Number(n&BigInt(255))),n=n>>BigInt(8));if(n)throw new Error("Number does not fit in this length");return r}function mG(e){let t=BigInt(0),n=0;const r=new DataView(e.buffer,e.byteOffset,e.byteLength);for(;n"u"&&(t=Math.floor((I0(e)-1)/8)+1,t==0&&(t=1));const r=new Uint8Array(t),i=new DataView(r.buffer);let o=0;for(;o>BigInt(32)):o+2<=t?(i.setUint16(Number(o,n&BigInt(65535)),!0),o+=2,n=n>>BigInt(16)):(i.setUint8(Number(o,n&BigInt(255)),!0),o+=1,n=n>>BigInt(8));if(n)throw new Error("Number does not fit in this length");return r}function Sg(e,t){if(typeof t=="bigint"||t.eq!==void 0)return t.toString(10);if(t instanceof Uint8Array)return e.toString(e.e(t));if(Array.isArray(t))return t.map(Sg.bind(this,e));if(typeof t=="object"){const n={};return Object.keys(t).forEach(i=>{n[i]=Sg(e,t[i])}),n}else return t}function Fg(e,t){if(typeof t=="string"&&/^[0-9]+$/.test(t))return e.e(t);if(typeof t=="string"&&/^0x[0-9a-fA-F]+$/.test(t))return e.e(t);if(Array.isArray(t))return t.map(Fg.bind(this,e));if(typeof t=="object"){if(t===null)return null;const n={};return Object.keys(t).forEach(i=>{n[i]=Fg(e,t[i])}),n}else return t}const vG=Object.freeze(Object.defineProperty({__proto__:null,beBuff2int:pG,beInt2Buff:gG,leBuff2int:mG,leInt2Buff:yG,stringifyBigInts:Lg,stringifyFElements:Sg,unstringifyBigInts:Cg,unstringifyFElements:Fg},Symbol.toStringTag,{value:"Module"}));function Ig(e){if(typeof e=="bigint"||e.eq!==void 0)return e.toString(10);if(Array.isArray(e))return e.map(Ig);if(typeof e=="object"){const t={};return Object.keys(e).forEach(r=>{t[r]=Ig(e[r])}),t}else return e}function Eg(e){if(typeof e=="string"&&/^[0-9]+$/.test(e))return Tt(e);if(typeof e=="string"&&/^0x[0-9a-fA-F]+$/.test(e))return Tt(e);if(Array.isArray(e))return e.map(Eg);if(typeof e=="object"){const t={};return Object.keys(e).forEach(r=>{t[r]=Eg(e[r])}),t}else return e}function _G(e){let t=Tt.zero;for(let n=0;n=0;){let o=Number(n.and(Tt("255")));i[r]=o,r--,n=n.shiftRight(8)}if(!n.eq(Tt.zero))throw new Error("Number does not fit in this length");return i}function wG(e){let t=Tt.zero;for(let n=0;n>=1;return n}mi.bitReverse=function(t,n){return(Ll[t>>>24]|Ll[t>>>16&255]<<8|Ll[t>>>8&255]<<16|Ll[t&255]<<24)>>>32-n};mi.log2=function(t){return(t&4294901760?(t&=4294901760,16):0)|(t&4278255360?(t&=4278255360,8):0)|(t&4042322160?(t&=4042322160,4):0)|(t&3435973836?(t&=3435973836,2):0)|(t&2863311530)!==0};mi.buffReverseBits=function(t,n){const r=t.byteLength/n,i=mi.log2(r);if(r!=1<a){const s=t.slice(o*n,(o+1)*n);t.set(t.slice(a*n,(a+1)*n),o*n),t.set(s,a*n)}}};mi.array2buffer=function(e,t){const n=new Uint8Array(t*e.length);for(let r=0;r0;){const c=u+l>dn?dn-u:l,h=new Uint8Array(this.buffers[s].buffer,this.buffers[s].byteOffset+u,c);if(c==r)return h.slice();a||(r<=dn?a=new Uint8Array(r):a=new Ce(r)),a.set(h,r-l),l=l-c,s++,u=0}return a}set(t,n){n===void 0&&(n=0);const r=t.byteLength;if(r==0)return;const i=Math.floor(n/dn),o=Math.floor((n+r-1)/dn);if(i==o)return t instanceof Ce&&t.buffers.length==1?this.buffers[i].set(t.buffers[0],n%dn):this.buffers[i].set(t,n%dn);let a=i,s=n%dn,u=r;for(;u>0;){const l=s+u>dn?dn-s:u,c=t.slice(r-u,r-u+l);new Uint8Array(this.buffers[a].buffer,this.buffers[a].byteOffset+s,l).set(c),u=u-l,a++,s=0}}}function so(e,t,n,r){return async function(o){const a=Math.floor(o.byteLength/n);if(a*n!==o.byteLength)throw new Error("Invalid buffer size");const s=Math.floor(a/e.concurrency),u=[];for(let _=0;_=0;s--)this.w[s]=this.square(this.w[s+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=so(t,n+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=so(t,n+"_batchFromMontgomery",this.n8,this.n8)}op2(t,n,r){return this.tm.setBuff(this.pOp1,n),this.tm.setBuff(this.pOp2,r),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(t,n,r){return this.tm.setBuff(this.pOp1,n),this.tm.setBuff(this.pOp2,r),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2)}op1(t,n){return this.tm.setBuff(this.pOp1,n),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(t,n){return this.tm.setBuff(this.pOp1,n),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3)}add(t,n){return this.op2("_add",t,n)}eq(t,n){return this.op2Bool("_eq",t,n)}isZero(t){return this.op1Bool("_isZero",t)}sub(t,n){return this.op2("_sub",t,n)}neg(t){return this.op1("_neg",t)}inv(t){return this.op1("_inverse",t)}toMontgomery(t){return this.op1("_toMontgomery",t)}fromMontgomery(t){return this.op1("_fromMontgomery",t)}mul(t,n){return this.op2("_mul",t,n)}div(t,n){return this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,n),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(t){return this.op1("_square",t)}isSquare(t){return this.op1Bool("_isSquare",t)}sqrt(t){return this.op1("_sqrt",t)}exp(t,n){return n instanceof Uint8Array||(n=Ps(nn(n))),this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,n),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,n.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(t){return this.op1Bool("_isNegative",t)}e(t,n){if(t instanceof Uint8Array)return t;let r=nn(t,n);hx(r)?(r=mx(r),Ag(r,this.p)&&(r=ri(r,this.p)),r=Oi(this.p,r)):Ag(r,this.p)&&(r=ri(r,this.p));const i=Px(r,this.n8);return this.toMontgomery(i)}toString(t,n){const r=this.fromMontgomery(t),i=Bc(r,0);return dx(i,n)}fromRng(t){let n;const r=new Uint8Array(this.n8);do{n=fx;for(let i=0;ir.buffer.byteLength){const v=r.buffer.byteLength/65536;let P=Math.floor((h[0]+c)/65536)+1;P>32767&&(P=32767),r.grow(P-v)}return _}function a(c){const h=o(c.byteLength);return u(h,c),h}function s(c,h){const _=new Uint8Array(r.buffer);return new Uint8Array(_.buffer,_.byteOffset+c,h)}function u(c,h){new Uint8Array(r.buffer).set(new Uint8Array(h),c)}function l(c){if(c[0].cmd=="INIT")return i(c[0]);const h={vars:[],out:[]},v=new Uint32Array(r.buffer,0,1)[0];for(let N=0;N{this.reject=n,this.resolve=t})}}function RG(e){return new Promise(t=>setTimeout(t,e))}function zG(e){return process.browser?globalThis.btoa(e):Buffer.from(e).toString("base64")}const DG=zG("("+Mx.toString()+")(self)"),NG="data:application/javascript;base64,"+DG;async function UG(e,t){const n=new $G;n.memory=new WebAssembly.Memory({initial:cp}),n.u8=new Uint8Array(n.memory.buffer),n.u32=new Uint32Array(n.memory.buffer);const r=await WebAssembly.compile(e.code);if(n.instance=await WebAssembly.instantiate(r,{env:{memory:n.memory}}),n.singleThread=t,n.initalPFree=n.u32[0],n.pq=e.pq,n.pr=e.pr,n.pG1gen=e.pG1gen,n.pG1zero=e.pG1zero,n.pG2gen=e.pG2gen,n.pG2zero=e.pG2zero,n.pOneT=e.pOneT,t)n.code=e.code,n.taskManager=Mx(),await n.taskManager([{cmd:"INIT",init:cp,code:n.code.slice()}]),n.concurrency=1;else{n.workers=[],n.pendingDeferreds=[],n.working=[];let o;typeof navigator=="object"&&navigator.hardwareConcurrency?o=navigator.hardwareConcurrency:o=Kc.cpus().length,o==0&&(o=2),o>64&&(o=64),n.concurrency=o;for(let s=0;s0;t++)if(this.working[t]==!1){const n=this.actionQueue.shift();this.postAction(t,n.data,n.transfers,n.deferred)}}queueAction(t,n){const r=new T4;if(this.singleThread){const i=this.taskManager(t);r.resolve(i)}else this.actionQueue.push({data:t,transfers:n,deferred:r}),this.processWorks();return r.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(t){const n=this.alloc(t.byteLength);return this.setBuff(n,t),n}getBuff(t,n){return this.u8.slice(t,t+n)}setBuff(t,n){this.u8.set(new Uint8Array(n),t)}alloc(t){for(;this.u32[0]&3;)this.u32[0]++;const n=this.u32[0];return this.u32[0]+=t,n}async terminate(){for(let t=0;t=0;H--){if(!n.isZero(W))for(let it=0;it4194304&&(I=4194304),I<1024&&(I=1024);const W=[];for(let B=0;B(l&&l.debug(`Multiexp end: ${c}: ${B}/${P}`),K)))}const H=await Promise.all(W);let it=n.zero;for(let B=H.length-1;B>=0;B--)it=n.add(it,H[B]);return it}n.multiExp=async function(s,u,l,c){return await o(s,u,"jacobian",l,c)},n.multiExpAffine=async function(s,u,l,c){return await o(s,u,"affine",l,c)}}function dp(e,t){const n=e[t],r=e.Fr,i=n.tm;async function o(l,c,h,_,v,P){h=h||"affine",_=_||"affine";const N=14;let M,z,I,W,H,it,B,p;t=="G1"?(h=="affine"?(M=n.F.n8*2,W="g1m_batchToJacobian"):M=n.F.n8*3,z=n.F.n8*3,c&&(p="g1m_fftFinal"),B="g1m_fftJoin",it="g1m_fftMix",_=="affine"?(I=n.F.n8*2,H="g1m_batchToAffine"):I=n.F.n8*3):t=="G2"?(h=="affine"?(M=n.F.n8*2,W="g2m_batchToJacobian"):M=n.F.n8*3,z=n.F.n8*3,c&&(p="g2m_fftFinal"),B="g2m_fftJoin",it="g2m_fftMix",_=="affine"?(I=n.F.n8*2,H="g2m_batchToAffine"):I=n.F.n8*3):t=="Fr"&&(M=n.n8,z=n.n8,I=n.n8,c&&(p="frm_fftFinal"),it="frm_fftMix",B="frm_fftJoin");let L=!1;Array.isArray(l)?(l=Z3(l,M),L=!0):l=l.slice(0,l.byteLength);const Z=l.byteLength/M,K=Xn(Z);if(1<=16;)E*=2,g/=2;const U=Xn(g),Q=[];for(let T=0;T(v&&v.debug(`${P}: fft ${K} mix end: ${T}/${E}`),V)))}w=await Promise.all(Q);for(let T=0;T(v&&v.debug(`${P}: fft ${K} join ${T}/${K} ${O+1}/${Y} ${lt}/${J/2}`),k)))}const C=await Promise.all(V);for(let O=0;O0;Y--)et.set(w[Y],T),T+=g*I,delete w[Y];et.set(w[0].slice(0,(g-1)*I),T),delete w[0]}else for(let T=0;T1<<28?I=new Ce(z[0].byteLength*2):I=new Uint8Array(z[0].byteLength*2),I.set(z[0]),I.set(z[1],z[0].byteLength),I}async function s(l,c,h,_,v){let P,N;P=l.slice(0,l.byteLength/2),N=l.slice(l.byteLength/2,l.byteLength);const M=[];M.push(o(P,!0,c,"jacobian",_,v)),M.push(o(N,!0,c,"jacobian",_,v)),[P,N]=await Promise.all(M);const z=await u(P,N,"fftJoinExtInv",r.one,r.shiftInv,"jacobian",h,_,v);let I;return z[0].byteLength>1<<28?I=new Ce(z[0].byteLength*2):I=new Uint8Array(z[0].byteLength*2),I.set(z[0]),I.set(z[1],z[0].byteLength),I}async function u(l,c,h,_,v,P,N,M,z){let H,it,B,p,L,Z;if(t=="G1")P=="affine"?(L=n.F.n8*2,it="g1m_batchToJacobian"):L=n.F.n8*3,Z=n.F.n8*3,H="g1m_"+h,N=="affine"?(B="g1m_batchToAffine",p=n.F.n8*2):p=n.F.n8*3;else if(t=="G2")P=="affine"?(L=n.F.n8*2,it="g2m_batchToJacobian"):L=n.F.n8*3,H="g2m_"+h,Z=n.F.n8*3,N=="affine"?(B="g2m_batchToAffine",p=n.F.n8*2):p=n.F.n8*3;else if(t=="Fr")L=r.n8,p=r.n8,Z=r.n8,H="frm_"+h;else throw new Error("Invalid group");if(l.byteLength!=c.byteLength)throw new Error("Invalid buffer size");const K=Math.floor(l.byteLength/L);if(K!=1<65536&&(G=65536);const et=[];for(let Q=0;Q(M&&M.debug(`${z}: fftJoinExt End: ${Q}/${K}`),O)))}const w=await Promise.all(et);let g,E;K*p>1<<28?(g=new Ce(K*p),E=new Ce(K*p)):(g=new Uint8Array(K*p),E=new Uint8Array(K*p));let U=0;for(let Q=0;Qr.s+1)throw _&&_.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let z=l.slice(0,l.byteLength/2),I=l.slice(l.byteLength/2,l.byteLength);const W=r.exp(r.shift,N/2),H=r.inv(r.sub(r.one,W));[z,I]=await u(z,I,"prepareLagrangeEvaluation",H,r.shiftInv,c,"jacobian",_,v+" prep");const it=[];it.push(o(z,!0,"jacobian",h,_,v+" t0")),it.push(o(I,!0,"jacobian",h,_,v+" t1")),[z,I]=await Promise.all(it);let B;return z.byteLength>1<<28?B=new Ce(z.byteLength*2):B=new Uint8Array(z.byteLength*2),B.set(z),B.set(I,z.byteLength),B},n.fftMix=async function(c){const h=n.F.n8*3;let _,v;if(t=="G1")_="g1m_fftMix",v="g1m_fftJoin";else if(t=="G2")_="g2m_fftMix",v="g2m_fftJoin";else if(t=="Fr")_="frm_fftMix",v="frm_fftJoin";else throw new Error("Invalid group");const P=Math.floor(c.byteLength/h),N=Xn(P);let M=1<=0;B--)H.set(W[B][0],it),it+=W[B][0].byteLength;return H}}async function Tx(e){const t=await UG(e.wasm,e.singleThread),n={};return n.q=nn(e.wasm.q),n.r=nn(e.wasm.r),n.name=e.name,n.tm=t,n.prePSize=e.wasm.prePSize,n.preQSize=e.wasm.preQSize,n.Fr=new k4(t,"frm",e.n8r,e.r),n.F1=new k4(t,"f1m",e.n8q,e.q),n.F2=new P4(t,"f2m",n.F1),n.G1=new M4(t,"g1m",n.F1,e.wasm.pG1gen,e.wasm.pG1b,e.cofactorG1),n.G2=new M4(t,"g2m",n.F2,e.wasm.pG2gen,e.wasm.pG2b,e.cofactorG2),n.F6=new OG(t,"f6m",n.F2),n.F12=new P4(t,"ftm",n.F6),n.Gt=n.F12,up(n,"G1"),up(n,"G2"),up(n,"Fr"),R4(n,"G1"),R4(n,"G2"),dp(n,"G1"),dp(n,"G2"),dp(n,"Fr"),jG(n),n.array2buffer=function(r,i){const o=new Uint8Array(i*r.length);for(let a=0;a>6,128|r&63):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|r&63):(n++,r=65536+((r&1023)<<10|e.charCodeAt(n)&1023),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63))}return t}function WG(e){const t=QG(e);return[...Rx(t.length),...t]}function X3(e){const t=[];let n=Hi(e);if(n.isNegative())throw new Error("Number cannot be negative");for(;!n.isZero();)t.push(n.and(127).toJSNumber()),n=n.shiftRight(7);t.length==0&&t.push(0);for(let r=0;rfp[r.type])],n=this.returnType?[1,fp[this.returnType]]:[0];return[96,...t,...n]}getBody(){const t=this.locals.map(r=>[...Tu.varuint32(r.length),fp[r.type]]),n=[...Tu.varuint32(this.locals.length),...[].concat(...t),...this.code,11];return[...Tu.varuint32(n.length),...n]}addCode(...t){this.code.push(...[].concat(...t))}getCodeBuilder(){return new JG(this)}};var eH=tH;const z4=eH,be=fr;let nH=class{constructor(){this.functions=[],this.functionIdxByName={},this.nImportFunctions=0,this.nInternalFunctions=0,this.memory={pagesSize:1,moduleName:"env",fieldName:"memory"},this.free=8,this.datas=[],this.modules={},this.exports=[],this.functionsTable=[]}build(){return this._setSignatures(),new Uint8Array([...be.u32(1836278016),...be.u32(1),...this._buildType(),...this._buildImport(),...this._buildFunctionDeclarations(),...this._buildFunctionsTable(),...this._buildExports(),...this._buildElements(),...this._buildCode(),...this._buildData()])}addFunction(t){if(typeof this.functionIdxByName[t]<"u")throw new Error(`Function already defined: ${t}`);const n=this.functions.length;return this.functionIdxByName[t]=n,this.functions.push(new z4(this,t,"internal")),this.nInternalFunctions++,this.functions[n]}addIimportFunction(t,n,r){if(typeof this.functionIdxByName[t]<"u")throw new Error(`Function already defined: ${t}`);if(this.functions.length>0&&this.functions[this.functions.length-1].type=="internal")throw new Error(`Import functions must be declared before internal: ${t}`);let i=r||t;const o=this.functions.length;return this.functionIdxByName[t]=o,this.functions.push(new z4(this,t,"import",n,i)),this.nImportFunctions++,this.functions[o]}setMemory(t,n,r){this.memory={pagesSize:t,moduleName:n||"env",fieldName:r||"memory"}}exportFunction(t,n){const r=n||t;if(typeof this.functionIdxByName[t]>"u")throw new Error(`Function not defined: ${t}`);const i=this.functionIdxByName[t];r!=t&&(this.functionIdxByName[r]=i),this.exports.push({exportName:r,idx:i})}addFunctionToTable(t){const n=this.functionIdxByName[t];this.functionsTable.push(n)}addData(t,n){this.datas.push({offset:t,bytes:n})}alloc(t,n){let r,i;(Array.isArray(t)||ArrayBuffer.isView(t))&&typeof n>"u"?(r=t.length,i=t):(r=t,i=n),r=(r-1>>3)+1<<3;const o=this.free;return this.free+=r,i&&this.addData(o,i),o}allocString(t){const r=new globalThis.TextEncoder().encode(t);return this.alloc([...r,0])}_setSignatures(){this.signatures=[];const t={};if(this.functionsTable.length>0){const n=this.functions[this.functionsTable[0]].getSignature(),r="s_"+be.toHexString(n);t[r]=0,this.signatures.push(n)}for(let n=0;n"u"&&(t[i]=this.signatures.length,this.signatures.push(r)),this.functions[n].signatureIdx=t[i]}}_buildSection(t,n){return[t,...be.varuint32(n.length),...n]}_buildType(){return this._buildSection(1,[...be.varuint32(this.signatures.length),...[].concat(...this.signatures)])}_buildImport(){const t=[];t.push([...be.string(this.memory.moduleName),...be.string(this.memory.fieldName),2,0,...be.varuint32(this.memory.pagesSize)]);for(let n=0;n=0)t=await Nx();else if(["BLS12381"].indexOf(n)>=0)t=await Ux();else throw new Error(`Curve not supported: ${e}`);return t;function r(i){return i.toUpperCase().match(/[A-Za-z0-9]+/g).join("")}}var vi={},sH={get exports(){return vi},set exports(e){vi=e}},lH=Vx;class jx extends Error{}jx.prototype.name="AssertionError";function Vx(e,t){if(!e){var n=new jx(t);throw Error.captureStackTrace&&Error.captureStackTrace(n,Vx),n}}var _f={},cH={get exports(){return _f},set exports(e){_f=e}};function qx(e){return e.length}function uH(e){const t=e.byteLength;let n="";for(let r=0;r1&&e.charCodeAt(t-1)===61&&t--,t*3>>>2}function hH(e){const t=e.byteLength;let n="";for(let r=0;r>2]+Ja[(e[r]&3)<<4|e[r+1]>>4]+Ja[(e[r+1]&15)<<2|e[r+2]>>6]+Ja[e[r+2]&63];return t%3===2?n=n.substring(0,n.length-1)+"=":t%3===1&&(n=n.substring(0,n.length-2)+"=="),n}function pH(e,t,n=0,r=Qx(t)){const i=Math.min(r,e.byteLength-n);for(let o=0,a=0;o>4,e[a++]=(u&15)<<4|l>>2,e[a++]=(l&3)<<6|c&63}return i}var gH={byteLength:Qx,toString:hH,write:pH};function Wx(e){return e.length>>>1}function mH(e){const t=e.byteLength;e=new DataView(e.buffer,e.byteOffset,t);let n="",r=0;for(let i=t-t%4;r=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-65+10;if(e>=97&&e<=102)return e-97+10}function Bg(e){let t=0;for(let n=0,r=e.length;n=55296&&i<=56319&&n+1=56320&&o<=57343){t+=4,n++;continue}}i<=127?t+=1:i<=2047?t+=2:t+=3}return t}let kg;if(typeof TextDecoder<"u"){const e=new TextDecoder;kg=function(n){return e.decode(n)}}else kg=function(t){const n=t.byteLength;let r="",i=0;for(;i0){let u=0;for(;u>l,l-=6;l>=0;)t[s++]=128|u>>l&63,l-=6;a+=u>=65536?2:1}return o};var _H={byteLength:Bg,toString:kg,write:Pg};function Gx(e){return e.length*2}function bH(e){const t=e.byteLength;let n="";for(let r=0;r>8,l=s%256;e[n+a*2]=l,e[n+a*2+1]=u}return i}var AH={byteLength:Gx,toString:bH,write:wH};(function(e,t){const n=fH,r=gH,i=vH,o=_H,a=AH,s=new Uint8Array(Uint16Array.of(255).buffer)[0]===255;function u(f){switch(f){case"ascii":return n;case"base64":return r;case"hex":return i;case"utf8":case"utf-8":case void 0:return o;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a;default:throw new Error(`Unknown encoding: ${f}`)}}function l(f){return f instanceof Uint8Array}function c(f){try{return u(f),!0}catch{return!1}}function h(f,R,k){const x=new Uint8Array(f);return R!==void 0&&t.fill(x,R,0,x.byteLength,k),x}function _(f){return new Uint8Array(f)}function v(f){return new Uint8Array(f)}function P(f,R){return u(R).byteLength(f)}function N(f,R){if(f===R)return 0;const k=Math.min(f.byteLength,R.byteLength);f=new DataView(f.buffer,f.byteOffset,f.byteLength),R=new DataView(R.buffer,R.byteOffset,R.byteLength);let x=0;for(let ot=k-k%4;x_t)return 1}return f.byteLength>R.byteLength?1:f.byteLengthx+ot.byteLength,0));const k=new Uint8Array(R);return f.reduce((x,ot)=>(k.set(ot,x),x+ot.byteLength),0),k}function z(f,R,k=0,x=0,ot=f.byteLength){if(ot>0&&ot=f.byteLength)throw new RangeError("sourceStart is out of range");if(ot<0)throw new RangeError("sourceEnd is out of range");k>=R.byteLength&&(k=R.byteLength),ot>f.byteLength&&(ot=f.byteLength),R.byteLength-k=f.byteLength){if(ot)return-1;k=f.byteLength-1}else if(k<0)if(ot)k=0;else return-1;if(typeof R=="string")R=H(R,x);else if(typeof R=="number")return R=R&255,ot?f.indexOf(R,k):f.lastIndexOf(R,k);if(R.byteLength===0)return-1;if(ot){let _t=-1;for(let dt=k;dtf.byteLength&&(k=f.byteLength-R.byteLength);for(let _t=k;_t>=0;_t--){let dt=!0;for(let bt=0;bt=ot||x<=k?"":(k<0&&(k=0),x>ot&&(x=ot),(k!==0||xfunction(){return a||(0,o[Object.keys(o)[0]])((a={exports:{}}).exports,a),a.exports},t=(()=>{for(var o=new Uint8Array(128),a=0;a<64;a++)o[a<26?a+65:a<52?a+71:a<62?a-4:a*4-205]=a;return s=>{for(var u=s.length,l=new Uint8Array((u-(s[u-1]=="=")-(s[u-2]=="="))*3/4|0),c=0,h=0;c>4,l[h++]=v<<4|P>>2,l[h++]=P<<6|N}return l}})(),n=e({"wasm-binary:./blake2b.wat"(o,a){a.exports=t("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}}),r=n(),i=WebAssembly.compile(r);return hp=async o=>(await WebAssembly.instantiate(await i,o)).exports,hp}var Jn=lH,LH=_f,Ri=null,U4=typeof WebAssembly<"u"&&xH()().then(e=>{Ri=e}),Ci=64,vd=[];sH.exports=On;var $4=vi.BYTES_MIN=16,j4=vi.BYTES_MAX=64;vi.BYTES=32;var V4=vi.KEYBYTES_MIN=16,q4=vi.KEYBYTES_MAX=64;vi.KEYBYTES=32;var Q4=vi.SALTBYTES=16,W4=vi.PERSONALBYTES=16;function On(e,t,n,r,i){if(!(this instanceof On))return new On(e,t,n,r,i);if(!Ri)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),i!==!0&&(Jn(e>=$4,"digestLength must be at least "+$4+", was given "+e),Jn(e<=j4,"digestLength must be at most "+j4+", was given "+e),t!=null&&(Jn(t instanceof Uint8Array,"key must be Uint8Array or Buffer"),Jn(t.length>=V4,"key must be at least "+V4+", was given "+t.length),Jn(t.length<=q4,"key must be at least "+q4+", was given "+t.length)),n!=null&&(Jn(n instanceof Uint8Array,"salt must be Uint8Array or Buffer"),Jn(n.length===Q4,"salt must be exactly "+Q4+", was given "+n.length)),r!=null&&(Jn(r instanceof Uint8Array,"personal must be Uint8Array or Buffer"),Jn(r.length===W4,"personal must be exactly "+W4+", was given "+r.length))),vd.length||(vd.push(Ci),Ci+=216),this.digestLength=e,this.finalized=!1,this.pointer=vd.pop(),this._memory=new Uint8Array(Ri.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=t?t.length:0,this._memory[2]=1,this._memory[3]=1,n&&this._memory.set(n,32),r&&this._memory.set(r,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),Ri.blake2b_init(this.pointer,this.digestLength),t&&(this.update(t),this._memory.fill(0,Ci,Ci+t.length),this._memory[this.pointer+200]=128)}On.prototype._realloc=function(e){Ri.memory.grow(Math.max(0,Math.ceil(Math.abs(e-this._memory.length)/65536))),this._memory=new Uint8Array(Ri.memory.buffer)};On.prototype.update=function(e){return Jn(this.finalized===!1,"Hash instance finalized"),Jn(e instanceof Uint8Array,"input must be Uint8Array or Buffer"),Ci+e.length>this._memory.length&&this._realloc(Ci+e.length),this._memory.set(e,Ci),Ri.blake2b_update(this.pointer,Ci,Ci+e.length),this};On.prototype.digest=function(e){if(Jn(this.finalized===!1,"Hash instance finalized"),this.finalized=!0,vd.push(this.pointer),Ri.blake2b_final(this.pointer),!e||e==="binary")return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if(typeof e=="string")return LH.toString(this._memory,e,this.pointer+128,this.pointer+128+this.digestLength);Jn(e instanceof Uint8Array&&e.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var t=0;te(),e):e(new Error("WebAssembly not supported"))};On.prototype.ready=On.ready;On.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)};On.prototype.setPartialHash=function(e){this._memory.set(e,this.pointer)};function CH(){}var Hx={},Kx={},Yx=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},SH=Yx,E0=function(){return SH()&&!!Symbol.toStringTag},G4=typeof Symbol<"u"&&Symbol,FH=Yx,IH=function(){return typeof G4!="function"||typeof Symbol!="function"||typeof G4("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:FH()},EH="Function.prototype.bind called on incompatible ",pp=Array.prototype.slice,BH=Object.prototype.toString,kH="[object Function]",PH=function(t){var n=this;if(typeof n!="function"||BH.call(n)!==kH)throw new TypeError(EH+n);for(var r=pp.call(arguments,1),i,o=function(){if(this instanceof i){var c=n.apply(this,r.concat(pp.call(arguments)));return Object(c)===c?c:this}else return n.apply(t,r.concat(pp.call(arguments)))},a=Math.max(0,n.length-r.length),s=[],u=0;u"u"?ae:ai(Uint8Array),ca={"%AggregateError%":typeof AggregateError>"u"?ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ae:ArrayBuffer,"%ArrayIteratorPrototype%":Pa?ai([][Symbol.iterator]()):ae,"%AsyncFromSyncIteratorPrototype%":ae,"%AsyncFunction%":Ta,"%AsyncGenerator%":Ta,"%AsyncGeneratorFunction%":Ta,"%AsyncIteratorPrototype%":Ta,"%Atomics%":typeof Atomics>"u"?ae:Atomics,"%BigInt%":typeof BigInt>"u"?ae:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ae:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ae:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ae:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ae:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ae:FinalizationRegistry,"%Function%":Zx,"%GeneratorFunction%":Ta,"%Int8Array%":typeof Int8Array>"u"?ae:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ae:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Pa?ai(ai([][Symbol.iterator]())):ae,"%JSON%":typeof JSON=="object"?JSON:ae,"%Map%":typeof Map>"u"?ae:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Pa?ae:ai(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ae:Promise,"%Proxy%":typeof Proxy>"u"?ae:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ae:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ae:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Pa?ae:ai(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Pa?ai(""[Symbol.iterator]()):ae,"%Symbol%":Pa?Symbol:ae,"%SyntaxError%":Ts,"%ThrowTypeError%":RH,"%TypedArray%":zH,"%TypeError%":ms,"%Uint8Array%":typeof Uint8Array>"u"?ae:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ae:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ae:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ae:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ae:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ae:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ae:WeakSet};try{null.error}catch(e){var DH=ai(ai(e));ca["%Error.prototype%"]=DH}var NH=function e(t){var n;if(t==="%AsyncFunction%")n=gp("async function () {}");else if(t==="%GeneratorFunction%")n=gp("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=gp("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=ai(i.prototype))}return ca[t]=n,n},H4={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Zc=tm,bf=OH,UH=Zc.call(Function.call,Array.prototype.concat),$H=Zc.call(Function.apply,Array.prototype.splice),K4=Zc.call(Function.call,String.prototype.replace),wf=Zc.call(Function.call,String.prototype.slice),jH=Zc.call(Function.call,RegExp.prototype.exec),VH=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qH=/\\(\\)?/g,QH=function(t){var n=wf(t,0,1),r=wf(t,-1);if(n==="%"&&r!=="%")throw new Ts("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ts("invalid intrinsic syntax, expected opening `%`");var i=[];return K4(t,VH,function(o,a,s,u){i[i.length]=s?K4(u,qH,"$1"):a||o}),i},WH=function(t,n){var r=t,i;if(bf(H4,r)&&(i=H4[r],r="%"+i[0]+"%"),bf(ca,r)){var o=ca[r];if(o===Ta&&(o=NH(r)),typeof o>"u"&&!n)throw new ms("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Ts("intrinsic "+t+" does not exist!")},em=function(t,n){if(typeof t!="string"||t.length===0)throw new ms("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ms('"allowMissing" argument must be a boolean');if(jH(/^%?[^%]*%?$/,t)===null)throw new Ts("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=QH(t),i=r.length>0?r[0]:"",o=WH("%"+i+"%",n),a=o.name,s=o.value,u=!1,l=o.alias;l&&(i=l[0],$H(r,UH([0,1],l)));for(var c=1,h=!0;c=r.length){var N=la(s,_);h=!!N,h&&"get"in N&&!("originalValue"in N.get)?s=N.get:s=s[_]}else h=bf(s,_),s=s[_];h&&!u&&(ca[a]=s)}}return s},Mg={},GH={get exports(){return Mg},set exports(e){Mg=e}};(function(e){var t=tm,n=em,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(h){var _=o(t,i,arguments);if(a&&s){var v=a(_,"length");v.configurable&&s(_,"length",{value:1+u(0,h.length-(arguments.length-1))})}return _};var l=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(GH);var Xx=em,Jx=Mg,HH=Jx(Xx("String.prototype.indexOf")),nm=function(t,n){var r=Xx(t,!!n);return typeof r=="function"&&HH(t,".prototype.")>-1?Jx(r):r},KH=E0(),YH=nm,Tg=YH("Object.prototype.toString"),B0=function(t){return KH&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Tg(t)==="[object Arguments]"},tL=function(t){return B0(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Tg(t)!=="[object Array]"&&Tg(t.callee)==="[object Function]"},ZH=function(){return B0(arguments)}();B0.isLegacyArguments=tL;var XH=ZH?B0:tL,JH=Object.prototype.toString,tK=Function.prototype.toString,eK=/^\s*(?:function)?\*/,eL=E0(),yp=Object.getPrototypeOf,nK=function(){if(!eL)return!1;try{return Function("return function*() {}")()}catch{}},vp,rK=function(t){if(typeof t!="function")return!1;if(eK.test(tK.call(t)))return!0;if(!eL){var n=JH.call(t);return n==="[object GeneratorFunction]"}if(!yp)return!1;if(typeof vp>"u"){var r=nK();vp=r?yp(r):!1}return yp(t)===vp},nL=Function.prototype.toString,ts=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Og,_d;if(typeof ts=="function"&&typeof Object.defineProperty=="function")try{Og=Object.defineProperty({},"length",{get:function(){throw _d}}),_d={},ts(function(){throw 42},null,Og)}catch(e){e!==_d&&(ts=null)}else ts=null;var iK=/^\s*class\b/,Rg=function(t){try{var n=nL.call(t);return iK.test(n)}catch{return!1}},_p=function(t){try{return Rg(t)?!1:(nL.call(t),!0)}catch{return!1}},bd=Object.prototype.toString,oK="[object Object]",aK="[object Function]",sK="[object GeneratorFunction]",lK="[object HTMLAllCollection]",cK="[object HTML document.all class]",uK="[object HTMLCollection]",dK=typeof Symbol=="function"&&!!Symbol.toStringTag,fK=!(0 in[,]),zg=function(){return!1};if(typeof document=="object"){var hK=document.all;bd.call(hK)===bd.call(document.all)&&(zg=function(t){if((fK||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=bd.call(t);return(n===lK||n===cK||n===uK||n===oK)&&t("")==null}catch{}return!1})}var pK=ts?function(t){if(zg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{ts(t,null,Og)}catch(n){if(n!==_d)return!1}return!Rg(t)&&_p(t)}:function(t){if(zg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(dK)return _p(t);if(Rg(t))return!1;var n=bd.call(t);return n!==aK&&n!==sK&&!/^\[object HTML/.test(n)?!1:_p(t)},gK=pK,mK=Object.prototype.toString,rL=Object.prototype.hasOwnProperty,yK=function(t,n,r){for(var i=0,o=t.length;i=3&&(i=r),mK.call(t)==="[object Array]"?yK(t,n,i):typeof t=="string"?vK(t,n,i):_K(t,n,i)},iL=bK,bp=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],wK=typeof globalThis>"u"?ci:globalThis,oL=function(){for(var t=[],n=0;n"u"?ci:globalThis,cL=xK(),SK=rm("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r-1}return Ad?IK(t):!1},fL=iL,EK=oL,hL=nm,Ap=aL,BK=hL("Object.prototype.toString"),pL=E0(),Y4=typeof globalThis>"u"?ci:globalThis,kK=EK(),PK=hL("String.prototype.slice"),gL={},xp=Object.getPrototypeOf;pL&&Ap&&xp&&fL(kK,function(e){if(typeof Y4[e]=="function"){var t=new Y4[e];if(Symbol.toStringTag in t){var n=xp(t),r=Ap(n,Symbol.toStringTag);if(!r){var i=xp(n);r=Ap(i,Symbol.toStringTag)}gL[e]=r.get}}});var MK=function(t){var n=!1;return fL(gL,function(r,i){if(!n)try{var o=r.call(t);o===i&&(n=o)}catch{}}),n},TK=dL,OK=function(t){return TK(t)?!pL||!(Symbol.toStringTag in t)?PK(BK(t),8,-1):MK(t):!1};(function(e){var t=XH,n=rK,r=OK,i=dL;function o(yt){return yt.call.bind(yt)}var a=typeof BigInt<"u",s=typeof Symbol<"u",u=o(Object.prototype.toString),l=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(a)var _=o(BigInt.prototype.valueOf);if(s)var v=o(Symbol.prototype.valueOf);function P(yt,It){if(typeof yt!="object")return!1;try{return It(yt),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function N(yt){return typeof Promise<"u"&&yt instanceof Promise||yt!==null&&typeof yt=="object"&&typeof yt.then=="function"&&typeof yt.catch=="function"}e.isPromise=N;function M(yt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(yt):i(yt)||O(yt)}e.isArrayBufferView=M;function z(yt){return r(yt)==="Uint8Array"}e.isUint8Array=z;function I(yt){return r(yt)==="Uint8ClampedArray"}e.isUint8ClampedArray=I;function W(yt){return r(yt)==="Uint16Array"}e.isUint16Array=W;function H(yt){return r(yt)==="Uint32Array"}e.isUint32Array=H;function it(yt){return r(yt)==="Int8Array"}e.isInt8Array=it;function B(yt){return r(yt)==="Int16Array"}e.isInt16Array=B;function p(yt){return r(yt)==="Int32Array"}e.isInt32Array=p;function L(yt){return r(yt)==="Float32Array"}e.isFloat32Array=L;function Z(yt){return r(yt)==="Float64Array"}e.isFloat64Array=Z;function K(yt){return r(yt)==="BigInt64Array"}e.isBigInt64Array=K;function G(yt){return r(yt)==="BigUint64Array"}e.isBigUint64Array=G;function et(yt){return u(yt)==="[object Map]"}et.working=typeof Map<"u"&&et(new Map);function w(yt){return typeof Map>"u"?!1:et.working?et(yt):yt instanceof Map}e.isMap=w;function g(yt){return u(yt)==="[object Set]"}g.working=typeof Set<"u"&&g(new Set);function E(yt){return typeof Set>"u"?!1:g.working?g(yt):yt instanceof Set}e.isSet=E;function U(yt){return u(yt)==="[object WeakMap]"}U.working=typeof WeakMap<"u"&&U(new WeakMap);function Q(yt){return typeof WeakMap>"u"?!1:U.working?U(yt):yt instanceof WeakMap}e.isWeakMap=Q;function T(yt){return u(yt)==="[object WeakSet]"}T.working=typeof WeakSet<"u"&&T(new WeakSet);function Y(yt){return T(yt)}e.isWeakSet=Y;function J(yt){return u(yt)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer<"u"&&J(new ArrayBuffer);function V(yt){return typeof ArrayBuffer>"u"?!1:J.working?J(yt):yt instanceof ArrayBuffer}e.isArrayBuffer=V;function C(yt){return u(yt)==="[object DataView]"}C.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&C(new DataView(new ArrayBuffer(1),0,1));function O(yt){return typeof DataView>"u"?!1:C.working?C(yt):yt instanceof DataView}e.isDataView=O;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function S(yt){return u(yt)==="[object SharedArrayBuffer]"}function d(yt){return typeof lt>"u"?!1:(typeof S.working>"u"&&(S.working=S(new lt)),S.working?S(yt):yt instanceof lt)}e.isSharedArrayBuffer=d;function $(yt){return u(yt)==="[object AsyncFunction]"}e.isAsyncFunction=$;function f(yt){return u(yt)==="[object Map Iterator]"}e.isMapIterator=f;function R(yt){return u(yt)==="[object Set Iterator]"}e.isSetIterator=R;function k(yt){return u(yt)==="[object Generator]"}e.isGeneratorObject=k;function x(yt){return u(yt)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=x;function ot(yt){return P(yt,l)}e.isNumberObject=ot;function _t(yt){return P(yt,c)}e.isStringObject=_t;function dt(yt){return P(yt,h)}e.isBooleanObject=dt;function bt(yt){return a&&P(yt,_)}e.isBigIntObject=bt;function Ut(yt){return s&&P(yt,v)}e.isSymbolObject=Ut;function Pt(yt){return ot(yt)||_t(yt)||dt(yt)||bt(yt)||Ut(yt)}e.isBoxedPrimitive=Pt;function Ot(yt){return typeof Uint8Array<"u"&&(V(yt)||d(yt))}e.isAnyArrayBuffer=Ot,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(yt){Object.defineProperty(e,yt,{enumerable:!1,value:function(){throw new Error(yt+" is not supported in userland")}})})})(Kx);var RK=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Dg={},Z4={get exports(){return Dg},set exports(e){Dg=e}};typeof Object.create=="function"?Z4.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Z4.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};(function(e){var t=Object.getOwnPropertyDescriptors||function(O){for(var lt=Object.keys(O),S={},d=0;d=d)return R;switch(R){case"%s":return String(S[lt++]);case"%d":return Number(S[lt++]);case"%j":try{return JSON.stringify(S[lt++])}catch{return"[Circular]"}default:return R}}),f=S[lt];lt"u")return function(){return e.deprecate(C,O).apply(this,arguments)};var lt=!1;function S(){if(!lt){if(process.throwDeprecation)throw new Error(O);process.traceDeprecation?console.trace(O):console.error(O),lt=!0}return C.apply(this,arguments)}return S};var r={},i=/^$/;if({}.NODE_DEBUG){var o={}.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}e.debuglog=function(C){if(C=C.toUpperCase(),!r[C])if(i.test(C)){var O=process.pid;r[C]=function(){var lt=e.format.apply(e,arguments);console.error("%s %d: %s",C,O,lt)}}else r[C]=function(){};return r[C]};function a(C,O){var lt={seen:[],stylize:u};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),z(O)?lt.showHidden=O:O&&e._extend(lt,O),p(lt.showHidden)&&(lt.showHidden=!1),p(lt.depth)&&(lt.depth=2),p(lt.colors)&&(lt.colors=!1),p(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=s),c(lt,C,lt.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(C,O){var lt=a.styles[O];return lt?"\x1B["+a.colors[lt][0]+"m"+C+"\x1B["+a.colors[lt][1]+"m":C}function u(C,O){return C}function l(C){var O={};return C.forEach(function(lt,S){O[lt]=!0}),O}function c(C,O,lt){if(C.customInspect&&O&&et(O.inspect)&&O.inspect!==e.inspect&&!(O.constructor&&O.constructor.prototype===O)){var S=O.inspect(lt,C);return it(S)||(S=c(C,S,lt)),S}var d=h(C,O);if(d)return d;var $=Object.keys(O),f=l($);if(C.showHidden&&($=Object.getOwnPropertyNames(O)),G(O)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return _(O);if($.length===0){if(et(O)){var R=O.name?": "+O.name:"";return C.stylize("[Function"+R+"]","special")}if(L(O))return C.stylize(RegExp.prototype.toString.call(O),"regexp");if(K(O))return C.stylize(Date.prototype.toString.call(O),"date");if(G(O))return _(O)}var k="",x=!1,ot=["{","}"];if(M(O)&&(x=!0,ot=["[","]"]),et(O)){var _t=O.name?": "+O.name:"";k=" [Function"+_t+"]"}if(L(O)&&(k=" "+RegExp.prototype.toString.call(O)),K(O)&&(k=" "+Date.prototype.toUTCString.call(O)),G(O)&&(k=" "+_(O)),$.length===0&&(!x||O.length==0))return ot[0]+k+ot[1];if(lt<0)return L(O)?C.stylize(RegExp.prototype.toString.call(O),"regexp"):C.stylize("[Object]","special");C.seen.push(O);var dt;return x?dt=v(C,O,lt,f,$):dt=$.map(function(bt){return P(C,O,lt,f,bt,x)}),C.seen.pop(),N(dt,k,ot)}function h(C,O){if(p(O))return C.stylize("undefined","undefined");if(it(O)){var lt="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return C.stylize(lt,"string")}if(H(O))return C.stylize(""+O,"number");if(z(O))return C.stylize(""+O,"boolean");if(I(O))return C.stylize("null","null")}function _(C){return"["+Error.prototype.toString.call(C)+"]"}function v(C,O,lt,S,d){for(var $=[],f=0,R=O.length;f-1&&($?R=R.split(` +`).map(function(x){return" "+x}).join(` +`).slice(2):R=` +`+R.split(` +`).map(function(x){return" "+x}).join(` +`))):R=C.stylize("[Circular]","special")),p(f)){if($&&d.match(/^\d+$/))return R;f=JSON.stringify(""+d),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=C.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=C.stylize(f,"string"))}return f+": "+R}function N(C,O,lt){var S=C.reduce(function(d,$){return $.indexOf(` +`)>=0,d+$.replace(/\u001b\[\d\d?m/g,"").length+1},0);return S>60?lt[0]+(O===""?"":O+` + `)+" "+C.join(`, + `)+" "+lt[1]:lt[0]+O+" "+C.join(", ")+" "+lt[1]}e.types=Kx;function M(C){return Array.isArray(C)}e.isArray=M;function z(C){return typeof C=="boolean"}e.isBoolean=z;function I(C){return C===null}e.isNull=I;function W(C){return C==null}e.isNullOrUndefined=W;function H(C){return typeof C=="number"}e.isNumber=H;function it(C){return typeof C=="string"}e.isString=it;function B(C){return typeof C=="symbol"}e.isSymbol=B;function p(C){return C===void 0}e.isUndefined=p;function L(C){return Z(C)&&g(C)==="[object RegExp]"}e.isRegExp=L,e.types.isRegExp=L;function Z(C){return typeof C=="object"&&C!==null}e.isObject=Z;function K(C){return Z(C)&&g(C)==="[object Date]"}e.isDate=K,e.types.isDate=K;function G(C){return Z(C)&&(g(C)==="[object Error]"||C instanceof Error)}e.isError=G,e.types.isNativeError=G;function et(C){return typeof C=="function"}e.isFunction=et;function w(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||typeof C>"u"}e.isPrimitive=w,e.isBuffer=RK;function g(C){return Object.prototype.toString.call(C)}function E(C){return C<10?"0"+C.toString(10):C.toString(10)}var U=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Q(){var C=new Date,O=[E(C.getHours()),E(C.getMinutes()),E(C.getSeconds())].join(":");return[C.getDate(),U[C.getMonth()],O].join(" ")}e.log=function(){console.log("%s - %s",Q(),e.format.apply(e,arguments))},e.inherits=Dg,e._extend=function(C,O){if(!O||!Z(O))return C;for(var lt=Object.keys(O),S=lt.length;S--;)C[lt[S]]=O[lt[S]];return C};function T(C,O){return Object.prototype.hasOwnProperty.call(C,O)}var Y=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');if(Y&&O[Y]){var lt=O[Y];if(typeof lt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(lt,Y,{value:lt,enumerable:!1,writable:!1,configurable:!0}),lt}function lt(){for(var S,d,$=new Promise(function(k,x){S=k,d=x}),f=[],R=0;R0;)n.unshift(0),o--;return n}async function HK(e,t){t=t||{};let n=32767,r,i=!1;for(;!i;)try{r=new WebAssembly.Memory({initial:n}),i=!0}catch(c){if(n===1)throw c;console.warn("Could not allocate "+n*1024*64+" bytes. This may cause severe instability. Trying with "+n*1024*64/2+" bytes"),n=Math.floor(n/2)}const o=await WebAssembly.compile(e);let a;const s=await WebAssembly.instantiate(o,{env:{memory:r},runtime:{exceptionHandler:function(c){let h;throw c==1?h="Signal not found. ":c==2?h="Too many signals set. ":c==3?h="Signal already set. ":c==4?h="Assert Failed. ":c==5?h="Not enough memory. ":h="Unknown error.",console.log("ERROR: ",c,h),new Error(h)},showSharedRWMemory:function(){const c=s.exports.getFieldNumLen32(),h=new Uint32Array(c);for(let _=0;_0;v++)_.push(h[c+v]);return String.fromCharCode.apply(null,_)}}class KK{constructor(t,n,r){this.memory=t,this.i32=new Uint32Array(t.buffer),this.instance=n,this.n32=(this.instance.exports.getFrLen()>>2)-2;const i=this.instance.exports.getPRawPrime(),o=new Array(this.n32);for(let a=0;a>2)+a];this.prime=qe.fromArray(o,4294967296),this.Fr=new RW(this.prime),this.mask32=qe.fromString("FFFFFFFF",16),this.NVars=this.instance.exports.getNVars(),this.n64=Math.floor((this.Fr.bitLength-1)/64)+1,this.R=this.Fr.e(qe.shiftLeft(1,this.n64*64)),this.RInv=this.Fr.inv(this.R),this.sanityCheck=r}circom_version(){return 1}async _doCalculateWitness(t,n){this.instance.exports.init(this.sanityCheck||n?1:0);const r=this.allocInt(),i=this.allocFr();Object.keys(t).forEach(a=>{const s=vL(a),u=parseInt(s.slice(0,8),16),l=parseInt(s.slice(8,16),16);try{this.instance.exports.getSignalOffset32(r,0,u,l)}catch{throw new Error(`Signal ${a} is not an input of the circuit.`)}const c=this.getInt(r),h=yL(t[a]);for(let _=0;_>2]}setInt(t,n){this.i32[t>>2]=n}getFr(t){const n=this,r=t>>2;if(n.i32[r+1]&2147483648){const o=new Array(n.n32);for(let s=0;s>2]=s,r.i32[(t>>2)+1]=0;return}r.i32[t>>2]=0,r.i32[(t>>2)+1]=2147483648;const a=qe.toArray(n,4294967296);for(let s=0;s=0?r.i32[(t>>2)+2+s]=a[u]:r.i32[(t>>2)+2+s]=0}}}class YK{constructor(t,n){this.instance=t,this.version=this.instance.exports.getVersion(),this.n32=this.instance.exports.getFieldNumLen32(),this.instance.exports.getRawPrime();const r=new Array(this.n32);for(let i=0;i{const a=vL(o),s=parseInt(a.slice(0,8),16),u=parseInt(a.slice(8,16),16),l=yL(t[o]);for(let c=0;c":">",'"':""","'":"'"},o=/[&<>'"]/g;function a(u){return i[u]||u}var s=`var _ENCODE_HTML_RULES = { + "&": "&" + , "<": "<" + , ">": ">" + , '"': """ + , "'": "'" + } + , _MATCH_HTML = /[&<>'"]/g; +function encode_char(c) { + return _ENCODE_HTML_RULES[c] || c; +}; +`;e.escapeXML=function(u){return u==null?"":String(u).replace(o,a)},e.escapeXML.toString=function(){return Function.prototype.toString.call(this)+`; +`+s},e.shallowCopy=function(u,l){if(l=l||{},u!=null)for(var c in l)r(l,c)&&(c==="__proto__"||c==="constructor"||(u[c]=l[c]));return u},e.shallowCopyFromList=function(u,l,c){if(c=c||[],l=l||{},u!=null)for(var h=0;h (http://fleegix.org)",aY="Apache-2.0",sY={ejs:"./bin/cli.js"},lY="./lib/ejs.js",cY="ejs.min.js",uY="ejs.min.js",dY={type:"git",url:"git://github.com/mde/ejs.git"},fY="https://github.com/mde/ejs/issues",hY="https://github.com/mde/ejs",pY={jake:"^10.8.5"},gY={browserify:"^16.5.1",eslint:"^6.8.0","git-directory-deploy":"^1.5.1",jsdoc:"^3.6.7","lru-cache":"^4.0.1",mocha:"^7.1.1","uglify-js":"^3.3.16"},mY={node:">=0.10.0"},yY={test:"mocha"},vY={name:eY,description:nY,keywords:rY,version:iY,author:oY,license:aY,bin:sY,main:lY,jsdelivr:cY,unpkg:uY,repository:dY,bugs:fY,homepage:hY,dependencies:pY,devDependencies:gY,engines:mY,scripts:yY};(function(e){/** + * @file Embedded JavaScript templating engine. {@link http://ejs.co} + * @author Matthew Eernisse + * @author Tiancheng "Timothy" Gu + * @project EJS + * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0} + */var t=gf,n=gf,r=_L,i=!1,o=vY.version,a="<",s=">",u="%",l="locals",c="ejs",h="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",_=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"],v=_.concat("cache"),P=/^\uFEFF/,N=/^[a-zA-Z_$][0-9a-zA-Z_$]*$/;e.cache=r.cache,e.fileLoader=t.readFileSync,e.localsName=l,e.promiseImpl=new Function("return this;")().Promise,e.resolveInclude=function(Z,K,G){var et=n.dirname,w=n.extname,g=n.resolve,E=g(G?K:et(K),Z),U=w(Z);return U||(E+=".ejs"),E};function M(Z,K){var G;if(K.some(function(et){return G=e.resolveInclude(Z,et,!0),t.existsSync(G)}))return G}function z(Z,K){var G,et,w=K.views,g=/^[A-Za-z]+:\\|^\//.exec(Z);if(g&&g.length)Z=Z.replace(/^\/*/,""),Array.isArray(K.root)?G=M(Z,K.root):G=e.resolveInclude(Z,K.root||"/",!0);else if(K.filename&&(et=e.resolveInclude(Z,K.filename),t.existsSync(et)&&(G=et)),!G&&Array.isArray(w)&&(G=M(Z,w)),!G&&typeof K.includer!="function")throw new Error('Could not find the include file "'+K.escapeFunction(Z)+'"');return G}function I(Z,K){var G,et=Z.filename,w=arguments.length>1;if(Z.cache){if(!et)throw new Error("cache option requires a filename");if(G=e.cache.get(et),G)return G;w||(K=H(et).toString().replace(P,""))}else if(!w){if(!et)throw new Error("Internal EJS error: no file name or template provided");K=H(et).toString().replace(P,"")}return G=e.compile(K,Z),Z.cache&&e.cache.set(et,G),G}function W(Z,K,G){var et;if(G){try{et=I(Z)(K)}catch(w){return G(w)}G(null,et)}else{if(typeof e.promiseImpl=="function")return new e.promiseImpl(function(w,g){try{et=I(Z)(K),w(et)}catch(E){g(E)}});throw new Error("Please provide a callback function")}}function H(Z){return e.fileLoader(Z)}function it(Z,K){var G=r.shallowCopy(r.createNullProtoObjWherePossible(),K);if(G.filename=z(Z,G),typeof K.includer=="function"){var et=K.includer(Z,G.filename);if(et&&(et.filename&&(G.filename=et.filename),et.template))return I(G,et.template)}return I(G)}function B(Z,K,G,et,w){var g=K.split(` +`),E=Math.max(et-3,0),U=Math.min(g.length,et+3),Q=w(G),T=g.slice(E,U).map(function(Y,J){var V=J+E+1;return(V==et?" >> ":" ")+V+"| "+Y}).join(` +`);throw Z.path=Q,Z.message=(Q||"ejs")+":"+et+` +`+T+` + +`+Z.message,Z}function p(Z){return Z.replace(/;(\s*$)/,"$1")}e.compile=function(K,G){var et;return G&&G.scope&&(i||(console.warn("`scope` option is deprecated and will be removed in EJS 3"),i=!0),G.context||(G.context=G.scope),delete G.scope),et=new L(K,G),et.compile()},e.render=function(Z,K,G){var et=K||r.createNullProtoObjWherePossible(),w=G||r.createNullProtoObjWherePossible();return arguments.length==2&&r.shallowCopyFromList(w,et,_),I(w,Z)(et)},e.renderFile=function(){var Z=Array.prototype.slice.call(arguments),K=Z.shift(),G,et={filename:K},w,g;return typeof arguments[arguments.length-1]=="function"&&(G=Z.pop()),Z.length?(w=Z.shift(),Z.length?r.shallowCopy(et,Z.pop()):(w.settings&&(w.settings.views&&(et.views=w.settings.views),w.settings["view cache"]&&(et.cache=!0),g=w.settings["view options"],g&&r.shallowCopy(et,g)),r.shallowCopyFromList(et,w,v)),et.filename=K):w=r.createNullProtoObjWherePossible(),W(et,w,G)},e.Template=L,e.clearCache=function(){e.cache.reset()};function L(Z,K){K=K||r.createNullProtoObjWherePossible();var G=r.createNullProtoObjWherePossible();this.templateText=Z,this.mode=null,this.truncate=!1,this.currentLine=1,this.source="",G.client=K.client||!1,G.escapeFunction=K.escape||K.escapeFunction||r.escapeXML,G.compileDebug=K.compileDebug!==!1,G.debug=!!K.debug,G.filename=K.filename,G.openDelimiter=K.openDelimiter||e.openDelimiter||a,G.closeDelimiter=K.closeDelimiter||e.closeDelimiter||s,G.delimiter=K.delimiter||e.delimiter||u,G.strict=K.strict||!1,G.context=K.context,G.cache=K.cache||!1,G.rmWhitespace=K.rmWhitespace,G.root=K.root,G.includer=K.includer,G.outputFunctionName=K.outputFunctionName,G.localsName=K.localsName||e.localsName||l,G.views=K.views,G.async=K.async,G.destructuredLocals=K.destructuredLocals,G.legacyInclude=typeof K.legacyInclude<"u"?!!K.legacyInclude:!0,G.strict?G._with=!1:G._with=typeof K._with<"u"?K._with:!0,this.opts=G,this.regex=this.createRegex()}L.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"},L.prototype={createRegex:function(){var Z=h,K=r.escapeRegExpChars(this.opts.delimiter),G=r.escapeRegExpChars(this.opts.openDelimiter),et=r.escapeRegExpChars(this.opts.closeDelimiter);return Z=Z.replace(/%/g,K).replace(//g,et),new RegExp(Z)},compile:function(){var Z,K,G=this.opts,et="",w="",g=G.escapeFunction,E,U=G.filename?JSON.stringify(G.filename):"undefined";if(!this.source){if(this.generateSource(),et+=` var __output = ""; + function __append(s) { if (s !== undefined && s !== null) __output += s } +`,G.outputFunctionName){if(!N.test(G.outputFunctionName))throw new Error("outputFunctionName is not a valid JS identifier.");et+=" var "+G.outputFunctionName+` = __append; +`}if(G.localsName&&!N.test(G.localsName))throw new Error("localsName is not a valid JS identifier.");if(G.destructuredLocals&&G.destructuredLocals.length){for(var Q=" var __locals = ("+G.localsName+` || {}), +`,T=0;T0&&(Q+=`, + `),Q+=Y+" = __locals."+Y}et+=Q+`; +`}G._with!==!1&&(et+=" with ("+G.localsName+` || {}) { +`,w+=` } +`),w+=` return __output; +`,this.source=et+this.source+w}G.compileDebug?Z=`var __line = 1 + , __lines = `+JSON.stringify(this.templateText)+` + , __filename = `+U+`; +try { +`+this.source+`} catch (e) { + rethrow(e, __lines, __filename, __line, escapeFn); +} +`:Z=this.source,G.client&&(Z="escapeFn = escapeFn || "+g.toString()+`; +`+Z,G.compileDebug&&(Z="rethrow = rethrow || "+B.toString()+`; +`+Z)),G.strict&&(Z=`"use strict"; +`+Z),G.debug&&console.log(Z),G.compileDebug&&G.filename&&(Z=Z+` +//# sourceURL=`+U+` +`);try{if(G.async)try{E=new Function("return (async function(){}).constructor;")()}catch(O){throw O instanceof SyntaxError?new Error("This environment does not support async/await"):O}else E=Function;K=new E(G.localsName+", escapeFn, include, rethrow",Z)}catch(O){throw O instanceof SyntaxError&&(G.filename&&(O.message+=" in "+G.filename),O.message+=` while compiling ejs + +`,O.message+=`If the above error is not helpful, you may want to try EJS-Lint: +`,O.message+="https://github.com/RyanZim/EJS-Lint",G.async||(O.message+=` +`,O.message+="Or, if you meant to create an async function, pass `async: true` as an option.")),O}var J=G.client?K:function(lt){var S=function(d,$){var f=r.shallowCopy(r.createNullProtoObjWherePossible(),lt);return $&&(f=r.shallowCopy(f,$)),it(d,G)(f)};return K.apply(G.context,[lt||r.createNullProtoObjWherePossible(),g,S,B])};if(G.filename&&typeof Object.defineProperty=="function"){var V=G.filename,C=n.basename(V,n.extname(V));try{Object.defineProperty(J,"name",{value:C,writable:!1,enumerable:!1,configurable:!0})}catch{}}return J},generateSource:function(){var Z=this.opts;Z.rmWhitespace&&(this.templateText=this.templateText.replace(/[\r\n]+/g,` +`).replace(/^\s+|\s+$/gm,"")),this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var K=this,G=this.parseTemplateText(),et=this.opts.delimiter,w=this.opts.openDelimiter,g=this.opts.closeDelimiter;G&&G.length&&G.forEach(function(E,U){var Q;if(E.indexOf(w+et)===0&&E.indexOf(w+et+et)!==0&&(Q=G[U+2],!(Q==et+g||Q=="-"+et+g||Q=="_"+et+g)))throw new Error('Could not find matching close tag for "'+E+'".');K.scanLine(E)})},parseTemplateText:function(){for(var Z=this.templateText,K=this.regex,G=K.exec(Z),et=[],w;G;)w=G.index,w!==0&&(et.push(Z.substring(0,w)),Z=Z.slice(w)),et.push(G[0]),Z=Z.slice(G[0].length),G=K.exec(Z);return Z&&et.push(Z),et},_addOutput:function(Z){if(this.truncate&&(Z=Z.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!Z)return Z;Z=Z.replace(/\\/g,"\\\\"),Z=Z.replace(/\n/g,"\\n"),Z=Z.replace(/\r/g,"\\r"),Z=Z.replace(/"/g,'\\"'),this.source+=' ; __append("'+Z+`") +`},scanLine:function(Z){var K=this,G=this.opts.delimiter,et=this.opts.openDelimiter,w=this.opts.closeDelimiter,g=0;switch(g=Z.split(` +`).length-1,Z){case et+G:case et+G+"_":this.mode=L.modes.EVAL;break;case et+G+"=":this.mode=L.modes.ESCAPED;break;case et+G+"-":this.mode=L.modes.RAW;break;case et+G+"#":this.mode=L.modes.COMMENT;break;case et+G+G:this.mode=L.modes.LITERAL,this.source+=' ; __append("'+Z.replace(et+G+G,et+G)+`") +`;break;case G+G+w:this.mode=L.modes.LITERAL,this.source+=' ; __append("'+Z.replace(G+G+w,G+w)+`") +`;break;case G+w:case"-"+G+w:case"_"+G+w:this.mode==L.modes.LITERAL&&this._addOutput(Z),this.mode=null,this.truncate=Z.indexOf("-")===0||Z.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case L.modes.EVAL:case L.modes.ESCAPED:case L.modes.RAW:Z.lastIndexOf("//")>Z.lastIndexOf(` +`)&&(Z+=` +`)}switch(this.mode){case L.modes.EVAL:this.source+=" ; "+Z+` +`;break;case L.modes.ESCAPED:this.source+=" ; __append(escapeFn("+p(Z)+`)) +`;break;case L.modes.RAW:this.source+=" ; __append("+p(Z)+`) +`;break;case L.modes.COMMENT:break;case L.modes.LITERAL:this._addOutput(Z);break}}else this._addOutput(Z)}K.opts.compileDebug&&g&&(this.currentLine+=g,this.source+=" ; __line = "+this.currentLine+` +`)}},e.escapeXML=r.escapeXML,e.__express=e.renderFile,e.VERSION=o,e.name=c,typeof window<"u"&&(window.ejs=e)})(tY);/** + * @module @semaphore-protocol/proof + * @version 3.10.1 + * @file A library to generate and verify Semaphore proofs. + * @copyright Ethereum Foundation 2022 + * @license MIT + * @see [Github]{@link https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof} +*/var Af=function(){return Af=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]>BigInt(8)}function wY(e){return[e.pi_a[0],e.pi_a[1],e.pi_b[0][1],e.pi_b[0][0],e.pi_b[1][1],e.pi_b[1][0],e.pi_c[0],e.pi_c[1]]}function AY(e,t,n,r,i){var o=e.trapdoor,a=e.nullifier,s=e.commitment;return _Y(this,void 0,void 0,function(){var u,l,c,h,_;return bY(this,function(v){switch(v.label){case 0:if("depth"in t){if(l=t.indexOf(s),l===-1)throw new Error("The identity is not part of the group");u=t.generateMerkleProof(l)}else u=t;return i||(i={wasmFilePath:"https://www.trusted-setup-pse.org/semaphore/".concat(u.siblings.length,"/semaphore.wasm"),zkeyFilePath:"https://www.trusted-setup-pse.org/semaphore/".concat(u.siblings.length,"/semaphore.zkey")}),[4,XK({identityTrapdoor:o,identityNullifier:a,treePathIndices:u.pathIndices,treeSiblings:u.siblings,externalNullifier:xf(n),signalHash:xf(r)},i.wasmFilePath,i.zkeyFilePath)];case 1:return c=v.sent(),h=c.proof,_=c.publicSignals,[2,{merkleTreeRoot:_[0],nullifierHash:_[1],signal:Ke.from(r).toString(),externalNullifier:Ke.from(n).toString(),proof:wY(h)}]}})})}function xY(e){return{pi_a:[e[0],e[1]],pi_b:[[e[3],e[2]],[e[5],e[4]]],pi_c:[e[6],e[7]],protocol:"groth16",curve:"bn128"}}var LY="groth16",CY="bn128",SY=4,FY=["20491192805390485299153009773594534940189261866228447918068658471970481763042","9383485363053290200918347156157836566562967994039712273449902621266178545958","1"],IY=[["6375614351688725206403948262868962793625744043794305715222011528459656738731","4252822878758300859123897981450591353533073413197771768651442665752259397132"],["10505242626370262277552901082094356697409835680220590971873171140371331206856","21847035105528745403288232691147584728191162732299865338377159692350059136679"],["1","0"]],EY=[["10857046999023057135944570762232829481370756359578518086990519993285655852781","11559732032986387107991004021392285783925812861821192530917403151452391805634"],["8495653923123431417604973247489272438418190587263600148770280649306958101930","4082367875863433681332203403145435568316851327593401208105741076214120093531"],["1","0"]],BY=[[["16243966861079634958125511652590761846958471358623040426599000904006426210032","13406811599156507528361773763681356312643537981039994686313383243831956396116"],["15688083679237922164673518758181461582601853873216319711156397437601833996222","11781596534582143578120404722739278517564025497573071755253972265891888117374"],["1","0"]],[["13589689305661231568162336263197960570915890299814486885851912452076929115480","15629200772768268814959330350023920183087521275477047626405113853190187031523"],["16004221700357242255845535848024178544616388017965468694776181247983831995562","11464919285924930973853174493551975632739604254498590354200272115844983493029"],["1","0"]],[["19717684456458906358368865507225121991585492363133107109865920739019288468011","9218320951536642499143228327011901814587826948504871816273184688188019956292"],["18221695645112467945186983098720611586049108689347006136423489099202471884089","16717590750910963405756115910371408378114896008824240863060392362901176601412"],["1","0"]],[["15953239752392927777442331623182226063776310198012173504208557434319753428770","3995128789564535587814512245259203300137618476815456454931286633947953135662"],["2523786679709693946058523307330825034772478122295850507521258983130425334580","20957319343912866335583737646657534123362052690050674068142580221965936605075"],["1","0"]],[["1382518990777992893805140303684642328066746531257780279226677247567004248173","18976133691706015337908381757202123182841901611067930614519324084182946094218"],["21806956747910197517744499423107239699428979652113081469385876768212706694581","6627710380771660558660627878547223719795356903257079198333641681330388499309"],["1","0"]],[["9032545080831535702239063467087720597970266046938395860207839433937324718536","3811592683283527904145155808200366192489850711742363953668998371801696238057"],["12429982191499850873612518410809641163252887523090441166572590809691267943605","16308433125974933290258540904373317426123214107276055539769464205982500660715"],["1","0"]],[["17626503110323089701269363177710295379967225765713250625279671011873619640598","9485639152672984144988597737758037391807993615552051606205480347442429414340"],["18953587685067712486092665232725058638563458484886448540567142557894080640927","12391874700409435648975069978280047983726144854114915177376036190441913967689"],["1","0"]],[["11408965575174993375815840422438995549652812400401163392501956884932167624437","9830856103389248449121962275587399130605902703453384856543071762984116567573"],["19969543376625663966419118899515353499678204573709836615846115182224340858492","11814906841949499037550820576929552248172160643991870665022770052632331265834"],["1","0"]],[["10090041889587324002759549286390619541526396451963494627957072069124011137562","15035335306919942325459417688135340085377315274625768597233474641923619728582"],["10507786999799841055999967456762679569286329319056926475375760604262707147294","21342049717074059749518233491526445388158772701642182532370641230478027030319"],["1","0"]],[["43456740675249348549891878341522275183186932745162972528932808393415299552","15718373132479769904443326381037437528372212185108294117696143473979328398658"],["4289247401578837038775845192875793775418122783738936298355403103074020081838","11236864934894600819960883124570686936554376109344998527334431594565774237827"],["1","0"]],[["4023016874169005249382064394379671330447496454371261692205411970999350949293","1723458149089715907994189658689343304709709060535625667210252753337752162173"],["17710652158212212080502343565075513548898593397103675832636832371532093744857","7651670126664625790835334090273463062538865895183205964669372719235003083565"],["1","0"]],[["13132169670125192016391258838554965176628317453468870968867717287446623320643","745924679191739894055143748466112994378439645681039136007774787076115375124"],["20909608709868730010029182074820840312550443752829480953667886902663547957991","2126777833939378028304266129616145667925849332481755567268747182629795296580"],["1","0"]],[["16835654219229187428071649241190746119082269636345872682107941472241044260584","4553625243522856553165922942982108474187282402890756796515747778282922584601"],["873742823867191038535544062852920538566418819521732785500614249239215175476","3272293478534046729728233267765357195255129499603632413158978822084188871854"],["1","0"]],[["7601443214415704135008588588192028557655441716696726549510699770097979655628","7252337675475138150830402909353772156046809729627064992143762325769537840623"],["18500126298578278987997086114400065402270866280547473913420536595663876273004","436607343827794507835462908831699962173244647704538949914686722631806931932"],["1","0"]],[["15028154694713144242204861571552635520290993855826554325002991692907421516918","10202326166286888893675634318107715186834588694714750762952081034135561546271"],["12766289885372833812620582632847872978085960777075662988932200910695848591357","18486039841380105976272577521609866666900576498507352937328726490052296469859"],["1","0"]],[["13682963731073238132274278610660469286329368216526659590944079211949686450402","14930624777162656776068112402283260602512252179767747308433194885322661150422"],["21315724107376627085778492378001676935454590984229146391746301404292016287653","18705481657148807016785305378773304476425591636333098330324049960258682574070"],["1","0"]],[["18994803742708336446369128568423705404354655742604689352630273180469431952708","12315240965742683516581565369496371929586281338862761742109651525191835544242"],["12707009780301102830224094192984906206920666691015255692741008594808694787917","18019403342409608922812569436317484250134945386869657285229378095251425778096"],["1","0"]]],kY=[[["2029413683389138792403550203267699914886160938906632433982220835551125967885","21072700047562757817161031222997517981543347628379360635925549008442030252106"],["5940354580057074848093997050200682056184807770593307860589430076672439820312","12156638873931618554171829126792193045421052652279363021382169897324752428276"],["7898200236362823042373859371574133993780991612861777490112507062703164551277","7074218545237549455313236346927434013100842096812539264420499035217050630853"]],[["7077479683546002997211712695946002074877511277312570035766170199895071832130","10093483419865920389913245021038182291233451549023025229112148274109565435465"],["4595479056700221319381530156280926371456704509942304414423590385166031118820","19831328484489333784475432780421641293929726139240675179672856274388269393268"],["11934129596455521040620786944827826205713621633706285934057045369193958244500","8037395052364110730298837004334506829870972346962140206007064471173334027475"]]],PY=[[["1964404930528116823793003656764176108669615750422202377358993070935069307720","2137714996673694828207437580381836490878070731768805974506391024595988817424","1"],["19568893707760843340848992184233194433177372925415116053368211122719346671126","11639469568629189918046964192305250472192697612201524135560178632824282818614","1"],["5317268879687484957437879782519918549127939892210247573193613900261494313825","528174394975085006443543773707702838726735933116136102590448357278717993744","1"],["14865918005176722116473730206622066845866539143554731094374354951675249722731","3197770568483953664363740385883457803041685902965668289308665954510373380344","1"],["6863358721495494421022713667808247652425178970453300712435830652679038918987","15025816433373311798308762709072064417001390853103872064614174594927359131281","1"]],[["17789438292552571310739605737896030466581277887660997531707911256058650850910","4112657509505371631825493224748310061184972897405589115208158208294581472016","1"],["3322052920119834475842380240689494113984887785733316517680891208549118967155","381029395779795399840019487059126246243641886087320875571067736504031557148","1"],["8777645223617381095463415690983421308854368583891690388850387317049320450400","11923582117369144413749726090967341613266070909169947059497952692052020331958","1"],["15493263571528401950994933073246603557158047091963487223668240334879173885581","6315532173951617115856055775098532808695228294437279844344466163873167020700","1"],["3481637421055377106140197938175958155334313900824697193932986771017625492245","20088416136090515091300914661950097694450984520235647990572441134215240947932","1"]],[["4691595252082380256698158158199364410440273386659834000993210659508747323919","9205801980459323513061837717352821162780471027241700646145937351740096374660","1"],["16150531426263112884093068164597994126623437929929609532055221646496813246000","20245743178241899668170758952526381872637304119026868520579207157118516761827","1"],["6063536446992770713985314309889717594240410784717230886576072989709763902848","18258781411255795973918859665416013869184055573057512603788635470145328981347","1"],["10109932964756104512054045207253535333686585863745296080906925765480296575285","4174640428253153601540284363759502713687021920150940723252842152556151210349","1"],["18049428534741480832385046397049175120355008065781483226058177421025493210952","591730261265040164434889324846001338201068482543108348317417391345612814922","1"]],[["9877211178693075145402462781884120278654771727348087433632224794894486095150","19972682062587174829535281061580296764150591339640180868104711395548066529340","1"],["6324578424031095537345184040149690238371517387586958921377481904541316423724","15513931720576048544404512239839508014664224085062729779520992909505663748296","1"],["11371337652479737143800707796204655130812036287859296372695832558127430723628","11757275188600040111649009832378343123994225623498773406233261322165903848967","1"],["13282496583564708104981015168203451877588903263486398132954741568835583461335","1746144324840370907926720490289700342734912534857331743685374514401176014195","1"],["7993952462467372951144011615584426050192046712674662254138390197508963352374","5156942148925224345709309361345680948125600198010285179548841917923439945819","1"]],[["19918517214839406678907482305035208173510172567546071380302965459737278553528","7151186077716310064777520690144511885696297127165278362082219441732663131220","1"],["690581125971423619528508316402701520070153774868732534279095503611995849608","21271996888576045810415843612869789314680408477068973024786458305950370465558","1"],["16461282535702132833442937829027913110152135149151199860671943445720775371319","2814052162479976678403678512565563275428791320557060777323643795017729081887","1"],["4319780315499060392574138782191013129592543766464046592208884866569377437627","13920930439395002698339449999482247728129484070642079851312682993555105218086","1"],["3554830803181375418665292545416227334138838284686406179598687755626325482686","5951609174746846070367113593675211691311013364421437923470787371738135276998","1"]],[["9494885690931955877467315318223108618392113101843890678090902614660136056680","11783514256715757384821021009301806722951917744219075907912683963173706887379","1"],["7562082660623781416745328104576133910743071878837764423695105915778139873834","17954307004260053757579194018551114133664721761483240877658498973152950708099","1"],["19338184851116432029108109461622579541195083625346674255186169347975445785058","38361206266360048012365562393026952048730052530888439195454086987795985927","1"],["21178537742782571863590222710872928190886000600239072595684369348717288330049","9786438258541172244884631831247223050494423968411444302812755467521949734320","1"],["11330504221972341797183339350494223413034293674225690456356444509688810101433","1490009915387901405464437253469086864085891770312035292355706249426866485365","1"]],[["21791720972262589799021600767292883644106575897307484548888696814333235336885","11092962469758788187888592619035811117815082357439060720677582048880121542623","1"],["9418924955930663972575130074928583215922927562059194231976193350658171304436","16113558481826020406162261319744796072664750077095575593106901121115073101408","1"],["20054934960262983176880675919444457578562219675808407582143519621873973120773","14877415271301547911435683263206245199959943680225555496786470669330176961657","1"],["4215199263810110748751715719957184804379752373072771007598572158043965517488","5225943468606602818132879686778547605180105897615251160509064537462109826521","1"],["6250242626034734280813142093008675407723196706248829741247204621913994561803","1472231555266678689888727724824566171966416459791722465278225775922487343641","1"]],[["3047486363455933831148688762823238723024952519326207356549121929667745957778","20241836359289449005887237560564358543646542598344362915541027571505243817211","1"],["5965631918800530319167124148627450454569264331058008407732200168631989208657","20463557477532480934514091877628554948892025887087712764683631108388998871350","1"],["16605042322692983282732511249912403956057999815658038166796858627082222971215","12219061498275616585164456833410962809536084885494309093787669879221959361956","1"],["1548998572074037722622224303222294716243074837074272552644853986075252666508","10393312002885367652301897874262367916506364670364584602554176742602334134772","1"],["16180907689593358346406392015123900260925622357393826746385511046141256905390","12267326749885120640972074479210537480053065569337817484467225562817467244765","1"]],[["19590996174696909242575628014943555633938195923520472786993379268302478708283","2673753072556442230312995111304911178679525806396134504594492458566941824354","1"],["13411253172375451489380472831999887223592471057462692619008484995624281735092","17181767455563581254432161119660408482332423481128600038352147258951772423229","1"],["19138864631164378176055647711995352935065134904103255748190268290992108588628","14282526277736365863821375748687709839392307698935143595732632710176778519757","1"],["20183773658676161990469276414858234178608794783112866811307579993999118293429","5223464433544489066271184294750886227362580875255044558831927430970236355539","1"],["12333466991139269670298178539679773509487545471126920233507132846828588847444","3787586478923104354547687861486563468235879611952775292288436085429794222238","1"]],[["18580370382199518848261939652153768394883698461842792002922164533882262019935","20516185953882700254387267244708111605796661864845495645678049276372075842359","1"],["20041291712709610738573661974551517833120775539593003477018637287434210072702","6326630253906616820412999166182553773360987412889775567442543181359104720511","1"],["13268971611130152315428629919012388924225656285593904211561391821918930327614","9247437189452353488017802041158840512956111558640958728149597697508914590433","1"],["6267384495557139339708615182113725421733376438932580472141549274050146739549","1832264154031452148715318442722960696977572389206897240030908464579133134237","1"],["16650684165487873559901140599157559153018449083939294496255590830891994564285","14140282729498011406186082176268025578697081678243955538935501306868500498994","1"]],[["4247947150009812467217672970806328247513830308400387953244764907353849211641","14500381439127180474801393438175928191199696177607750163263715436006533630877","1"],["21213779524495874664157797605662894019112036728653622806607467354233012380232","1429370857470083395421401524518861545167550347090873730934256398864585069083","1"],["12465277751642747637430517396067173985821959773399832969105187923427872239200","4377704428607835904642653580543541241155601291484645500691968624389522190030","1"],["11283027832501128633761619552392013253304972822086786857121687098087331014745","21463394238922953607096052056881931791797740737164052798044623278557203313720","1"],["19687293493101130967741578773742597470558958652351513582962108464055656171331","4445165696525061401582979300506082669540223774145877762689724631935313716632","1"]],[["3388767735894417381503201756905214431625081913405504580464345986403824999889","21014112837214011009096825602791072748195337199912773858499588477762724153070","1"],["10521317016331497094903116740581271122844131442882845700567581775404872949272","13201921794561774338466680421903602920184688290946713194187958007088351657367","1"],["16170260722059932609965743383032703380650557609693540121262881902248073364496","6004983491336500911294872035126141746032033211872472427212274143945425740617","1"],["10275615677574391293596971122111363003313434841806630200532546038183081960924","5955568702561336410725734958627459212680756023420452791680213386065159525989","1"],["19059081014385850734732058652137664919364805650872154944590269874395511868415","19202365837673729366500417038229950532560250566916189579621883380623278182155","1"]],[["7856986171681248404396064225772749784181602218562773063185003409958949630985","11707218736744382138692483591389641607570557654489363179025201039696228471230","1"],["2902255937308264958973169948617099471543255757887963647238093192858290079050","4092153880227661899721872164083575597602963673456107552146583620177664115673","1"],["18380478859138320895837407377103009470968863533040661874531861881638854174636","14502773952184441371657781525836310753176308880224816843041318743809785835984","1"],["2781117248053224106149213822307598926495461873135153638774638501111353469325","3500056595279027698683405880585654897391289317486204483344715855049598477604","1"],["8880120765926282932795149634761705738498809569874317407549203808931092257005","19080036326648068547894941015038877788526324720587349784852594495705578761000","1"]],[["18427701611614193839908361166447988195308352665132182219164437649866377475111","5299493942596042045861137432338955179078182570752746487573709678936617478454","1"],["4188155714164125069834512529839479682516489319499446390214266838952761728656","2720966082507704094346897998659841489771837229143573083003847010258396944787","1"],["13256461570028177373135283778770729308216900804505379897951455548375840027026","10722074030307391322177899534114921764931623271723882054692012663305322382747","1"],["9824147497244652955949696442395586567974424828238608972020527958186701134273","15755269950882650791869946186461432242513999576056199368058858215068920022191","1"],["21172488506061181949536573476893375313339715931330476837156243346077173297265","13892434487977776248366965108031841947713544939953824768291380177301871559945","1"]],[["1452272927738590248356371174422184656932731110936062990115610832462181634644","3608050114233210789542189629343107890943266759827387991788718454179833288695","1"],["14798240452388909327945424685903532333765637883272751382037716636327236955001","10773894897711848209682368488916121016695006898681985691467605219098835500201","1"],["17204267933132009093604099819536245144503489322639121825381131096467570698650","7704298975420304156332734115679983371345754866278811368869074990486717531131","1"],["8060465662017324080560848316478407038163145149983639907596180500095598669247","20475082166427284188002500222093571716651248980245637602667562336751029856573","1"],["7457566682692308112726332096733260585025339741083447785327706250123165087868","11904519443874922292602150685069370036383697877657723976244907400392778002614","1"]],[["12628427235010608529869146871556870477182704310235373946877240509680742038961","15093298104438768585559335868663959710321348106117735180051519837845319121254","1"],["6593907467779318957599440584793099005109789224774644007604434924706249001015","18549596630007199540674697114946251030815675677713256327810772799104711621483","1"],["6271101737045248834759003849256661059806617144229427987717476992610974162336","355748132218964841305454070022507122319085542484477110563322753565651576458","1"],["2116139772133141967317791473319540620104888687412078412336248003979594158546","4004400204967325849492155713520296687406035356901102254880522534085890616486","1"],["4206647028595764233995379982714022410660284578620723510907006350595207905228","19380634286337609988098517090003334645113675227742745065381519159322795845003","1"]],[["2592407181901686208061988776764501828311271519595797153264758207470081204331","11847594161160074962679125411562687287595382335410213641115001866587988494499","1"],["3346927026869562921166545684451290646273836362895645367665514203662899621366","15758185693543979820528128025093553492246135914029575732836221618882836493143","1"],["20528686657810499188368147206002308531447185877994439397529705707372170337045","18025396678079701612906003769476076600196287001844168390936182972248852818155","1"],["9799815250059685769827017947834627563597884023490186073806184882963949644596","4998495094322372762314630336611134866447406022687118703953312157819349892603","1"],["16176535527670849161173306151058200762642157343823553073439957507563856439772","21877331533292960470552563236986670222564955589137303622102707801351340670855","1"]]],Cp={protocol:LY,curve:CY,nPublic:SY,vk_alpha_1:FY,vk_beta_2:IY,vk_gamma_2:EY,vk_delta_2:BY,vk_alphabeta_12:kY,IC:PY};function MY(e,t){var n=e.merkleTreeRoot,r=e.nullifierHash,i=e.externalNullifier,o=e.signal,a=e.proof;if(t<16||t>32)throw new TypeError("The tree depth must be a number between 16 and 32");var s=Af(Af({},Cp),{vk_delta_2:Cp.vk_delta_2[t-16],IC:Cp.IC[t-16]});return JK(s,[n,r,xf(o),xf(i)],xY(a))}function TY(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bL={};const wL=BigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"),OY=8,J4=[56,57,56,60,60,63,64,63,60,66,60,65,70,60,64,68],tb=e=>{let t=e*e;return e*t*t%wL};function RY(e,t){const n=[];for(let r=0;rBigInt(l));if(n.length<=0)throw new Error("poseidon-lite: Not enough inputs");if(n.length>J4.length)throw new Error("poseidon-lite: Too many inputs");const r=n.length+1,i=OY,o=J4[r-2],{C:a,M:s}=t;if(s.length!==r)throw new Error(`poseidon-lite: Incorrect M length, expected ${r} got ${s.length}`);let u=[0n,...n];for(let l=0;l=i/2+o||c===0)&&(u[c]=tb(u[c]));u=RY(u,s)}return u[0]}var AL=zY;TY(AL);var om={};Object.defineProperty(om,"__esModule",{value:!0});om.default=Ug;function Ug(e){if(Array.isArray(e))return e.map(Ug);if(typeof e=="object"){const r={};for(const[i,o]of Object.entries(e))r[i]=Ug(o);return r}const n=[...Uint8Array.from(atob(e),r=>r.charCodeAt(0))].map(r=>r.toString(16).padStart(2,"0")).join("");return BigInt(`0x${n}`)}var k0={};Object.defineProperty(k0,"__esModule",{value:!0});k0.default=void 0;var DY={C:["DumlkrqalRjQWYbWVvQMIRTEmTwRuymTjSHUcwTNjm4=","APFEUjXyFIxZhlhxafwbzYh7CNTQCGjfVpb/9AlW6GQ=","CN/zSH6KyZ4fKaBY0PqAuTDHKHMLerNs6HnziQ7Pc/U=","Lye+aQ/a7kbDzij3UysTyFbDU0LIS9puIJZjEPrcAdA=","KyrhrPaLe40kFr6/PU9iNLdj/gS4BD7ki4MnvryhbPI=","AxnQYgcr737MperAb5fU1VlSwXWrawPq5ktEx9vxHPo=","KIE9yuuuqoKKN234evSmO8i3vyetScYpjvezh78oUm0=","JydnOyzLyQPxgb844cHUDSAzhlIAw1K8FQkord35y3g=","I07EXKJ3J8LnSr0rKhSUzW771D40BYfWuPueMeZcxjI=","FbUlNAMa4Y9/hiyyz3z3YKsQqBUKM3sczZn/boeX1Cg=","Dcj61tnks19e2aPRhrec444Oio0bWLEy1wHU7s9o0fY=","G82V/8IR+8pgD3BfrT+1Z+pOs3j2Lh/sl4BVGKR+TZw=","EFILCrchyt/p7/gbAW/DTcdto2wleJN4F8uXjQad5Vk=","H21IFJuOf32bJX2O1fu69CkySYB1/tCs6IqeuB9WJ/Y=","HZZV9lIwkBTSngDvNaIIm//43ByBbw3JyjS9tUYMhwU=","BN9aVv+VvK+wUfexzUOpm6cx/2fkcDIFj+PUGFaXzH0=","BnLZlfj/9kAVGz0pDO2vFIaQoQqMhCSn9uwoK25L6Cg=","CZlStBSIRFSyEgDX/6/dXwyancwG8nCOn8HYIJtcdbk=","BSy6IlXf0Ax8SDFDuo1GlEjkNYaptM2Rg/0OhDprn6Y=","C4ut7mkK246wvXRxK3mZr4LeVXByUa13Fgd8uTxGTdw=","EZsVkPEzB69aHuZRAgwHx0nBXWBoOoBQuWPQqOSyvdE=","AxULfNbV0XslKdNr4PZ7gyxKz8iE707lzhW+C/tKjQk=","LMYYLF4UVG488ZUfFzkSNVN077g9gImKvmnLMXyepWU=","AFAyVR5jeMRQz+EppASzdkIYyt7awU4rktLNcxEb8Pk=","IzI34yibqjS7FH6XLry5UWRpw5n8wGn7iPnaLMKCdrU=","Bcj09OvUpuPJgNMWdL++YyMDfyGzSuWk6AwtTCTWAoA=","CnsdsTBC05a6BdgYoxnyUlK8817zru2R7h8JslkPxls=","KnO3H5shDPWxQpZXLJ0y2/FW4rCG/0fcXfVCNlpATsA=","GsmwQXq8yaGTUQfp/8kdw+wY8sTb5/Ipdqdgu1xQxGA=","EsAzmuCDdII/q7B2cH70eSafPk1ssQQ0kBXuBG3JP8A=","C3R1sQKhZa1/WxjbTh5wT1KQCqMlO6rGgkZoLlbpoo4=","A3woSeGRyj7bHF5J9ui4kXyEPjeTZvLqMqs6qI1/hEg=","BaaBH4VW8BTpJnRmHiF+m9UgbFyToH3BRf2xdqcWNG8=","KaeV59mAKJRulHt11U6fBEB26Hp7KIO0e2de9fOL1m4=","IEOaDISzIutFo4V6/Bj1gm6Mc4LIoVhcUHvhmZgf0i8=","Lguo2U2ez0qU7CBQxzcf8btQ8neZqEttSipvKgmCyIc=","FD/RFc4I+yfKOOt8zoIrRReCLNIQkEjS5tDdzKF9ccg=","DGTL7LHHNLhXlo273PgTzfhhFlkyPby/yEMjYjvpyvE=","AoowWEfGg/ZG/KklwWP/WudPNI1iwrZw8UJs75QD2lM=","Lk71EP8Lb9pfqUCrTEOA8mpry2TYlCe4JNZ1W1254ww=","AIHJW8QzhOZj15JwyVbOO4kltPbQM7B4uWOE9QV5QA4=","LtXwyRy9l0kYfi+t5ofgXuJJGzScA5oLuoqfQCOguzg=","MFCZkfiNo1BLvzdO1ari8DRIoix2I0yMmQ8B8zpzUgY=","HD8g/VVAmlMiG3xNSaNWufChEZ+yBntBp1KQlEJOxq0=","ELTn86td8AMElRRFm24Y7sRrsiE+jhMeFwiHtH3cuWw=","KhmCl5w/9/Q93VQ9iRwqvd2A+ATAd9d1A5qjUC5Dre8=","HHTuZPFeHbb+3b6tVtbVXbpDHrw5bJr5XK0PExW9XJE=","B1M+yFC6f5jquTA8rOAbS55PLouCcIz6nC/kWgrhRqA=","IVdrQ45QBEmhUeTurxexVChcaPQtQsGAihGr83ZMB1A=","LxfAVZuP55YIrVyhk9YvELzoOEyBXwkGdD1pMINtSp4=","LUd+OGLQdwinnoqulGFwvJd1pCATGEdK5mWwsbficw4=","Fi9SQ5ZwZMOQ4JVXeYTyka+6ImbDj1q82Jvg9bJ0fqs=","K0yyM+3pukgmTs0siuUNGteoWWqH8p+Kd3enAJI5MxE=","LI+8st2Fc9wduvj0YihUd22y7s5thcTPQlTnw14DsHo=","HW80dyXkgWry/0U/DNVrGZ4bYen2Aemt5eiNuHCUnak=","IEsMOX9OvnHrwtiz31uRPfnmrAK2jTEyTNSa9cRWVSk=","DEy53DxP2BdPEUmzxjw8L57LgnzX3CVTT/j7dbx5xQI=","F0rWGhRIyJmiVBZHT0kwMB5cSUdSeeBjmmFt3EW8e1Q=","GpYXe89NjYn3Wd9OwvPN4uqqKMF3zA+hOpgW1Jo40u8=","Bm0EskMx1xzQ74BUvGDE/wUgLBJqIzwagkKs42C4owo=","KkxPxuwLDPUhlXgoccbdOzgcxl9y4CrVJwN6Yqob2AQ=","E6stE2zPN9RH6fLhSnztyV5yf4RG9tnX5Vr8ASGf1kk=","ESFVL8omBhYZ0k2EPcgnacGwT87Cb1UZTC4+hprMapo=","AO9lMyKxPWyIm8gXFcN9d6bNJn1ZXEqJCaVUbHyXz/E=","DiVIPkWmZSCLJh2Lp0BR5kAMd21lJZXZhFrKNdijl9M=","KfU23LnddoIkUmRlnhXYjjlaw9Td6S2MRkSNuXnuuok=","KlbvnyxT/rrf2jNXXb29iFoSTieAu+oXDkVrqs4Ppb4=","HINhx461z13s+3otF7XECfKuKZmkZ2Lo7kFiQKjLmvE=","FRr/XziyCg/ARzCJqvAga4Po5op2RQe/09CrS+dDGcU=","BMYYfkHtiB3BsjnIj3+dQ6n1L8jIts3R525HYVtR8QA=","E7N72A9NJ/sQ2EMx9vttU0uBxh7RV3ZEnoAbfdycKWc=","AaXFNic8LZ31eL+9MsF7eizjZkwqUgMskyHOscToqOQ=","KrNWGDTKc4Na0F9desuVC0qaLGZrlybagyI5Blt8OwI=","HU2OwpHnINsgD+bWhsDWE6yvavTpXTv2n37VFqWXtkY=","BBKU0sxITSKPV4T+eRn9K7klNRJAoEtxFRTJyAtlrx0=","FUrJjgFwjGEcT6cVmR8ASJj1eTnRJuOSBClx3ZDoH8Y=","CzOdisyn1Pg+7dhAk671EFCzaEyI+LCwRSRWO8bqTaQ=","CVXknmYQyUJUpPhM+6s0RZjw5x6v9Kfdge2VtQg5yC4=","BnRqYVbrpUQmueIiBvFavKmm9B5vU1xvNSVAHqBlRiY=","Dxj1oOzRQjxJbzggxUnCeDjleQ4r0KGWrJF8f/Mgd/s=","BPbuyhdR9zCKxZ7/W+smHku1Y1g+3nvJKnOCI9b3bhM=","K1aXM2TExPXBo+xNo83OA4gR6xFvs+RbwXaNJvwLN1g=","Ejdp3UnVsFTc12uJgEsby44TkrOFcWpdg/62XUN/Ke8=","IUe0JPxIyAqI7lK5EWmqzqmJ9kRkcRUJlCV7L7AcY+k=","D9wfWFSLhXAabFUF6jMqKWR+bzStQkPC6lStiXzr5U0=","Ejc6glH+oATfaKvPD3eG1Lzv8oxdu+DDlE9oXMCgsfI=","IeT06l81+FutfqUv90LJ6KZCdWtq9EID3YofNcGpADU=","FiQ5FtadLKPftHIiJNTEYrVzZkkvRekNioGTTxvDsUc=","HvvkbdeleLT2b5rbyItDeKvCFWbhoEU8oTpBWcrASsI=","B+pehTfPXdCIhgIOI6fzh9Ro1VJb5m+FO2csyWqIlpo=","BajE+ZaLiqO3tHijD5pbY2UPGadefOEcqf4WwLdsALw=","IPBXcSzCFlT7/lm9NF6NrD94GMcBuceILZ1Xtyoy6D8=","BKEu3tqd/WiWcvjGf+4xY23NjojQHUkBm9kLM+sz22k=","J+iNjBXzfc7kTx5UJaUd7L0TbOUJGmdn5J7JVEzNEBo=","L+7Re4QoXtm4pcjF6VpB9m4JZhmncDIjF2xB7kM95NE=","HtfMdu30XHxAQkFCD3Kc85TllCkRMSoNaXK4vVOv8rg=","FXQumbm/oyMVf/jFhvVmDqxng0dhRM3K3yh0vkVGaxo=","GqwoU4f2XoLIlfxoh930BXcQdFTG7AMXKE8DPyfQx4U=","JYUcPIRdR5D53a29tgVzV4MuLnpJd19x7HWpZVTWfHc=","FaWCFWXMLsLOeEV9sZft81O367osVSM3DdzMPZ8Uamc=","JBHVekgTuZgO+n4xodtZZtz2TzYEQndQLxVIXyjHFyc=","AC5vjWUgzUcT4zW4wLbS5kfpqY4S9M0lWIKLXvbLTJs=","L/e8j0OAzemX2gC2FrD80a+PDpHi/h7XOYg0YJ4DFdI=","ALmDG5SFJVle4CckRxvNGC6VIfa3u2jx6Tvk/rsNPL4=","Ci9TdouOv2qGkTsOV8BOARykCGSKR0OofXetvwycNRI=","ACSBVhQv0Dc6R5+R/yOelg9Zn/fpS+abfyopAwXhGY0=","Fx1WILh7+xMoz4wCqz8MmjlxlqpqVCwjUOtRKisrzak=","FwpPVVNvfclwCHx8ENb612DJUhct1U3ZnRBF5Ow0qAg=","KaujP3mf5mwu8xNK6gQzbsw344wc0hG6SC7KF+Lb+uE=","HpvBeaT911j90bsZRQiNR+cNEUoD9qDotbplA2nmSXM=","HdJpeZtmD61Y9/SJLfsLWv6q2GmpxLRPnJ4cQ72vjwk=","Is28i3ARetFAEYHQLhVFnnzNQm/oacfJXR3Syw8krzg=","DvBC5FR3HFM6n1elXFA/zv0xUPUu2Up81bqTucfazv0=","EWCeBq1sj+Lyh/MDYDfohRMY6LCKA1mgOzBP/KYugoQ=","EWbZ5VRhbbqedT7qQnwXt/7NWMB23+QnCLCPW3g6qa8=","LeUpiUMahZWTQTAmNUQT2xd/v0zSrAtW+FWoiDV+5GY=","MAbrT/x6hYGabaSS86isHfUa7lsXuOiddL8Bz19x6a0=","KvQfu2G6ioD9z2//nj9vQimT/o8KRjn5YjRMgiUUUIY=","EZ5oTeR2FV/lprQajryF24cYqyeInoXngbIUus5IJ8M=","GDW3huLokl4Yi+pZrjY1N7USSMI4KPBHz/eEuXs/2AA=","KCAaNMWU36NNeUmWxkM6INFSusKnkFySbEDihasy7rY=","CD79eifRdRCU6A/vr3iwAIZMgutXEYdySnYfiMIsxOc=","C2+Io1dxmVJhWOYc7qJ76BHBbfd3TdhRngeVZPYf0Ts=","Dsho5tFeUdlkT2bh1kcalFiVEcoA0p4QFDkObuQlT1s=","KvM+P4ZncScawMmz7S4RQuzT50uTnNQNANk3q4TJhZE=","C1ICEfkEtefQm12WHGrOdzRWjFR91oWLNkzl5HlR8Xg=","Cy1yLQkZoarY21jxAGKpLqDFasQnDoIsyiKGIBiKHUA=","H3kNTX+M8JTZgM6zfCRT6Ve1SpmRyji74AYdHtblYtQ=","AXHrld+/fR6uqXzThfeAFQiFwWI1oqao2pLOsB5QQjM=","DC0OO1/VdUkym/aIXaZrm3kLQN79LIZQdiMFOBsWiHM=","EWL7KGicJxVOWoIotOcrN3y8r6WJ4oPDXTgDBUQHoY0=","LxRZtl3uRBtkrThqkegxDygsWpKonhmSFiPvgklxG8A=","Hm/zIWtojD2ZbXQ2fVzUwbxInUZ1TrcSwkP3DRtTz7s=","AcqL5zgyuNBoFIfSfRV4AtdBpvNs3CoFdogfkyZHiHU=","H3c1cG/+n8WG+XbVvfIj3GgChggLEM6gC5td4xX5ZQ4=","JSK2D06jMHZAoMLc4EH7qSGsEKPV8JbvR0XKg4KF8Bk=","I/C+4AGxAp1SVQdd3JV/gzQYytT1K2w/jOFsI1VyV1s=","K8Gui43buB/KrC1EVV7VaF0UJjPp35BfZtlAEJMILVk=","D5QGuCllZKNzBFB7jbo+0WI3EnOgex/JgBH81q1yIF8=","I2Co6wzH3vpntymY3pBxThfnWxdKUu5KyxJsjNmV8Kg=","FYcaXN3q2XaATIA8uu8lXrSBWl6W34sAbcu8J2f4iUg=","GTpWdmmY7p4KhlLdLzsdoDYvT1T3I3lUT5V8ze77Qg8=","KjlKQ5NPhpgvm+Vv9PqxcDsuY8itM0g05DCYBed3rg8=","GFmVTP64aV8+i2NdyzRRkoks0RIjRDuntBZuiHbA0UI=","BOEYF2MFDlgBNETby5nxkCsRvCXZC73KQI04GfT+0ys=","D9slPe6Dhp1AwzXqZN6MW7EOuC2wi16LH15VUr/QXyM=","BYy+ippQJ72qTvtiOt6tYnXwhobxwImEqdfFuum08cA=","E4Ltzplx4YZJfq2xrrH1KyO0uDvvAjqw0VIotMzspZo=","A0ZJkPBFxu4IGcpR/RGwvn9huOuZ8Ut34eZjRgHZ6LU=","I/e/yHINwpb/8ztB+Y/4PG/KtGBdsutaqlvBN663Clg=","ClmhWOPuwhF+bpTn8OnezxjD/9XhUxqSGWNhWLuvYvI=","BuxUyAOBwFK1i/I7MS/9POLE66BlQgr49MI+0Adf0Hs=","EYhy3IMuDrVHa1ZkjoZ+yLCTQPenvLG0li8P+e0fnQE=","E9afoSfYNBZa1cfLp61Z7VLgsPDkLX/qleGQa1IJIbE=","FpoXf2PqaBJwscaHenPSG94UOUL7cdxV/YpJ8Z8Qx3s=","BO9RWRxurZfvQvKHrc5A2Tq+sDK5IvZv+36aWnRQVE0=","JW4XWh3AeTkOzXynA/suOxnsYYBdTwPO1fRe5t0Paew=","MBAtKGNqvV/l8q9BL/YAT3XMNg0yBd0toAKBPT4s7rI=","EJmOQt/NO78cBxS8c+sb9ARDo/qZvvSjH9Mb4YL8x5I=","GT7djp/PPXYl+n0ktZih2J8zYur01YLv7K12+HnjaGA=","GBaK/TTy2RXQNozoC3szR9HHpWHOYRQl8mZNeqUfC10=","KTg8AevTtqsMAXZW6+ZYtqMo7He8M2JuKeLpWzPqYRE=","EGRtLyYD3jmh9K5ed3GmSnAttuhvt2q2AL9XP5AQxxE=","C+teB9GycUX1dfE5WlW/Ey+QwltA2ns4ZNAkLcsRF/s=","FtaFJSB4wTPcDT7K1itciDD5W7LlS1mr3/vwGNlvozY=","Cmq9HYM5OPM8dBVOBAS0tApVW7vsId36/Wct1iBH8Bo=","GmefXTbre1yOoSpMLe3I/rEt/+7EUDFycKbxmzTPGGA=","CYD7IzvUVsI5dNUODr/eRyakI+raTo9v+8dZLj8bk9Y=","FhtCIy5huEy/GBCvk6OPwM7OPVYoySggA+ustcMSxys=","CtoQqQx/BSCVD31Hpg1eakk/CXh/FWTl0JID20feGgs=","GnMNNyMQuoIyA0WimsQjjtPweoorThIbtQ3bmvQH9FE=","LIEg8mjvBU+BcGTDad2n6pCDd/6rpcTf+9oQ71joxVY=","HHyIJPdYdT+lfAB4nGhCF7kw6VMTvLc+bnuGSaSWj3A=","LNntMfX4aRyOOeQHenT6oPQArYtJHrP3tHsn+j/Rz3c=","I/9PnUaBNFfPYNkvV2GDmaXgIqwyHKVQhUriORiiLuo=","CZRaXRR6T2bO7OZAXd3Z0K9aLFEDUpQH3/HqWPGAQm0=","GI2cUoAl1MK2dmDGt3G5D3x9puqinT8mim3SI+xvxjA=","MFDjeZZZa3+B9oMRQx2HNNun2SbTYzWV4MDY3fTw9H8=","Fa8RaTloMKkWAMqBAsNcQmzq5UYeP5XYnYKVGNMK/Xg=","HabQmIVDLqmgbZ83+HPZhdrpM+NRRmspBChNozINisw=","J5bqkNJpryn1+KzzOSESTk5PrT2+ZYlF5UbuQR3aqcs=","IC190doPa0sDJcizMHdC8B4VYS7I6TBKfLAxngHTLWA=","CW1nkNBbt1kVapUromPWcqLX+ceI9Mgxop2s5MD4vl8=","BU76H2Ww/OKDgIllJ12He0ONojzlsT4ZY3mMsUR9JaQ=","GxYvg9kX6T7bMwjCmALeudiqaQETsuFIZMz24Y5BZfE=","IeUkHhJWTdb9nxzdKg3jnu3+/BRmzFaOxc63RaBQbtw=","HPtWYujPWskiaoDuF7Nqvstzq1+H4WGSe0NJ4Q5L3wg=","DyEXfjAqdxu65tjR7LNztiyZrzRiIKwBKcU/Zm6yQQA=","FnFSI3RgaZKv+w3X9xsSvsQjau3mKQVGvO9+H1FcIyA=","D6PsW5SIJZwutM8kUBv62b4uyeQsXMjM1BnSppLK2HA=","GTwOBOC9KYNXyyZsFQYIDtNu3OhcZIzAhejFexq1S7o=","ECrfjvdHNaJ+kSgwbcvDyZ9vcpHNQGV4zhTqKtq6aPg=","D+CveFjkmFnipU1vGtlFsTFqokv73SOuQKbQy3DD6rE=","IW9nF7vH3tsIU2oiIIQ/Ti2l8dqp69796KXqc0R5jSI=","HaVcyQDw0h9KPmlDkZGKGzwjsqx3PGs++I4uQigyUWE="],M:[["EJt/QRug5MmytwyvXDansZS+fBGtJDeL/ttoWSuoEYs=","Fu1B4Tu5wMZq4RlCT928vJMU3J/b3upV1sZFQ9xJA+A=","K5C7oA/KBYn2F+fcv+guDfcGq2QM6yR7eRqTt042c20="],["KWnyfu0xpIC5w2x2Q3nbyizI/dFBXD3e1ilAvN4L13E=","LiQZ+ewC7DlMmHHIMpY9wbiddDyMe5ZAKbIxFoex/iM=","EBBx8AMjebaXMVh2aQ8FPRSNThCfX7BlyKrMVaD4m/o="],["FDAh7GhqPzMNX55lRjgGXObNeeKMWzdTMmJE7mWhsac=","F2zAKWla0CWCpw7/CKb9mdBX4S5Y59e2sWzfq8juKRE=","GaP8ClZwK/QXun/uOAJZP6ZERwMHBD93cyec1x0l1eA="]]};k0.default=DY;Object.defineProperty(bL,"__esModule",{value:!0});bL.poseidon2=VY;var NY=am(AL),UY=am(om),$Y=am(k0);function am(e){return e&&e.__esModule?e:{default:e}}const jY=(0,UY.default)($Y.default);function VY(e){return(0,NY.default)(e,jY)}var xL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},eb=Lr.createContext&&Lr.createContext(xL),Co=globalThis&&globalThis.__assign||function(){return Co=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne(i),children:[wt(R3,{}),ze(AA,{children:[wt(CA,{}),wt(LA,{})]})]})]})}function HY(e){return CL({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function KY(){return ze(dA,{width:"100%",justify:"space-between",p:"6",children:[wt(ig,{href:"https://semaphore.pse.dev/",isExternal:!0,children:wt(tA,{src:"semaphore-logo.svg",htmlWidth:150})}),wt(ig,{href:"https://github.com/semaphore-protocol/benchmarks",isExternal:!0,children:wt(nA,{variant:"unstyled","aria-label":"Github repository",icon:wt(Wi,{boxSize:6,as:HY})})})]})}function YY({onChange:e,value:t=20}){const[n,r]=at.useState(!1);return ze(Jo,{gap:"3",align:"center",children:[wt(m0,{fontWeight:"bold",whiteSpace:"nowrap",children:"Tree depth:"}),wt(O3,{size:"sm",maxW:"42px",min:16,max:32,value:t,onChange:(i,o)=>e(o),children:wt(R3,{px:3})}),ze(EA,{"aria-label":"tree-depth-slider",min:16,max:32,value:t,onChange:e,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[wt(BA,{children:wt(kA,{})}),wt(sg,{}),wt(PA,{hasArrow:!0,placement:"top",isOpen:n,label:t,children:wt(sg,{})})]})]})}const ZY=["new Identity","new Group","generateProof","verifyProof","addMember","updateMember"];function XY(){const[e,t]=at.useState(20),[n,r]=at.useState(100),[i,o]=at.useState([]),a=at.useCallback(async function(){const u=[],[l,c]=await s(()=>new jV);u.push(c),o(u);let h=Array.from(Array(n-1).keys());h=[...h,l.commitment];const[_,v]=await s(()=>new _V(1,e,h));u.push(v),o(u.slice());const[P,N]=await s(async()=>await AY(l,_,1,1));u.push(N),o(u.slice());const[,M]=await s(async()=>await MY(P,e));u.push(M),o(u.slice());const[,z]=await s(()=>{_.addMember(1)});u.push(z),o(u.slice());const[,I]=await s(()=>{_.updateMember(0,1)});u.push(I),o(u.slice())},[e,n]);async function s(u){const l=performance.now(),c=await u(),h=performance.now();return[c,h-l]}return ze(Jo,{flexDir:"column",flex:"1",children:[wt(KY,{}),wt(Jo,{flex:"1",align:"center",justify:"center",children:ze(Jo,{flexDir:"column",gap:4,width:"400px",children:[wt(YY,{value:e,onChange:t}),wt(GY,{value:n,onChange:r,max:2**e}),wt(L3,{onClick:()=>a(),size:"sm",my:"3",children:"Run functions"}),wt(g0,{spacing:3,children:ZY.map((u,l)=>wt(aA,{children:ze(Jo,{justify:"space-between",children:[ze(S3,{children:[i[l]&&wt(sA,{as:WY,color:"green.500"}),wt("b",{children:u})]}),ze(m0,{children:[i[l]?i[l]:0," ms"]})]})},l))})]})})]})}const JY=$T({styles:{global:()=>({"body, #root":{minHeight:"100vh"},"#root":{display:"flex",flexDirection:"column"}})},colors:{primary:{50:"#ebedff",100:"#c7cdee",200:"#a3acdd",300:"#7f8bcd",400:"#5b6abd",500:"#4250a4",600:"#323f80",700:"#242d5d",800:"#141b3b",900:"#04091a"}}});cg.createRoot(document.getElementById("root")).render(wt(at.StrictMode,{children:wt(aU,{theme:JY,children:wt(XY,{})})})); diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..6f395ce --- /dev/null +++ b/icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..ef2e4d3 --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + + + + + Semaphore benchmarks + + + + + +
+ + + diff --git a/semaphore-logo.svg b/semaphore-logo.svg new file mode 100644 index 0000000..5fd48c2 --- /dev/null +++ b/semaphore-logo.svg @@ -0,0 +1,3 @@ + + +